diff options
author | 2017-04-10 20:34:29 +0000 | |
---|---|---|
committer | 2017-04-10 20:34:29 +0000 | |
commit | 41d14c55abfee49f8d913c3a37ebb8c18da68797 (patch) | |
tree | 91132bef624b83b3d887f893c3b9d337625cf045 /runtime/java_vm_ext.cc | |
parent | d111f90a386f7bad1474189390fce7a8d1ff1ab5 (diff) |
Revert "Avoid JNI usage error when JNI_OnLoad throws"
This reverts commit d111f90a386f7bad1474189390fce7a8d1ff1ab5.
Change-Id: Ia8461946088644e41e0f2e14d7e806a70dec41ab
Diffstat (limited to 'runtime/java_vm_ext.cc')
-rw-r--r-- | runtime/java_vm_ext.cc | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/runtime/java_vm_ext.cc b/runtime/java_vm_ext.cc index f2e3353631..b93b8f2a97 100644 --- a/runtime/java_vm_ext.cc +++ b/runtime/java_vm_ext.cc @@ -905,20 +905,8 @@ bool JavaVMExt::LoadNativeLibrary(JNIEnv* env, EnsureFrontOfChain(SIGSEGV); } - // Temporarily reset any pending exception around the call to - // SetClassLoaderOverride: SetClassLoaderOverride creates a new - // global reference, which is illegal while we have an - // exception pending. - jthrowable on_load_exception = env->ExceptionOccurred(); - env->ExceptionClear(); - - // Restore the current class loader (which was overridden above) to the previous state. self->SetClassLoaderOverride(old_class_loader.get()); - if (on_load_exception != nullptr) { - env->Throw(on_load_exception); - } - if (version == JNI_ERR) { StringAppendF(error_msg, "JNI_ERR returned from JNI_OnLoad in \"%s\"", path.c_str()); } else if (JavaVMExt::IsBadJniVersion(version)) { |