Fix for crash when closing main window while print dialog is open (checked in for Frank Tang). b=35896, sr=vidur, r=adamlock
git-svn-id: svn://10.0.0.236/trunk@82071 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
951fd4d23b
commit
6b15cffdba
@ -2593,6 +2593,9 @@ NS_IMETHODIMP GlobalWindowImpl::GetPrivateRoot(nsIDOMWindowInternal ** aParent)
|
||||
|
||||
nsCOMPtr<nsIScriptGlobalObject> parentTop = do_QueryInterface(parent);
|
||||
nsCOMPtr<nsIDocShell> docShell;
|
||||
NS_ASSERTION(parentTop, "cannot get parentTop");
|
||||
if(parentTop == nsnull)
|
||||
return NS_ERROR_FAILURE;
|
||||
parentTop->GetDocShell(getter_AddRefs(docShell));
|
||||
nsCOMPtr<nsIChromeEventHandler> chromeEventHandler;
|
||||
docShell->GetChromeEventHandler(getter_AddRefs(chromeEventHandler));
|
||||
|
||||
@ -2125,6 +2125,9 @@ static void CheckForFocus(nsIDocument* aDocument)
|
||||
nsCOMPtr<nsIDOMWindowInternal> rootWindow;
|
||||
nsCOMPtr<nsPIDOMWindow> ourWindow = do_QueryInterface(globalObject);
|
||||
ourWindow->GetPrivateRoot(getter_AddRefs(rootWindow));
|
||||
NS_ASSERTION(rootWindow , "cannot get rootWindow");
|
||||
if(nsnull == rootWindow)
|
||||
return;
|
||||
nsCOMPtr<nsIDOMDocument> rootDocument;
|
||||
rootWindow->GetDocument(getter_AddRefs(rootDocument));
|
||||
|
||||
|
||||
@ -2125,6 +2125,9 @@ static void CheckForFocus(nsIDocument* aDocument)
|
||||
nsCOMPtr<nsIDOMWindowInternal> rootWindow;
|
||||
nsCOMPtr<nsPIDOMWindow> ourWindow = do_QueryInterface(globalObject);
|
||||
ourWindow->GetPrivateRoot(getter_AddRefs(rootWindow));
|
||||
NS_ASSERTION(rootWindow , "cannot get rootWindow");
|
||||
if(nsnull == rootWindow)
|
||||
return;
|
||||
nsCOMPtr<nsIDOMDocument> rootDocument;
|
||||
rootWindow->GetDocument(getter_AddRefs(rootDocument));
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user