diff options
author | 2017-02-13 18:32:04 -0800 | |
---|---|---|
committer | 2017-02-13 19:34:54 -0800 | |
commit | 5812e20ff7cbc8efa0b8d7486ada2f58840a6ad5 (patch) | |
tree | be0e9fdeb90bcbad76b17b3aae4e746d977d80ee /compiler/oat_writer.cc | |
parent | 518f373324f355f8e58440dfbc3f5a1f2244bde7 (diff) |
Revert^3 "Hash-based dex cache type array."
Assert failing for "earchbox:search":
F zygote64: class_linker.cc:4612] Check failed: handle_scope_iface.Get() != nullptr
Test: m test-art-host
Bug: 34839984
Bug: 30627598
Bug: 34659969
This reverts commit 85c0f2ac03417f5125bc2ff1dab8109859c67d5c.
Change-Id: I39846c20295af5875b0f945be7035c73ded23135
Diffstat (limited to 'compiler/oat_writer.cc')
-rw-r--r-- | compiler/oat_writer.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/oat_writer.cc b/compiler/oat_writer.cc index 0ea11255a8..7c0cdbf270 100644 --- a/compiler/oat_writer.cc +++ b/compiler/oat_writer.cc @@ -1060,7 +1060,6 @@ class OatWriter::WriteCodeMethodVisitor : public OatDexMethodVisitor { WriteCodeMethodVisitor(OatWriter* writer, OutputStream* out, const size_t file_offset, size_t relative_offset) SHARED_LOCK_FUNCTION(Locks::mutator_lock_) : OatDexMethodVisitor(writer, relative_offset), - class_loader_(writer->HasImage() ? writer->image_writer_->GetClassLoader() : nullptr), out_(out), file_offset_(file_offset), soa_(Thread::Current()), @@ -1246,7 +1245,6 @@ class OatWriter::WriteCodeMethodVisitor : public OatDexMethodVisitor { } private: - ObjPtr<mirror::ClassLoader> class_loader_; OutputStream* const out_; const size_t file_offset_; const ScopedObjectAccess soa_; @@ -1305,12 +1303,10 @@ class OatWriter::WriteCodeMethodVisitor : public OatDexMethodVisitor { } mirror::Class* GetTargetType(const LinkerPatch& patch) REQUIRES_SHARED(Locks::mutator_lock_) { - DCHECK(writer_->HasImage()); ObjPtr<mirror::DexCache> dex_cache = GetDexCache(patch.TargetTypeDexFile()); - ObjPtr<mirror::Class> type = - ClassLinker::LookupResolvedType(patch.TargetTypeIndex(), dex_cache, class_loader_); + mirror::Class* type = dex_cache->GetResolvedType(patch.TargetTypeIndex()); CHECK(type != nullptr); - return type.Ptr(); + return type; } mirror::String* GetTargetString(const LinkerPatch& patch) REQUIRES_SHARED(Locks::mutator_lock_) { |