From 6c5cb212fa7010ae7caf9dc765533aa967c95342 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Wed, 18 Jun 2014 16:07:20 -0700 Subject: Ensure classes are initialized rather than initializing. A class can be being initialized on a different thread, in that case other threads should block trying to access the class. The initializing state shows the class is being initialized but not that its safe for other threads to access. Change occurances of IsInitializing to IsInitialized primarily in slow-path code. Bug: 15347354 Change-Id: Ib586d0a385be6086a890dfbf8868d76f16767fac --- runtime/jni_internal.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'runtime/jni_internal.cc') diff --git a/runtime/jni_internal.cc b/runtime/jni_internal.cc index fc5d5905cb..5606d47832 100644 --- a/runtime/jni_internal.cc +++ b/runtime/jni_internal.cc @@ -3314,8 +3314,7 @@ bool JavaVMExt::LoadNativeLibrary(const std::string& path, void* JavaVMExt::FindCodeForNativeMethod(mirror::ArtMethod* m) { CHECK(m->IsNative()); mirror::Class* c = m->GetDeclaringClass(); - // If this is a static method, it could be called before the class - // has been initialized. + // If this is a static method, it could be called before the class has been initialized. if (m->IsStatic()) { c = EnsureInitialized(Thread::Current(), c); if (c == nullptr) { -- cgit v1.2.3