Revision: 13069 Author: [email protected] Date: Tue Nov 27 09:03:12 2012 Log: 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. [email protected] TEST=cctest/test-api --stress-compaction Review URL: https://codereview.chromium.org/11413188 http://code.google.com/p/v8/source/detail?r=13069 Modified: /branches/bleeding_edge/src/heap.cc ======================================= --- /branches/bleeding_edge/src/heap.cc Tue Nov 27 05:18:55 2012 +++ /branches/bleeding_edge/src/heap.cc Tue Nov 27 09:03:12 2012 @@ -651,9 +651,6 @@ PerformGarbageCollection(collector, &tracer); } - ASSERT(collector == SCAVENGER || incremental_marking()->IsStopped()); - - // This can do debug callbacks and restart incremental marking. GarbageCollectionEpilogue(); } @@ -960,6 +957,10 @@ 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); -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
