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

r=dbaron sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@196114 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
timeless%mozdev.org 2006-05-06 21:42:49 +00:00
parent 40201c98f5
commit d0080625f7

View File

@ -634,17 +634,15 @@ nsFrame::Destroy()
nsPresContext* presContext = GetPresContext();
nsIPresShell *shell = presContext->GetPresShell();
if (shell) {
NS_ASSERTION(!(mState & NS_FRAME_OUT_OF_FLOW) ||
!shell->FrameManager()->GetPlaceholderFrameFor(this),
"Deleting out of flow without tearing down placeholder relationship");
NS_ASSERTION(!(mState & NS_FRAME_OUT_OF_FLOW) ||
!shell->FrameManager()->GetPlaceholderFrameFor(this),
"Deleting out of flow without tearing down placeholder relationship");
shell->NotifyDestroyingFrame(this);
shell->NotifyDestroyingFrame(this);
if ((mState & NS_FRAME_EXTERNAL_REFERENCE) ||
(mState & NS_FRAME_SELECTED_CONTENT)) {
shell->ClearFrameRefs(this);
}
if ((mState & NS_FRAME_EXTERNAL_REFERENCE) ||
(mState & NS_FRAME_SELECTED_CONTENT)) {
shell->ClearFrameRefs(this);
}
//XXX Why is this done in nsFrame instead of some frame class