summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/native/dalvik_system_DexFile.cc9
-rw-r--r--runtime/oat_file_assistant_test.cc1
-rw-r--r--runtime/oat_file_manager.cc4
-rw-r--r--runtime/oat_file_manager.h1
4 files changed, 5 insertions, 10 deletions
diff --git a/runtime/native/dalvik_system_DexFile.cc b/runtime/native/dalvik_system_DexFile.cc
index 0e61cf64f9..0617dae1ae 100644
--- a/runtime/native/dalvik_system_DexFile.cc
+++ b/runtime/native/dalvik_system_DexFile.cc
@@ -254,10 +254,11 @@ static jobject DexFile_createCookieWithArray(JNIEnv* env,
return CreateSingleDexFileCookie(env, std::move(dex_mem_map));
}
+// TODO(calin): clean up the unused parameters (here and in libcore).
static jobject DexFile_openDexFileNative(JNIEnv* env,
jclass,
jstring javaSourceName,
- jstring javaOutputName,
+ jstring javaOutputName ATTRIBUTE_UNUSED,
jint flags ATTRIBUTE_UNUSED,
jobject class_loader,
jobjectArray dex_elements) {
@@ -265,10 +266,7 @@ static jobject DexFile_openDexFileNative(JNIEnv* env,
if (sourceName.c_str() == nullptr) {
return 0;
}
- NullableScopedUtfChars outputName(env, javaOutputName);
- if (env->ExceptionCheck()) {
- return 0;
- }
+
Runtime* const runtime = Runtime::Current();
ClassLinker* linker = runtime->GetClassLinker();
std::vector<std::unique_ptr<const DexFile>> dex_files;
@@ -276,7 +274,6 @@ static jobject DexFile_openDexFileNative(JNIEnv* env,
const OatFile* oat_file = nullptr;
dex_files = runtime->GetOatFileManager().OpenDexFilesFromOat(sourceName.c_str(),
- outputName.c_str(),
class_loader,
dex_elements,
/*out*/ &oat_file,
diff --git a/runtime/oat_file_assistant_test.cc b/runtime/oat_file_assistant_test.cc
index 9b35489330..4a738ab0a3 100644
--- a/runtime/oat_file_assistant_test.cc
+++ b/runtime/oat_file_assistant_test.cc
@@ -897,7 +897,6 @@ class RaceGenerateTask : public Task {
const OatFile* oat_file = nullptr;
dex_files = Runtime::Current()->GetOatFileManager().OpenDexFilesFromOat(
dex_location_.c_str(),
- oat_location_.c_str(),
/*class_loader*/nullptr,
/*dex_elements*/nullptr,
&oat_file,
diff --git a/runtime/oat_file_manager.cc b/runtime/oat_file_manager.cc
index 139022210c..6799918534 100644
--- a/runtime/oat_file_manager.cc
+++ b/runtime/oat_file_manager.cc
@@ -615,7 +615,6 @@ bool OatFileManager::HasCollisions(const OatFile* oat_file,
std::vector<std::unique_ptr<const DexFile>> OatFileManager::OpenDexFilesFromOat(
const char* dex_location,
- const char* oat_location,
jobject class_loader,
jobjectArray dex_elements,
const OatFile** out_oat_file,
@@ -630,8 +629,9 @@ std::vector<std::unique_ptr<const DexFile>> OatFileManager::OpenDexFilesFromOat(
Locks::mutator_lock_->AssertNotHeld(self);
Runtime* const runtime = Runtime::Current();
+ // TODO(calin): remove the explicit oat_location for OatFileAssistant
OatFileAssistant oat_file_assistant(dex_location,
- oat_location,
+ /*oat_location*/ nullptr,
kRuntimeISA,
!runtime->IsAotCompiler());
diff --git a/runtime/oat_file_manager.h b/runtime/oat_file_manager.h
index 45ac4b79e7..05a5f5b7b9 100644
--- a/runtime/oat_file_manager.h
+++ b/runtime/oat_file_manager.h
@@ -96,7 +96,6 @@ class OatFileManager {
// files.
std::vector<std::unique_ptr<const DexFile>> OpenDexFilesFromOat(
const char* dex_location,
- const char* oat_location,
jobject class_loader,
jobjectArray dex_elements,
/*out*/ const OatFile** out_oat_file,