From 55256cb60e11d4fac71affb4b9760a2931a3598d Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Thu, 21 Dec 2017 17:07:11 -0800 Subject: Extensions to check JNI. Ensure critical lock isn't held when returning from a down-call. Log a warning if the critical lock is held for a significant period of time. Refactor JNIEnvExt to be a class rather than a struct. Test: mma test-art-host Change-Id: I4d149cb04d3a7308a22b92b196e51e2f1ae17ede --- runtime/gc/reference_processor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/gc/reference_processor.cc') diff --git a/runtime/gc/reference_processor.cc b/runtime/gc/reference_processor.cc index d58d09c794..c59642fe4e 100644 --- a/runtime/gc/reference_processor.cc +++ b/runtime/gc/reference_processor.cc @@ -273,7 +273,7 @@ void ReferenceProcessor::EnqueueClearedReferences(Thread* self) { jobject cleared_references; { ReaderMutexLock mu(self, *Locks::mutator_lock_); - cleared_references = self->GetJniEnv()->vm->AddGlobalRef( + cleared_references = self->GetJniEnv()->GetVm()->AddGlobalRef( self, cleared_references_.GetList()); } if (kAsyncReferenceQueueAdd) { -- cgit v1.2.3-59-g8ed1b