ART: Remove bad FindSymbol call
The removed call is superfluous under normal operation and harmful
when running a native-bridged library.
Bug: 22194296
Bug: https://code.google.com/p/android-developer-preview/issues/detail?id=2367
Change-Id: I3eb8f435a6a974a3e87a370b254ba8752f2a59b3
diff --git a/runtime/java_vm_ext.cc b/runtime/java_vm_ext.cc
index eb9c32d..f1deacf 100644
--- a/runtime/java_vm_ext.cc
+++ b/runtime/java_vm_ext.cc
@@ -132,6 +132,8 @@
}
void* FindSymbol(const std::string& symbol_name) {
+ CHECK(!NeedsNativeBridge());
+
return dlsym(handle_, symbol_name.c_str());
}
@@ -234,9 +236,6 @@
fn = library->FindSymbol(jni_long_name);
}
}
- if (fn == nullptr) {
- fn = library->FindSymbol(jni_long_name);
- }
if (fn != nullptr) {
VLOG(jni) << "[Found native code for " << PrettyMethod(m)
<< " in \"" << library->GetPath() << "\"]";