Modify event flow to avoid walking into trashed frames.

This commit is contained in:
joki@netscape.com
1998-11-19 00:43:36 +00:00
parent 886778a209
commit e7a8fb61b9
14 changed files with 120 additions and 6 deletions

View File

@@ -312,6 +312,14 @@ NS_IMETHODIMP nsFrame::SetInitialChildList(nsIPresContext& aPresContext,
NS_IMETHODIMP nsFrame::DeleteFrame(nsIPresContext& aPresContext)
{
if (mState & NS_FRAME_EXTERNAL_REFERENCE) {
nsIPresShell *shell = aPresContext.GetShell();
if (nsnull != shell) {
shell->ClearFrameRefs(this);
NS_RELEASE(shell);
}
}
//XXX Why is this done in nsFrame instead of some frame class
// that actually loads images?
aPresContext.StopLoadImage(this);