Bug 421209, r=cpearce, sr=jst, a=beltzner

git-svn-id: svn://10.0.0.236/trunk@248307 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
Olli.Pettay%helsinki.fi
2008-03-20 20:24:39 +00:00
parent 2b99ccf0c5
commit e9b8a89f91
14 changed files with 354 additions and 89 deletions

View File

@@ -201,6 +201,7 @@ static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
#endif
#include "nsContentErrors.h"
#include "nsIFocusEventSuppressor.h"
// Number of documents currently loading
static PRInt32 gNumberOfDocumentsLoading = 0;
@@ -3675,7 +3676,12 @@ nsDocShell::Destroy()
if (docShellParentAsItem)
docShellParentAsItem->RemoveChild(this);
nsCOMPtr<nsIFocusEventSuppressorService> suppressor;
if (mContentViewer) {
suppressor =
do_GetService(NS_NSIFOCUSEVENTSUPPRESSORSERVICE_CONTRACTID);
NS_ENSURE_STATE(suppressor);
suppressor->Suppress();
mContentViewer->Close(nsnull);
mContentViewer->Destroy();
mContentViewer = nsnull;
@@ -3702,7 +3708,9 @@ nsDocShell::Destroy()
// Cancel any timers that were set for this docshell; this is needed
// to break the cycle between us and the timers.
CancelRefreshURITimers();
if (suppressor) {
suppressor->Unsuppress();
}
return NS_OK;
}