diff options
author | 2020-01-07 22:51:03 +0000 | |
---|---|---|
committer | 2020-01-07 22:51:55 +0000 | |
commit | 0b1afb7c63d99c88f90f17770ad94ccb0b0c57d3 (patch) | |
tree | 92e88de49a2e79c2a00ce8990e412febc81e5318 /runtime/entrypoints/entrypoint_utils-inl.h | |
parent | 93be70effba70b78596fc4bda6b583615c3b6d0c (diff) |
Revert "Remove finalizable restriction on structural redefinition"
This reverts commit 55d6fa4c352a1fadbd21b8d8e0929833e547b9e5.
Bug: 134162467
Test: None, pure revert.
Reason for revert: Flaky segvs across multiple configurations.
Change-Id: Iaa8ec6cbd2eee141e271cd3a56a1b6be8bbb3a7c
Diffstat (limited to 'runtime/entrypoints/entrypoint_utils-inl.h')
-rw-r--r-- | runtime/entrypoints/entrypoint_utils-inl.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/runtime/entrypoints/entrypoint_utils-inl.h b/runtime/entrypoints/entrypoint_utils-inl.h index 1e422014dd..338928ec16 100644 --- a/runtime/entrypoints/entrypoint_utils-inl.h +++ b/runtime/entrypoints/entrypoint_utils-inl.h @@ -199,15 +199,14 @@ inline ObjPtr<mirror::Object> AllocObjectFromCodeResolved(ObjPtr<mirror::Class> return nullptr; } gc::Heap* heap = Runtime::Current()->GetHeap(); - // Pass in kNoAddFinalizer since the object cannot be finalizable. + // Pass in false since the object cannot be finalizable. // CheckClassInitializedForObjectAlloc can cause thread suspension which means we may now be // instrumented. - return klass->Alloc</*kInstrumented=*/true, mirror::Class::AddFinalizer::kNoAddFinalizer>( + return klass->Alloc</*kInstrumented=*/true, /*kCheckAddFinalizer=*/false>( self, heap->GetCurrentAllocator()); } - // Pass in kNoAddFinalizer since the object cannot be finalizable. - return klass->Alloc<kInstrumented, - mirror::Class::AddFinalizer::kNoAddFinalizer>(self, allocator_type); + // Pass in false since the object cannot be finalizable. + return klass->Alloc<kInstrumented, /*kCheckAddFinalizer=*/false>(self, allocator_type); } // Given the context of a calling Method and an initialized class, create an instance. @@ -217,9 +216,8 @@ inline ObjPtr<mirror::Object> AllocObjectFromCodeInitialized(ObjPtr<mirror::Clas Thread* self, gc::AllocatorType allocator_type) { DCHECK(klass != nullptr); - // Pass in kNoAddFinalizer since the object cannot be finalizable. - return klass->Alloc<kInstrumented, - mirror::Class::AddFinalizer::kNoAddFinalizer>(self, allocator_type); + // Pass in false since the object cannot be finalizable. + return klass->Alloc<kInstrumented, /*kCheckAddFinalizer=*/false>(self, allocator_type); } |