Bug 602516 - Either PresShell::Freeze needs to consistently null check mDocument to avoid a crash [@ PresShell::UpdateImageLockingState]. r+a=bz
This commit is contained in:
@@ -7478,13 +7478,15 @@ PresShell::Freeze()
|
|||||||
|
|
||||||
mDocument->EnumerateFreezableElements(FreezeElement, nsnull);
|
mDocument->EnumerateFreezableElements(FreezeElement, nsnull);
|
||||||
|
|
||||||
if (mCaret)
|
if (mCaret) {
|
||||||
mCaret->SetCaretVisible(PR_FALSE);
|
mCaret->SetCaretVisible(PR_FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
mPaintingSuppressed = PR_TRUE;
|
mPaintingSuppressed = PR_TRUE;
|
||||||
|
|
||||||
if (mDocument)
|
if (mDocument) {
|
||||||
mDocument->EnumerateSubDocuments(FreezeSubDocument, nsnull);
|
mDocument->EnumerateSubDocuments(FreezeSubDocument, nsnull);
|
||||||
|
}
|
||||||
|
|
||||||
nsPresContext* presContext = GetPresContext();
|
nsPresContext* presContext = GetPresContext();
|
||||||
if (presContext &&
|
if (presContext &&
|
||||||
@@ -7493,7 +7495,9 @@ PresShell::Freeze()
|
|||||||
}
|
}
|
||||||
|
|
||||||
mFrozen = PR_TRUE;
|
mFrozen = PR_TRUE;
|
||||||
|
if (mDocument) {
|
||||||
UpdateImageLockingState();
|
UpdateImageLockingState();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user