summaryrefslogtreecommitdiff
path: root/runtime/class_linker_test.cc
diff options
context:
space:
mode:
author David Sehr <sehr@google.com> 2018-06-28 16:59:00 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-06-28 16:59:00 +0000
commitd20a4d76c33cd6e609ad6b1b3cde09fdcbdde05c (patch)
treeccbf6e69ca17f4677186f4e148e1f9baf8bc7ae4 /runtime/class_linker_test.cc
parentb5271dd44a30f498689e503340d3c8d01bf31f07 (diff)
parentb095f022a9683a9123018c01e22595cf969fd88b (diff)
Merge "Refactor DexFile ownership"
Diffstat (limited to 'runtime/class_linker_test.cc')
-rw-r--r--runtime/class_linker_test.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/class_linker_test.cc b/runtime/class_linker_test.cc
index e40f1dbcdf..2a2aff1002 100644
--- a/runtime/class_linker_test.cc
+++ b/runtime/class_linker_test.cc
@@ -1521,12 +1521,12 @@ TEST_F(ClassLinkerTest, RegisterDexFileName) {
dex_cache->SetLocation(location.Get());
const DexFile* old_dex_file = dex_cache->GetDexFile();
- std::unique_ptr<DexFile> dex_file(new StandardDexFile(old_dex_file->Begin(),
- old_dex_file->Size(),
- location->ToModifiedUtf8(),
- 0u,
- nullptr,
- nullptr));
+ std::unique_ptr<DexFile> dex_file(
+ new StandardDexFile(std::make_unique<NonOwningDexFileContainer>(old_dex_file->Begin(),
+ old_dex_file->Size()),
+ location->ToModifiedUtf8(),
+ 0u,
+ nullptr));
{
WriterMutexLock mu(soa.Self(), *Locks::dex_lock_);
// Check that inserting with a UTF16 name works.