summaryrefslogtreecommitdiff
path: root/runtime/class_table.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2016-06-03 17:53:09 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2016-06-03 17:53:09 +0000
commitb6b05aef09494da46411c8885e88fbb9cd03a1e2 (patch)
tree6bc6c33f03bfde94963609dd9f3d44a6abf6380b /runtime/class_table.cc
parent776a802be39cb4a2267b6371764d46ce1fc23e74 (diff)
parentf284d448e3edd428b6ade473d0993028638b2064 (diff)
Merge "Hold dex caches live in class table"
Diffstat (limited to 'runtime/class_table.cc')
-rw-r--r--runtime/class_table.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/class_table.cc b/runtime/class_table.cc
index 8267c68b29..f5ebcc5191 100644
--- a/runtime/class_table.cc
+++ b/runtime/class_table.cc
@@ -146,15 +146,15 @@ uint32_t ClassTable::ClassDescriptorHashEquals::operator()(const char* descripto
return ComputeModifiedUtf8Hash(descriptor);
}
-bool ClassTable::InsertDexFile(mirror::Object* dex_file) {
+bool ClassTable::InsertStrongRoot(mirror::Object* obj) {
WriterMutexLock mu(Thread::Current(), lock_);
- DCHECK(dex_file != nullptr);
- for (GcRoot<mirror::Object>& root : dex_files_) {
- if (root.Read() == dex_file) {
+ DCHECK(obj != nullptr);
+ for (GcRoot<mirror::Object>& root : strong_roots_) {
+ if (root.Read() == obj) {
return false;
}
}
- dex_files_.push_back(GcRoot<mirror::Object>(dex_file));
+ strong_roots_.push_back(GcRoot<mirror::Object>(obj));
return true;
}