summaryrefslogtreecommitdiff
path: root/openjdkjvmti/ti_class.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2017-10-10 11:54:29 -0700
committer Mathieu Chartier <mathieuc@google.com> 2017-10-11 14:47:06 -0700
commit79c87da9d4698ec58ece65af0065eebd55a1cfe0 (patch)
tree399797f37712da9d20829d5b5059b6c84943cb02 /openjdkjvmti/ti_class.cc
parent656e97f949df4081fba908113406b32915174502 (diff)
Add DexFileLoader class
Added DexFileLoader class, moved functionality from DexFile there: - Multidex loading logic - DexFile opening logic for Zip and etc - Some other helpers Bug: 63756964 Test: test-art-host Change-Id: Ic3dfa458947d4b69912dea5cdd836e7e8f55061c
Diffstat (limited to 'openjdkjvmti/ti_class.cc')
-rw-r--r--openjdkjvmti/ti_class.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/openjdkjvmti/ti_class.cc b/openjdkjvmti/ti_class.cc
index daf4a8b7f2..5f29416134 100644
--- a/openjdkjvmti/ti_class.cc
+++ b/openjdkjvmti/ti_class.cc
@@ -43,6 +43,7 @@
#include "class_table-inl.h"
#include "common_throws.h"
#include "dex_file_annotations.h"
+#include "dex_file_loader.h"
#include "events-inl.h"
#include "fixed_up_dex_file.h"
#include "gc/heap-visit-objects-inl.h"
@@ -106,12 +107,12 @@ static std::unique_ptr<const art::DexFile> MakeSingleDexFile(art::Thread* self,
}
uint32_t checksum = reinterpret_cast<const art::DexFile::Header*>(map->Begin())->checksum_;
std::string map_name = map->GetName();
- std::unique_ptr<const art::DexFile> dex_file(art::DexFile::Open(map_name,
- checksum,
- std::move(map),
- /*verify*/true,
- /*verify_checksum*/true,
- &error_msg));
+ std::unique_ptr<const art::DexFile> dex_file(art::DexFileLoader::Open(map_name,
+ checksum,
+ std::move(map),
+ /*verify*/true,
+ /*verify_checksum*/true,
+ &error_msg));
if (dex_file.get() == nullptr) {
LOG(WARNING) << "Unable to load modified dex file for " << descriptor << ": " << error_msg;
art::ThrowClassFormatError(nullptr,