Bug 421209, r=cpearce, sr=jst, a=beltzner
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user