Backed out changeset c5bc2d6ed0d7 (bug 1110928)

This commit is contained in:
Sebastian Hengst 2016-08-21 12:27:56 +02:00
parent 55ccc927a5
commit 9d30a54ba3

View File

@ -1284,11 +1284,6 @@ nsDocumentViewer::PageHide(bool aIsUnload)
return NS_ERROR_NULL_POINTER;
}
if (aIsUnload) {
// Poke the GC. The window might be collectable garbage now.
nsJSContext::PokeGC(JS::gcreason::PAGE_HIDE, NS_GC_DELAY * 2);
}
mDocument->OnPageHide(!aIsUnload, nullptr);
// inform the window so that the focus state is reset.
@ -1298,6 +1293,10 @@ nsDocumentViewer::PageHide(bool aIsUnload)
window->PageHidden();
if (aIsUnload) {
// Poke the GC. The window might be collectable garbage now.
nsJSContext::PokeGC(JS::gcreason::PAGE_HIDE, NS_GC_DELAY * 2);
// if Destroy() was called during OnPageHide(), mDocument is nullptr.
NS_ENSURE_STATE(mDocument);
// First, get the window from the document...