summaryrefslogtreecommitdiffstats
path: root/runtime/native
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-07-22 10:48:00 +0100
committerNicolas Geoffray <ngeoffray@google.com>2014-08-13 18:01:51 +0100
commit4fcdc94d22a4608e355aa8df36240181149d10e8 (patch)
treecb600df7e9b585720c03a08b10509151aa96d5dd /runtime/native
parentb66252112d45fd24eab85122fa8902afd1324542 (diff)
downloadart-4fcdc94d22a4608e355aa8df36240181149d10e8.zip
art-4fcdc94d22a4608e355aa8df36240181149d10e8.tar.gz
art-4fcdc94d22a4608e355aa8df36240181149d10e8.tar.bz2
Execute an application even when dex2oat crashes.
Bug: 17000769 Change-Id: Iffeb582862a5e794b6c7364c7ec2368cfd0f2214
Diffstat (limited to 'runtime/native')
-rw-r--r--runtime/native/dalvik_system_DexFile.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/native/dalvik_system_DexFile.cc b/runtime/native/dalvik_system_DexFile.cc
index c3304e6..f199c99 100644
--- a/runtime/native/dalvik_system_DexFile.cc
+++ b/runtime/native/dalvik_system_DexFile.cc
@@ -114,7 +114,9 @@ static jlong DexFile_openDexFileNative(JNIEnv* env, jclass, jstring javaSourceNa
bool success = linker->OpenDexFilesFromOat(sourceName.c_str(), outputName.c_str(), &error_msgs,
dex_files.get());
- if (success) {
+ if (success || !dex_files->empty()) {
+ // In the case of non-success, we have not found or could not generate the oat file.
+ // But we may still have found a dex file that we can use.
return static_cast<jlong>(reinterpret_cast<uintptr_t>(dex_files.release()));
} else {
// The vector should be empty after a failed loading attempt.