Bug 1110928, part 1 - Hoist the LOAD_END PokeGC out of nsJSContext::LoadEnd. r=smaug

nsDocumentViewer knows which document is involved which will help us later.

Also, fix a typo in the comment.

MozReview-Commit-ID: L6AyRUV7Y3x
This commit is contained in:
Andrew McCreight 2016-08-19 15:26:56 -07:00
Родитель 44699344bb
Коммит 9bed765b2e
2 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -1860,9 +1860,7 @@ nsJSContext::LoadEnd()
return;
}
// Its probably a good idea to GC soon since we have finished loading.
sLoadingInProgress = false;
PokeGC(JS::gcreason::LOAD_END);
}
// Only trigger expensive timers when they have been checked a number of times.

Просмотреть файл

@ -1037,6 +1037,9 @@ nsDocumentViewer::LoadComplete(nsresult aStatus)
nsJSContext::LoadEnd();
// It's probably a good idea to GC soon since we have finished loading.
PokeGC(JS::gcreason::LOAD_END);
#ifdef NS_PRINTING
// Check to see if someone tried to print during the load
if (mPrintIsPending) {