Bug 937766, part 5 - Implement PrepareForGarbageCollection. r=smaug

Running the garbage collector can cause objects in the CC graph to
die, so just finish off an incremental cycle collection when we
start a GC.
This commit is contained in:
Andrew McCreight
2013-12-06 10:17:20 -08:00
parent 0500df1d01
commit a30715b68c
3 changed files with 37 additions and 0 deletions

View File

@@ -1109,6 +1109,7 @@ CycleCollectedJSRuntime::OnGC(JSGCStatus aStatus)
{
switch (aStatus) {
case JSGC_BEGIN:
nsCycleCollector_prepareForGarbageCollection();
break;
case JSGC_END:
{