diff options
author | 2021-09-30 07:47:29 +0000 | |
---|---|---|
committer | 2021-09-30 09:54:05 +0000 | |
commit | 8473a5bf11d82f88f3e9a47965ed43411d29a377 (patch) | |
tree | e9c0f6453d2c217016ab2f1785a960c1eea77261 /runtime/class_linker_test.cc | |
parent | 3dcd844cccf35dc8d66117bd77de16fc68c86e4b (diff) |
Revert "Revert^2 "Lazily allocate DexCache arrays.""
This reverts commit e153a62e8e8a2c42f86d2db87c8188cd0d7bef6b.
Bug: b/181097963
Reason for revert: Crashes seen on bots.
Change-Id: I1b452d4a15adf42dd7170d77d1b79260d78400a3
Diffstat (limited to 'runtime/class_linker_test.cc')
-rw-r--r-- | runtime/class_linker_test.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/runtime/class_linker_test.cc b/runtime/class_linker_test.cc index 8e51149236..e0f498d6aa 100644 --- a/runtime/class_linker_test.cc +++ b/runtime/class_linker_test.cc @@ -1541,9 +1541,8 @@ TEST_F(ClassLinkerTest, RegisterDexFileName) { nullptr, nullptr)); // Make a copy of the dex cache with changed name. - dex_cache.Assign(class_linker->AllocAndInitializeDexCache(Thread::Current(), - *dex_file, - /* class_loader= */ nullptr)); + LinearAlloc* alloc = Runtime::Current()->GetLinearAlloc(); + dex_cache.Assign(class_linker->AllocAndInitializeDexCache(Thread::Current(), *dex_file, alloc)); DCHECK_EQ(dex_cache->GetLocation()->CompareTo(location.Get()), 0); { WriterMutexLock mu(soa.Self(), *Locks::dex_lock_); |