author | Terrence Cole <terrence@mozilla.com> |
Thu, 20 Feb 2014 13:38:32 -0800 | |
changeset 169967 | 1f1bb2f2f868dae9381d6e998efc8b49d33cf982 |
parent 169966 | 21bbea0bdc12ebeaf9e2751c816de8418b13f41c |
child 169968 | 8f879284bd82d73cdb4222ea1d84b9ed1535ffc6 |
push id | 40114 |
push user | tcole@mozilla.com |
push date | Fri, 21 Feb 2014 23:00:50 +0000 |
treeherder | mozilla-inbound@8f879284bd82 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mccr8 |
bugs | 956081 |
milestone | 30.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/xpcom/base/CycleCollectedJSRuntime.cpp +++ b/xpcom/base/CycleCollectedJSRuntime.cpp @@ -872,25 +872,17 @@ nsCycleCollectionParticipant* CycleCollectedJSRuntime::ZoneParticipant() { return &mJSZoneCycleCollectorGlobal; } nsresult CycleCollectedJSRuntime::TraverseRoots(nsCycleCollectionNoteRootCallback &aCb) { - static bool gcHasRun = false; - if (!gcHasRun) { - uint32_t gcNumber = JS_GetGCParameter(mJSRuntime, JSGC_NUMBER); - if (!gcNumber) { - // Cannot cycle collect if GC has not run first! - MOZ_CRASH(); - } - gcHasRun = true; - } + MOZ_ASSERT(!NeedCollect(), "Cannot cycle collect if GC has not run first!"); TraverseNativeRoots(aCb); NoteWeakMapsTracer trc(mJSRuntime, TraceWeakMapping, aCb); js::TraceWeakMaps(&trc); return NS_OK; }