Bug 735014 - Wait longer for PAGE_HIDE GCs (r=smaug)

This commit is contained in:
Bill McCloskey 2012-03-12 16:25:03 -07:00
parent 690efe5d3a
commit 536021f834
3 changed files with 5 additions and 5 deletions

View File

@ -125,10 +125,6 @@ static PRLogModuleInfo* gJSDiagnostics;
#undef CompareString
#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
// The amount of time we wait from the first request to GC to actually

View File

@ -56,6 +56,10 @@ namespace mozilla {
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,
public nsIXPCScriptNotify
{

View File

@ -1282,7 +1282,7 @@ DocumentViewerImpl::PageHide(bool aIsUnload)
if (aIsUnload) {
// 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.
NS_ENSURE_STATE(mDocument);