Move assertion about stopped marking up (again).

Weak persistent handle callbacks might trigger nested GCs that in turn
can cause marking to be restarted. The assertion needs to hold before
firing callbacks only.

R=ulan@chromium.org
TEST=cctest/test-api --stress-compaction

Review URL: https://codereview.chromium.org/11413188

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13069 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b2a7b26e
......@@ -651,9 +651,6 @@ bool Heap::CollectGarbage(AllocationSpace space,
PerformGarbageCollection(collector, &tracer);
}
ASSERT(collector == SCAVENGER || incremental_marking()->IsStopped());
// This can do debug callbacks and restart incremental marking.
GarbageCollectionEpilogue();
}
......@@ -960,6 +957,10 @@ bool Heap::PerformGarbageCollection(GarbageCollector collector,
isolate_->counters()->objs_since_last_young()->Set(0);
// Callbacks that fire after this point might trigger nested GCs and
// restart incremental marking, the assertion can't be moved down.
ASSERT(collector == SCAVENGER || incremental_marking()->IsStopped());
gc_post_processing_depth_++;
{ DisableAssertNoAllocation allow_allocation;
GCTracer::Scope scope(tracer, GCTracer::Scope::EXTERNAL);
......
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