diff options
author | Brian Carlstrom <bdc@google.com> | 2012-03-29 17:57:06 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-03-29 17:57:06 -0700 |
commit | d2d5c2546733b579f8c7f1f8dd37d3bd85478dc8 (patch) | |
tree | 77b955e78357fff7ae1d238bbe493e91833e0e00 | |
parent | 97f6c2016be61de5b593f383db6c58d0462da439 (diff) | |
parent | 58cbbc25c91b96f4766c66cefa0a0cf6ba7b1d45 (diff) | |
download | art-d2d5c2546733b579f8c7f1f8dd37d3bd85478dc8.zip art-d2d5c2546733b579f8c7f1f8dd37d3bd85478dc8.tar.gz art-d2d5c2546733b579f8c7f1f8dd37d3bd85478dc8.tar.bz2 |
Merge "Do not use FindOatFileFromOatLocation in DexFile_isDexOptNeeded" into ics-mr1-plus-art
-rw-r--r-- | src/dalvik_system_DexFile.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dalvik_system_DexFile.cc b/src/dalvik_system_DexFile.cc index 2539c92..a4b270d 100644 --- a/src/dalvik_system_DexFile.cc +++ b/src/dalvik_system_DexFile.cc @@ -197,8 +197,8 @@ static jboolean DexFile_isDexOptNeeded(JNIEnv* env, jclass, jstring javaFilename // A user build looks like this, and it will have no classes.dex in // the input for checksum validation. std::string oat_filename(OatFile::DexFilenameToOatFilename(filename.c_str())); - const OatFile* oat_file = class_linker->FindOatFileFromOatLocation(oat_filename); - if (oat_file != NULL && oat_file->GetOatDexFile(filename.c_str()) != NULL) { + UniquePtr<const OatFile> oat_file(OatFile::Open(oat_filename, oat_filename, NULL)); + if (oat_file.get() != NULL && oat_file->GetOatDexFile(filename.c_str()) != NULL) { if (debug_logging) { LOG(INFO) << "DexFile_isDexOptNeeded ignoring precompiled file: " << filename.c_str(); } @@ -207,8 +207,8 @@ static jboolean DexFile_isDexOptNeeded(JNIEnv* env, jclass, jstring javaFilename // Check if we have an oat file in the cache std::string cache_location(GetArtCacheFilenameOrDie(oat_filename)); - oat_file = class_linker->FindOatFileFromOatLocation(cache_location); - if (oat_file == NULL) { + oat_file.reset(OatFile::Open(cache_location, oat_filename, NULL)); + if (oat_file.get() == NULL) { LOG(INFO) << "DexFile_isDexOptNeeded cache file " << cache_location << " does not exist for " << filename.c_str(); return JNI_TRUE; |