Bug 888898 - Avoid shutdown leaks with PC count profiling (r=bhackett)

This commit is contained in:
Bill McCloskey 2013-08-14 14:48:36 -07:00
parent 676069b2bc
commit 5f588a74e9

View File

@ -713,7 +713,7 @@ js::gc::MarkRuntime(JSTracer *trc, bool useSavedRoots)
}
/* Do not discard scripts with counts while profiling. */
if (rt->profilingScripts && !rt->isHeapMinorCollecting()) {
if (rt->profilingScripts && rt->hasContexts() && !rt->isHeapMinorCollecting()) {
for (CellIterUnderGC i(zone, FINALIZE_SCRIPT); !i.done(); i.next()) {
JSScript *script = i.get<JSScript>();
if (script->hasScriptCounts) {