diff options
| author | 2020-01-07 22:53:09 +0000 | |
|---|---|---|
| committer | 2020-01-07 17:31:43 -0800 | |
| commit | 2f4942879da18c9789800878b0e5eb87fbedb7b0 (patch) | |
| tree | b14968d70ac2f623f980207b4afad64806470994 /runtime/entrypoints/entrypoint_utils-inl.h | |
| parent | 0b1afb7c63d99c88f90f17770ad94ccb0b0c57d3 (diff) | |
Revert^2 "Remove finalizable restriction on structural redefinition"
This reverts commit 0b1afb7c63d99c88f90f17770ad94ccb0b0c57d3.
Daemon shutdown is known to be somewhat flaky. That seems to be the
cause of this failure.
Reason for revert: Removed Daemon threads from tests 2006 & 2007.
Bug: 134162467
Test: % ./art/test/run-test --create-runner --host --prebuild --compact-dex-level fast --jit --no-relocate --runtime-option -Xcheck:jni --debuggable --runtime-option -Xopaque-jni-ids:true --64 2007
...
Runnable test script written to /tmp/allight/test-230585/runit.sh
...
% ./art/tools/parallel_run.py -j80 /tmp/allight/test-230585/runit.sh --out failure.txt
Test: ./art/test/run-test --create-runner --host --prebuild --compact-dex-level fast --jit --no-relocate --runtime-option -Xcheck:jni --debuggable --runtime-option -Xopaque-jni-ids:true --64 2006
Change-Id: I392a2936995dd05b08feea36f11b616c1548ae46
Diffstat (limited to 'runtime/entrypoints/entrypoint_utils-inl.h')
| -rw-r--r-- | runtime/entrypoints/entrypoint_utils-inl.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/runtime/entrypoints/entrypoint_utils-inl.h b/runtime/entrypoints/entrypoint_utils-inl.h index 338928ec16..1e422014dd 100644 --- a/runtime/entrypoints/entrypoint_utils-inl.h +++ b/runtime/entrypoints/entrypoint_utils-inl.h @@ -199,14 +199,15 @@ inline ObjPtr<mirror::Object> AllocObjectFromCodeResolved(ObjPtr<mirror::Class> return nullptr; } gc::Heap* heap = Runtime::Current()->GetHeap(); - // Pass in false since the object cannot be finalizable. + // Pass in kNoAddFinalizer since the object cannot be finalizable. // CheckClassInitializedForObjectAlloc can cause thread suspension which means we may now be // instrumented. - return klass->Alloc</*kInstrumented=*/true, /*kCheckAddFinalizer=*/false>( + return klass->Alloc</*kInstrumented=*/true, mirror::Class::AddFinalizer::kNoAddFinalizer>( self, heap->GetCurrentAllocator()); } - // Pass in false since the object cannot be finalizable. - return klass->Alloc<kInstrumented, /*kCheckAddFinalizer=*/false>(self, allocator_type); + // Pass in kNoAddFinalizer since the object cannot be finalizable. + return klass->Alloc<kInstrumented, + mirror::Class::AddFinalizer::kNoAddFinalizer>(self, allocator_type); } // Given the context of a calling Method and an initialized class, create an instance. @@ -216,8 +217,9 @@ inline ObjPtr<mirror::Object> AllocObjectFromCodeInitialized(ObjPtr<mirror::Clas Thread* self, gc::AllocatorType allocator_type) { DCHECK(klass != nullptr); - // Pass in false since the object cannot be finalizable. - return klass->Alloc<kInstrumented, /*kCheckAddFinalizer=*/false>(self, allocator_type); + // Pass in kNoAddFinalizer since the object cannot be finalizable. + return klass->Alloc<kInstrumented, + mirror::Class::AddFinalizer::kNoAddFinalizer>(self, allocator_type); } |