Postpone interrupts during marking garbage collection. This allows the check for C stack overflow to function correctly.

Review URL: http://codereview.chromium.org/5685010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6006 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
whesse@chromium.org 2010-12-14 11:48:42 +00:00
parent 4c02d3cd4c
commit ce1473b257

View File

@ -1281,6 +1281,11 @@ void MarkCompactCollector::ProcessObjectGroups() {
void MarkCompactCollector::MarkLiveObjects() {
GCTracer::Scope gc_scope(tracer_, GCTracer::Scope::MC_MARK);
// The recursive GC marker detects when it is nearing stack overflow,
// and switches to a different marking system. JS interrupts interfere
// with the C stack limit check.
PostponeInterruptsScope postpone;
#ifdef DEBUG
ASSERT(state_ == PREPARE_GC);
state_ = MARK_LIVE_OBJECTS;