Bug 1104162 - Don't enter PHASE_MINOR_GC stats phase until after verifying post barriers r=terrence

This commit is contained in:
Jon Coppeard 2014-12-01 06:13:59 -08:00
parent 49700a1446
commit 319a86b131
3 changed files with 9 additions and 2 deletions

View File

@ -764,6 +764,8 @@ js::Nursery::collect(JSRuntime *rt, JS::gcreason::Reason reason, TypeObjectList
AutoStopVerifyingBarriers av(rt, false);
gcstats::AutoPhase ap(rt->gc.stats, gcstats::PHASE_MINOR_GC);
// Move objects pointed to by roots from the nursery to the major heap.
MinorCollectionTracer trc(rt, this);

View File

@ -0,0 +1,7 @@
gczeal(11);
g = newGlobal()
g.eval("undefined;function f(){}")
Debugger(g).onDebuggerStatement = function(x) {
x.eval("f").return.script.setBreakpoint(0, {})
}
g.eval("debugger")

View File

@ -6476,7 +6476,6 @@ void
GCRuntime::minorGC(JS::gcreason::Reason reason)
{
#ifdef JSGC_GENERATIONAL
gcstats::AutoPhase ap(stats, gcstats::PHASE_MINOR_GC);
minorGCRequested = false;
TraceLogger *logger = TraceLoggerForMainThread(rt);
AutoTraceLog logMinorGC(logger, TraceLogger::MinorGC);
@ -6491,7 +6490,6 @@ GCRuntime::minorGC(JSContext *cx, JS::gcreason::Reason reason)
// Alternate to the runtime-taking form above which allows marking type
// objects as needing pretenuring.
#ifdef JSGC_GENERATIONAL
gcstats::AutoPhase ap(stats, gcstats::PHASE_MINOR_GC);
minorGCRequested = false;
TraceLogger *logger = TraceLoggerForMainThread(rt);
AutoTraceLog logMinorGC(logger, TraceLogger::MinorGC);