diff options
author | 2016-01-15 14:08:05 -0800 | |
---|---|---|
committer | 2016-01-28 15:34:19 -0800 | |
commit | c4695dfdab80c280c98a89c20e027a3804191585 (patch) | |
tree | b78f388ac75edd9f02abfcae68aad7d445af75d1 /runtime/gc/reference_processor.cc | |
parent | 97f4bc04b61d5cf78b0820dbf18e999b20d7a108 (diff) |
Always use pendingNext to test enqueability of references.
Also clean up a misleading comment in a reference queue test.
Bug: 24404957
Change-Id: Ieea4788039ecef73cba1871fb480a439bf65b499
Diffstat (limited to 'runtime/gc/reference_processor.cc')
-rw-r--r-- | runtime/gc/reference_processor.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/gc/reference_processor.cc b/runtime/gc/reference_processor.cc index 8356814354..e172f85b19 100644 --- a/runtime/gc/reference_processor.cc +++ b/runtime/gc/reference_processor.cc @@ -93,7 +93,7 @@ mirror::Object* ReferenceProcessor::GetReferent(Thread* self, mirror::Reference* // in the heap causing corruption since this field would get swept. if (collector_->IsMarkedHeapReference(referent_addr)) { if (!preserving_references_ || - (LIKELY(!reference->IsFinalizerReferenceInstance()) && !reference->IsEnqueued())) { + (LIKELY(!reference->IsFinalizerReferenceInstance()) && reference->IsUnprocessed())) { return referent_addr->AsMirrorPtr(); } } @@ -275,7 +275,7 @@ bool ReferenceProcessor::MakeCircularListIfUnenqueued(mirror::FinalizerReference // GC queues, but since we hold the lock finalizer_reference_queue_ lock it also prevents this // race. MutexLock mu2(self, *Locks::reference_queue_finalizer_references_lock_); - if (!reference->IsEnqueued()) { + if (reference->IsUnprocessed()) { CHECK(reference->IsFinalizerReferenceInstance()); reference->SetPendingNext(reference); return true; |