summaryrefslogtreecommitdiff
path: root/runtime/class_linker.cc
diff options
context:
space:
mode:
author Sam Saccone <samccone@google.com> 2023-01-29 18:16:24 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-01-29 18:16:24 +0000
commit24b3d648ff6c2c200003f55ac63fc910d7bfd40f (patch)
tree1c1324dc63cca9a7b3ea7a0a432535fa25c47d88 /runtime/class_linker.cc
parentdf68c0a6f0d36728fa728049e5bcec20de2d0d5e (diff)
Revert "Write classes in runtime-generated app image."
This reverts commit df68c0a6f0d36728fa728049e5bcec20de2d0d5e. Reason for revert: b/267084527 Change-Id: I2eacf89c23db00c46d56e78009efa11bed31af60
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r--runtime/class_linker.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index b829f5916c..a2f451347a 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -2180,11 +2180,9 @@ bool ClassLinker::AddImageSpace(
ObjPtr<mirror::Class> klass(root.Read());
// Do not update class loader for boot image classes where the app image
// class loader is only the initiating loader but not the defining loader.
- if (space->HasAddress(klass.Ptr())) {
+ // Avoid read barrier since we are comparing against null.
+ if (klass->GetClassLoader<kDefaultVerifyFlags, kWithoutReadBarrier>() != nullptr) {
klass->SetClassLoader(loader);
- } else {
- DCHECK(klass->IsBootStrapClassLoaded());
- DCHECK(Runtime::Current()->GetHeap()->ObjectIsInBootImageSpace(klass.Ptr()));
}
}
}