Bug 536486, remove IsDestroyingFrames check now that frames are available from content nodes, fixes possible leak, r=roc

This commit is contained in:
Neil Deakin 2009-12-31 12:36:56 -05:00
parent db5d475217
commit 989819833a

View File

@ -4374,21 +4374,8 @@ PresShell::ClearMouseCapture(nsIView* aView)
if (gCaptureInfo.mContent) {
if (aView) {
// if a view was specified, ensure that the captured content is within
// this view. Get the frame for the captured content from the right
// presshell first.
nsIFrame* frame = nsnull;
nsIDocument* doc = gCaptureInfo.mContent->GetCurrentDoc();
if (doc) {
nsIPresShell *shell = doc->GetPrimaryShell();
if (shell) {
// not much can happen if frames are being destroyed so just return.
if (shell->FrameManager()->IsDestroyingFrames())
return;
frame = gCaptureInfo.mContent->GetPrimaryFrame();
}
}
// this view.
nsIFrame* frame = gCaptureInfo.mContent->GetPrimaryFrame();
if (frame) {
nsIView* view = frame->GetClosestView();
// if there is no view, capturing won't be handled any more, so