summaryrefslogtreecommitdiff
path: root/runtime/dex_file.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/dex_file.cc')
-rw-r--r--runtime/dex_file.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/runtime/dex_file.cc b/runtime/dex_file.cc
index 3f6175f663..dc85f6c2c9 100644
--- a/runtime/dex_file.cc
+++ b/runtime/dex_file.cc
@@ -250,6 +250,7 @@ std::unique_ptr<const DexFile> DexFile::OpenMemory(const std::string& location,
location,
location_checksum,
mem_map,
+ nullptr,
error_msg);
}
@@ -337,9 +338,12 @@ std::unique_ptr<const DexFile> DexFile::OpenMemory(const uint8_t* base,
size_t size,
const std::string& location,
uint32_t location_checksum,
- MemMap* mem_map, std::string* error_msg) {
+ MemMap* mem_map,
+ const OatFile* oat_file,
+ std::string* error_msg) {
CHECK_ALIGNED(base, 4); // various dex file structures must be word aligned
- std::unique_ptr<DexFile> dex_file(new DexFile(base, size, location, location_checksum, mem_map));
+ std::unique_ptr<DexFile> dex_file(
+ new DexFile(base, size, location, location_checksum, mem_map, oat_file));
if (!dex_file->Init(error_msg)) {
dex_file.reset();
}
@@ -349,7 +353,8 @@ std::unique_ptr<const DexFile> DexFile::OpenMemory(const uint8_t* base,
DexFile::DexFile(const uint8_t* base, size_t size,
const std::string& location,
uint32_t location_checksum,
- MemMap* mem_map)
+ MemMap* mem_map,
+ const OatFile* oat_file)
: begin_(base),
size_(size),
location_(location),
@@ -363,7 +368,8 @@ DexFile::DexFile(const uint8_t* base, size_t size,
proto_ids_(reinterpret_cast<const ProtoId*>(base + header_->proto_ids_off_)),
class_defs_(reinterpret_cast<const ClassDef*>(base + header_->class_defs_off_)),
find_class_def_misses_(0),
- class_def_index_(nullptr) {
+ class_def_index_(nullptr),
+ oat_file_(oat_file) {
CHECK(begin_ != NULL) << GetLocation();
CHECK_GT(size_, 0U) << GetLocation();
}