8071507: (ref) Clear phantom reference as soft and weak references do

GC clears phantom refs on notification; update spec accordingly.

Reviewed-by: mchung, jmasa
This commit is contained in:
Kim Barrett 2015-12-28 13:48:43 -05:00
parent 4d2c80f12e
commit 1b5adfa949

View File

@ -235,7 +235,7 @@ ReferenceProcessorStats ReferenceProcessor::process_discovered_references(
// Final references
{
GCTraceTime(Debug, gc, ref) tt("FinalReference", gc_timer);
GCTraceTime(Debug, gc, ref) tt("FinalReference", gc_timer);
process_discovered_reflist(_discoveredFinalRefs, NULL, false,
is_alive, keep_alive, complete_gc, task_executor);
}
@ -243,7 +243,7 @@ ReferenceProcessorStats ReferenceProcessor::process_discovered_references(
// Phantom references
{
GCTraceTime(Debug, gc, ref) tt("PhantomReference", gc_timer);
process_discovered_reflist(_discoveredPhantomRefs, NULL, false,
process_discovered_reflist(_discoveredPhantomRefs, NULL, true,
is_alive, keep_alive, complete_gc, task_executor);
// Process cleaners, but include them in phantom timing. We expect