Stop using |instance_| in Runtime::InitNativeMethods.
Runtime::InitNativeMethods is a member function so we
don't need to use |instance_| to call Runtime methods there.
I believe that this call uses |instance_| instead of |this|
because it was originally in a static Runtime::Create method.
It was originally called 'instance_->InitLibraries();' and was
moved to Runtime::Start which is a member function here:
http://ag/#/c/133053/6/src/runtime.cc
and since then it was further moved and renamed but it kept using |instance_|
even though use of |this| seems more appropriate.
Change-Id: I79b9d23873272ba2f124e285602f1b2683c2f27f
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 3bd825b..62aef29 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -914,7 +914,7 @@
{
std::string mapped_name(StringPrintf(OS_SHARED_LIB_FORMAT_STR, "javacore"));
std::string reason;
- if (!instance_->java_vm_->LoadNativeLibrary(env, mapped_name, nullptr, &reason)) {
+ if (!java_vm_->LoadNativeLibrary(env, mapped_name, nullptr, &reason)) {
LOG(FATAL) << "LoadNativeLibrary failed for \"" << mapped_name << "\": " << reason;
}
}