Chromium Code Reviews| Index: src/heap/mark-compact.cc |
| diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
| index e537689c4a5ca4ba35530fc8d81a55f3bfd37596..914ea899053b31ce57477c2f7f67d893bbcb50d4 100644 |
| --- a/src/heap/mark-compact.cc |
| +++ b/src/heap/mark-compact.cc |
| @@ -1961,7 +1961,6 @@ void MarkCompactCollector::ProcessMarkingDeque() { |
| } |
| } |
| - |
| // Mark all objects reachable (transitively) from objects on the marking |
| // stack including references only considered in the atomic marking pause. |
| void MarkCompactCollector::ProcessEphemeralMarking( |
| @@ -1969,7 +1968,11 @@ void MarkCompactCollector::ProcessEphemeralMarking( |
| bool work_to_do = true; |
| DCHECK(marking_deque_.IsEmpty() && !marking_deque_.overflowed()); |
| while (work_to_do) { |
| - if (!only_process_harmony_weak_collections) { |
| + if (heap()->UsingEmbedderHeapTracer()) { |
| + heap()->embedder_heap_tracer()->TraceWrappableFrom( |
| + reinterpret_cast<v8::Isolate*>(isolate()), wrappers_to_trace_); |
| + wrappers_to_trace_.clear(); |
| + } else if (!only_process_harmony_weak_collections) { |
| isolate()->global_handles()->IterateObjectGroups( |
| visitor, &IsUnmarkedHeapObjectWithHeap); |
| MarkImplicitRefGroups(&MarkCompactMarkingVisitor::MarkObject); |
| @@ -1980,7 +1983,6 @@ void MarkCompactCollector::ProcessEphemeralMarking( |
| } |
| } |
| - |
| void MarkCompactCollector::ProcessTopOptimizedFrame(ObjectVisitor* visitor) { |
| for (StackFrameIterator it(isolate(), isolate()->thread_local_top()); |
| !it.done(); it.Advance()) { |
| @@ -2135,6 +2137,10 @@ void MarkCompactCollector::MarkLiveObjects() { |
| { |
| TRACE_GC(heap()->tracer(), |
| GCTracer::Scope::MC_MARK_WEAK_CLOSURE_EPHEMERAL); |
| + if (heap()->UsingEmbedderHeapTracer()) { |
|
Hannes Payer (out of office)
2016/04/07 20:38:31
This piece of code and the code below need separat
Marcel Hlopko
2016/04/08 08:08:10
Let's not make this method more complicated than i
|
| + heap()->embedder_heap_tracer()->TraceRoots( |
| + reinterpret_cast<v8::Isolate*>(isolate())); |
| + } |
| ProcessEphemeralMarking(&root_visitor, false); |
| ProcessMarkingDeque(); |
| } |
| @@ -2171,6 +2177,10 @@ void MarkCompactCollector::MarkLiveObjects() { |
| TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_MARK_WEAK_CLOSURE_HARMONY); |
| ProcessEphemeralMarking(&root_visitor, true); |
| ProcessMarkingDeque(); |
| + if (heap()->UsingEmbedderHeapTracer()) { |
| + heap()->embedder_heap_tracer()->ClearTracingMarks( |
| + reinterpret_cast<v8::Isolate*>(isolate())); |
| + } |
| } |
| } |