Address missed review comment. Bug: 30351473 test: m test-art-host Change-Id: I8d0d536e9280555d156280d87055631cabf5b2b7
diff --git a/test/common/runtime_state.cc b/test/common/runtime_state.cc index ee2ee1a..de03a0e 100644 --- a/test/common/runtime_state.cc +++ b/test/common/runtime_state.cc
@@ -130,9 +130,10 @@ return; } + Thread* self = Thread::Current(); ArtMethod* method = nullptr; { - ScopedObjectAccess soa(Thread::Current()); + ScopedObjectAccess soa(self); ScopedUtfChars chars(env, method_name); CHECK(chars.c_str() != nullptr); @@ -149,11 +150,11 @@ } else { // Sleep to yield to the compiler thread. usleep(1000); - ScopedObjectAccess soa(Thread::Current()); + ScopedObjectAccess soa(self); // Make sure there is a profiling info, required by the compiler. - ProfilingInfo::Create(soa.Self(), method, /* retry_allocation */ true); + ProfilingInfo::Create(self, method, /* retry_allocation */ true); // Will either ensure it's compiled or do the compilation itself. - jit->CompileMethod(method, soa.Self(), /* osr */ false); + jit->CompileMethod(method, self, /* osr */ false); } } }