Bug 334897 Useless null check of shell in nsFrame::Destroy

r=dbaron sr=dbaron
This commit is contained in:
timeless%mozdev.org 2006-05-06 21:42:49 +00:00
Родитель d29a18af0c
Коммит 6a7dcbbda6
1 изменённых файлов: 7 добавлений и 9 удалений

Просмотреть файл

@ -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