bug 501900, r+sr=roc

This commit is contained in:
Olli Pettay 2009-07-21 14:59:46 +03:00
parent 20976634f6
commit 0226273416

View File

@ -11792,6 +11792,7 @@ nsCSSFrameConstructor::LazyGenerateChildrenEvent::Run()
// this is hard-coded to handle only menu popup frames
nsIFrame* frame = mPresShell->GetPrimaryFrameFor(mContent);
if (frame && frame->GetType() == nsGkAtoms::menuPopupFrame) {
nsWeakFrame weakFrame(frame);
#ifdef MOZ_XUL
// it is possible that the frame is different than the one that requested
// the lazy generation, but as long as it's a popup frame that hasn't
@ -11827,7 +11828,7 @@ nsCSSFrameConstructor::LazyGenerateChildrenEvent::Run()
fc->EndUpdate();
}
if (mCallback)
if (mCallback && weakFrame.IsAlive())
mCallback(mContent, frame, mArg);
// call XBL constructors after the frames are created