Commit d75023f3 authored by mlippautz's avatar mlippautz Committed by Commit bot

[heap] Enter final pause for embedder tracer in MarkLiveObjects

MarkCompactCollector::Prepare is too early in the rare case that we don't have a
marking deque yet. EnterFinalPause could then trigger
Heap::RegisterExternallyReferencedObject which rightfully fails because MC is
not properly set up.

Note that the DCHECK also triggers, without actual consequences, for aborting
incremental marking.

BUG=468240
TBR=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2611753002
Cr-Commit-Position: refs/heads/master@{#42044}
parent a0eb5ab5
......@@ -806,8 +806,6 @@ void MarkCompactCollector::Prepare() {
heap_->local_embedder_heap_tracer()->TracePrologue();
}
heap_->local_embedder_heap_tracer()->EnterFinalPause();
// Don't start compaction if we are in the middle of incremental
// marking cycle. We did not collect any slots.
if (!FLAG_never_compact && !was_marked_incrementally_) {
......@@ -2440,6 +2438,8 @@ void MarkCompactCollector::MarkLiveObjects() {
marking_deque()->StartUsing();
heap_->local_embedder_heap_tracer()->EnterFinalPause();
{
TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_MARK_PREPARE_CODE_FLUSH);
PrepareForCodeFlushing();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment