mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 735014 - Wait longer for PAGE_HIDE GCs (r=smaug)
This commit is contained in:
parent
1cb75567ff
commit
d7a654d0c5
@ -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
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user