зеркало из https://github.com/mozilla/gecko-dev.git
Bug 735014 - Wait longer for PAGE_HIDE GCs (r=smaug)
This commit is contained in:
Родитель
690efe5d3a
Коммит
536021f834
|
@ -125,10 +125,6 @@ static PRLogModuleInfo* gJSDiagnostics;
|
||||||
#undef CompareString
|
#undef CompareString
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The amount of time we wait between a request to GC (due to leaving
|
|
||||||
// a page) and doing the actual GC.
|
|
||||||
#define NS_GC_DELAY 4000 // ms
|
|
||||||
|
|
||||||
#define NS_SHRINK_GC_BUFFERS_DELAY 4000 // ms
|
#define NS_SHRINK_GC_BUFFERS_DELAY 4000 // ms
|
||||||
|
|
||||||
// The amount of time we wait from the first request to GC to actually
|
// The amount of time we wait from the first request to GC to actually
|
||||||
|
|
|
@ -56,6 +56,10 @@ namespace mozilla {
|
||||||
template <class> class Maybe;
|
template <class> class Maybe;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The amount of time we wait between a request to GC (due to leaving
|
||||||
|
// a page) and doing the actual GC.
|
||||||
|
#define NS_GC_DELAY 4000 // ms
|
||||||
|
|
||||||
class nsJSContext : public nsIScriptContext,
|
class nsJSContext : public nsIScriptContext,
|
||||||
public nsIXPCScriptNotify
|
public nsIXPCScriptNotify
|
||||||
{
|
{
|
||||||
|
|
|
@ -1282,7 +1282,7 @@ DocumentViewerImpl::PageHide(bool aIsUnload)
|
||||||
|
|
||||||
if (aIsUnload) {
|
if (aIsUnload) {
|
||||||
// Poke the GC. The window might be collectable garbage now.
|
// Poke the GC. The window might be collectable garbage now.
|
||||||
nsJSContext::PokeGC(js::gcreason::PAGE_HIDE);
|
nsJSContext::PokeGC(js::gcreason::PAGE_HIDE, NS_GC_DELAY * 2);
|
||||||
|
|
||||||
// if Destroy() was called during OnPageHide(), mDocument is nsnull.
|
// if Destroy() was called during OnPageHide(), mDocument is nsnull.
|
||||||
NS_ENSURE_STATE(mDocument);
|
NS_ENSURE_STATE(mDocument);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче