зеркало из https://github.com/mozilla/pjs.git
Bug 334897 Useless null check of shell in nsFrame::Destroy
r=dbaron sr=dbaron
This commit is contained in:
Родитель
d29a18af0c
Коммит
6a7dcbbda6
|
@ -634,17 +634,15 @@ nsFrame::Destroy()
|
||||||
nsPresContext* presContext = GetPresContext();
|
nsPresContext* presContext = GetPresContext();
|
||||||
|
|
||||||
nsIPresShell *shell = presContext->GetPresShell();
|
nsIPresShell *shell = presContext->GetPresShell();
|
||||||
if (shell) {
|
NS_ASSERTION(!(mState & NS_FRAME_OUT_OF_FLOW) ||
|
||||||
NS_ASSERTION(!(mState & NS_FRAME_OUT_OF_FLOW) ||
|
!shell->FrameManager()->GetPlaceholderFrameFor(this),
|
||||||
!shell->FrameManager()->GetPlaceholderFrameFor(this),
|
"Deleting out of flow without tearing down placeholder relationship");
|
||||||
"Deleting out of flow without tearing down placeholder relationship");
|
|
||||||
|
|
||||||
shell->NotifyDestroyingFrame(this);
|
shell->NotifyDestroyingFrame(this);
|
||||||
|
|
||||||
if ((mState & NS_FRAME_EXTERNAL_REFERENCE) ||
|
if ((mState & NS_FRAME_EXTERNAL_REFERENCE) ||
|
||||||
(mState & NS_FRAME_SELECTED_CONTENT)) {
|
(mState & NS_FRAME_SELECTED_CONTENT)) {
|
||||||
shell->ClearFrameRefs(this);
|
shell->ClearFrameRefs(this);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//XXX Why is this done in nsFrame instead of some frame class
|
//XXX Why is this done in nsFrame instead of some frame class
|
||||||
|
|
Загрузка…
Ссылка в новой задаче