diff options
author | 2017-10-19 13:59:55 +0100 | |
---|---|---|
committer | 2017-10-20 14:22:52 +0100 | |
commit | 095c6c96236476b605b3ac672f6d2b8c151e9479 (patch) | |
tree | fe04b7fe93e65efadd3f019dd1ecba4c2c40df18 /runtime/common_runtime_test.cc | |
parent | b277aa1385f7f4593c9978d8106669142d158f4f (diff) |
Pass the verify flag to DexFileLoader utilities.
Refactoring-only change.
Also remove unused DexFilerLoader::OpenMemory.
bug: 30972906
bug: 63920015
Test: build.
Change-Id: I7cd4b5787565ab1a3457ce2be6bb14657229c550
Diffstat (limited to 'runtime/common_runtime_test.cc')
-rw-r--r-- | runtime/common_runtime_test.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/runtime/common_runtime_test.cc b/runtime/common_runtime_test.cc index 0c2e49010e..d35402fd47 100644 --- a/runtime/common_runtime_test.cc +++ b/runtime/common_runtime_test.cc @@ -373,7 +373,8 @@ std::unique_ptr<const DexFile> CommonRuntimeTestImpl::LoadExpectSingleDexFile( std::string error_msg; MemMap::Init(); static constexpr bool kVerifyChecksum = true; - if (!DexFileLoader::Open(location, location, kVerifyChecksum, &error_msg, &dex_files)) { + if (!DexFileLoader::Open( + location, location, /* verify */ true, kVerifyChecksum, &error_msg, &dex_files)) { LOG(FATAL) << "Could not open .dex file '" << location << "': " << error_msg << "\n"; UNREACHABLE(); } else { @@ -572,8 +573,11 @@ std::vector<std::unique_ptr<const DexFile>> CommonRuntimeTestImpl::OpenTestDexFi static constexpr bool kVerifyChecksum = true; std::string error_msg; std::vector<std::unique_ptr<const DexFile>> dex_files; - bool success = DexFileLoader::Open( - filename.c_str(), filename.c_str(), kVerifyChecksum, &error_msg, &dex_files); + bool success = DexFileLoader::Open(filename.c_str(), + filename.c_str(), + /* verify */ true, + kVerifyChecksum, + &error_msg, &dex_files); CHECK(success) << "Failed to open '" << filename << "': " << error_msg; for (auto& dex_file : dex_files) { CHECK_EQ(PROT_READ, dex_file->GetPermissions()); |