Fix two bugs in jitzygote configuration.

- Fix a stalled ObjPtr reference.
- Fix DCHECKs now invalid with system server also using 'prejit'.

Bug: 119800099
Test: boots
Change-Id: If64e09115192f06763335237a7518df619965a3c
diff --git a/runtime/jit/jit_code_cache.cc b/runtime/jit/jit_code_cache.cc
index 15553d4..56a2b6a 100644
--- a/runtime/jit/jit_code_cache.cc
+++ b/runtime/jit/jit_code_cache.cc
@@ -835,9 +835,8 @@
       } else if (class_linker->IsQuickResolutionStub(
           method->GetEntryPointFromQuickCompiledCode())) {
         // This situation currently only occurs in the jit-zygote mode.
-        DCHECK(Runtime::Current()->IsZygote());
         DCHECK(Runtime::Current()->IsUsingApexBootImageLocation());
-        DCHECK(method->GetDeclaringClass()->GetClassLoader() == nullptr);
+        DCHECK(!garbage_collect_code_);
         // TODO(ngeoffray): In most cases, the zygote will not have a profiling
         // info for a compiled method. Use a map instead.
         if (method->GetProfilingInfo(kRuntimePointerSize) != nullptr) {