Bug 1200514 - Run remaining stable state runnables after final cycle collection. r=froydnj,mccr8

This commit is contained in:
Chris Pearce 2016-01-13 11:37:57 +13:00
parent b0580abae8
commit 04da9aa4ed
2 changed files with 7 additions and 0 deletions

View File

@ -215,7 +215,9 @@ private:
void TraceNativeGrayRoots(JSTracer* aTracer);
void AfterProcessMicrotask(uint32_t aRecursionDepth);
public:
void ProcessStableStateQueue();
private:
void ProcessMetastableStateQueue(uint32_t aRecursionDepth);
public:

View File

@ -4166,6 +4166,11 @@ nsCycleCollector_shutdown()
data->mCollector->Shutdown();
data->mCollector = nullptr;
if (data->mRuntime) {
// Run any remaining tasks that may have been enqueued via
// RunInStableState during the final cycle collection.
data->mRuntime->ProcessStableStateQueue();
}
if (!data->mRuntime) {
delete data;
sCollectorData.set(nullptr);