зеркало из https://github.com/mozilla/gecko-dev.git
Fix for crash when closing main window while print dialog is open (checked in for Frank Tang). b=35896, sr=vidur, r=adamlock
This commit is contained in:
Родитель
05042507f6
Коммит
e2193efb9c
|
@ -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));
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче