Merge backout of changeset 2752efeb2fdd (Bug 535004: Check if we've fired an unload event before calling OnPageShow, in DocumentViewerImpl::LoadComplete) because the NS_ABORT_IF_FALSE that it added is firing in reftest and crashtest, at least on Linux.

This commit is contained in:
L. David Baron 2009-12-23 23:05:37 -05:00
Родитель ca68af6299 4503f159b6
Коммит a06714dca7
2 изменённых файлов: 4 добавлений и 8 удалений

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

@ -3609,11 +3609,6 @@ nsDocument::SetScriptGlobalObject(nsIScriptGlobalObject *aScriptGlobalObject)
"Script global object must be an inner window!");
}
#endif
NS_ABORT_IF_FALSE(aScriptGlobalObject || !mAnimationController ||
mAnimationController->IsPausedByType(
nsSMILTimeContainer::PAUSE_PAGEHIDE |
nsSMILTimeContainer::PAUSE_BEGIN),
"Clearing window pointer while animations are unpaused");
if (mScriptGlobalObject && !aScriptGlobalObject) {
// We're detaching from the window. We need to grab a pointer to

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

@ -1067,9 +1067,10 @@ DocumentViewerImpl::LoadComplete(nsresult aStatus)
window = mDocument->GetWindow();
if (window) {
nsIDocShell *docShell = window->GetDocShell();
PRBool isInUnload;
if (docShell && NS_SUCCEEDED(docShell->GetIsInUnload(&isInUnload)) &&
!isInUnload) {
PRBool beingDestroyed;
if (docShell &&
NS_SUCCEEDED(docShell->IsBeingDestroyed(&beingDestroyed)) &&
!beingDestroyed) {
mDocument->OnPageShow(restoring, nsnull);
}
}