diff options
Diffstat (limited to 'runtime/class_table.cc')
-rw-r--r-- | runtime/class_table.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/class_table.cc b/runtime/class_table.cc index f5ebcc5191..8267c68b29 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::InsertStrongRoot(mirror::Object* obj) { +bool ClassTable::InsertDexFile(mirror::Object* dex_file) { WriterMutexLock mu(Thread::Current(), lock_); - DCHECK(obj != nullptr); - for (GcRoot<mirror::Object>& root : strong_roots_) { - if (root.Read() == obj) { + DCHECK(dex_file != nullptr); + for (GcRoot<mirror::Object>& root : dex_files_) { + if (root.Read() == dex_file) { return false; } } - strong_roots_.push_back(GcRoot<mirror::Object>(obj)); + dex_files_.push_back(GcRoot<mirror::Object>(dex_file)); return true; } |