Use cleared JNI weak sentinel from boot image.
We were already adding the sentinel to the boot image,
so we may as well reuse the boot image copy.
Also move pre-allocated objects from class roots to the
boot image live objects.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: aosp_taimen-userdebug boots.
Change-Id: I635dcdd146ca2c6b55d187e9a545a9990b0b35ca
diff --git a/runtime/runtime.h b/runtime/runtime.h
index dd66b85..7050fd2 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -719,7 +719,7 @@
}
// Called from class linker.
- void SetSentinel(mirror::Object* sentinel) REQUIRES_SHARED(Locks::mutator_lock_);
+ void SetSentinel(ObjPtr<mirror::Object> sentinel) REQUIRES_SHARED(Locks::mutator_lock_);
// For testing purpose only.
// TODO: Remove this when this is no longer needed (b/116087961).
GcRoot<mirror::Object> GetSentinel() REQUIRES_SHARED(Locks::mutator_lock_);