summaryrefslogtreecommitdiff
path: root/tools/hiddenapi/hiddenapi_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tools/hiddenapi/hiddenapi_test.cc')
-rw-r--r--tools/hiddenapi/hiddenapi_test.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/hiddenapi/hiddenapi_test.cc b/tools/hiddenapi/hiddenapi_test.cc
index f408c6663b..36e80c5c23 100644
--- a/tools/hiddenapi/hiddenapi_test.cc
+++ b/tools/hiddenapi/hiddenapi_test.cc
@@ -106,7 +106,6 @@ class HiddenApiTest : public CommonRuntimeTest {
}
std::unique_ptr<const DexFile> OpenDex(const ScratchFile& file) {
- ArtDexFileLoader dex_loader;
std::string error_msg;
File fd(file.GetFilename(), O_RDONLY, /* check_usage= */ false);
@@ -115,9 +114,9 @@ class HiddenApiTest : public CommonRuntimeTest {
UNREACHABLE();
}
- std::unique_ptr<const DexFile> dex_file(dex_loader.OpenDex(
- fd.Release(), /* location= */ file.GetFilename(), /* verify= */ true,
- /* verify_checksum= */ true, /* mmap_shared= */ false, &error_msg));
+ ArtDexFileLoader dex_loader(fd.Release(), file.GetFilename());
+ std::unique_ptr<const DexFile> dex_file(dex_loader.Open(
+ /* verify= */ true, /* verify_checksum= */ true, /* mmap_shared= */ false, &error_msg));
if (dex_file.get() == nullptr) {
LOG(FATAL) << "Open failed for '" << file.GetFilename() << "' " << error_msg;
UNREACHABLE();