diff options
Diffstat (limited to 'runtime/jni/java_vm_ext.cc')
-rw-r--r-- | runtime/jni/java_vm_ext.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/jni/java_vm_ext.cc b/runtime/jni/java_vm_ext.cc index b4e7938e91..7ae6c99fc6 100644 --- a/runtime/jni/java_vm_ext.cc +++ b/runtime/jni/java_vm_ext.cc @@ -866,6 +866,11 @@ ObjPtr<mirror::Object> JavaVMExt::DecodeWeakGlobalLocked(Thread* self, IndirectR return weak_globals_.Get(ref); } +ObjPtr<mirror::Object> JavaVMExt::DecodeWeakGlobalAsStrong(IndirectRef ref) { + // The target is known to be alive. Simple `Get()` with read barrier is enough. + return weak_globals_.Get(ref); +} + ObjPtr<mirror::Object> JavaVMExt::DecodeWeakGlobalDuringShutdown(Thread* self, IndirectRef ref) { DCHECK_EQ(IndirectReferenceTable::GetIndirectRefKind(ref), kWeakGlobal); DCHECK(Runtime::Current()->IsShuttingDown(self)); |