Fix openDexFileNative to throw pending exception when it fails.
Bug: 11391006
Change-Id: I2331d73a2ab8f70d46b1afb2649550c296e7393a
diff --git a/runtime/native/dalvik_system_DexFile.cc b/runtime/native/dalvik_system_DexFile.cc
index 55a56d6..ab5eab3 100644
--- a/runtime/native/dalvik_system_DexFile.cc
+++ b/runtime/native/dalvik_system_DexFile.cc
@@ -113,8 +113,7 @@
outputName.c_str(), &error_msg);
}
if (dex_file == nullptr) {
- ScopedObjectAccess soa(env);
- ThrowIOException("%s", error_msg.c_str());
+ CHECK_EQ(env->ExceptionCheck(), JNI_TRUE);
return 0;
}
return static_cast<jint>(reinterpret_cast<uintptr_t>(dex_file));