summaryrefslogtreecommitdiffstats
path: root/runtime/jni_internal.cc
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-06-18 16:07:20 -0700
committerIan Rogers <irogers@google.com>2014-06-18 16:39:29 -0700
commit6c5cb212fa7010ae7caf9dc765533aa967c95342 (patch)
treec31c46eb7b284b317455fdab48317de92b81dd28 /runtime/jni_internal.cc
parent241fd1192dfc0f7322660343179f9fc0591ed9ff (diff)
downloadart-6c5cb212fa7010ae7caf9dc765533aa967c95342.tar.gz
art-6c5cb212fa7010ae7caf9dc765533aa967c95342.tar.bz2
art-6c5cb212fa7010ae7caf9dc765533aa967c95342.zip
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
Diffstat (limited to 'runtime/jni_internal.cc')
-rw-r--r--runtime/jni_internal.cc3
1 files changed, 1 insertions, 2 deletions
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) {