зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1415541 - No need to destroy frames if Destroy was called on the shell. r=bz
MozReview-Commit-ID: CgiFqeKHF3N
This commit is contained in:
Родитель
b7af3313b9
Коммит
e6b1085aea
|
@ -48,7 +48,7 @@ nsXMLPrettyPrinter::PrettyPrint(nsIDocument* aDocument,
|
||||||
*aDidPrettyPrint = false;
|
*aDidPrettyPrint = false;
|
||||||
|
|
||||||
// Check for iframe with display:none. Such iframes don't have presshells
|
// Check for iframe with display:none. Such iframes don't have presshells
|
||||||
nsIPresShell* shell = aDocument->GetShell();
|
nsCOMPtr<nsIPresShell> shell = aDocument->GetShell();
|
||||||
if (!shell) {
|
if (!shell) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,8 @@ nsXMLPrettyPrinter::PrettyPrint(nsIDocument* aDocument,
|
||||||
GetSystemPrincipal(getter_AddRefs(sysPrincipal));
|
GetSystemPrincipal(getter_AddRefs(sysPrincipal));
|
||||||
|
|
||||||
// Destroy any existing frames before we unbind anonymous content.
|
// Destroy any existing frames before we unbind anonymous content.
|
||||||
if (rootCont->IsElement()) {
|
// Note that the shell might be Destroy'ed by now (see bug 1415541).
|
||||||
|
if (!shell->IsDestroying() && rootCont->IsElement()) {
|
||||||
shell->DestroyFramesForAndRestyle(rootCont->AsElement());
|
shell->DestroyFramesForAndRestyle(rootCont->AsElement());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче