diff options
Diffstat (limited to 'runtime/jni/java_vm_ext.h')
-rw-r--r-- | runtime/jni/java_vm_ext.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/jni/java_vm_ext.h b/runtime/jni/java_vm_ext.h index 8c8b1b3177..7f4f5485b6 100644 --- a/runtime/jni/java_vm_ext.h +++ b/runtime/jni/java_vm_ext.h @@ -184,6 +184,11 @@ class JavaVMExt : public JavaVM { REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(Locks::jni_weak_globals_lock_); + // Decode weak global as strong. Use only if the target object is known to be alive. + ObjPtr<mirror::Object> DecodeWeakGlobalAsStrong(IndirectRef ref) + REQUIRES_SHARED(Locks::mutator_lock_) + REQUIRES(!Locks::jni_weak_globals_lock_); + // Like DecodeWeakGlobal() but to be used only during a runtime shutdown where self may be // null. ObjPtr<mirror::Object> DecodeWeakGlobalDuringShutdown(Thread* self, IndirectRef ref) |