r=vidur. Fix for bug . We now revoke pending reflow events in the pres shell's destructor.

git-svn-id: svn://10.0.0.236/trunk@60301 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
nisheeth%netscape.com
2000-02-10 07:27:43 +00:00
parent 1fee1f55aa
commit 1ece5d5eba
2 changed files with 14 additions and 2 deletions

View File

@@ -715,6 +715,12 @@ PresShell::~PresShell()
mViewEventListener->SetPresShell((nsIPresShell*)nsnull);
NS_RELEASE(mViewEventListener);
}
// Revoke pending reflow events
if (mPendingReflowEvent) {
mPendingReflowEvent = PR_FALSE;
mEventQueue->RevokeEvents(this);
}
}
/**
@@ -1875,7 +1881,7 @@ ReflowEvent::ReflowEvent(nsIPresShell* aPresShell, nsIEventQueue* aQueue)
mPresShell = getter_AddRefs(NS_GetWeakReference(aPresShell));
PL_InitEvent(this, nsnull,
PL_InitEvent(this, aPresShell,
(PLHandleEventProc) ::HandlePLEvent,
(PLDestroyEventProc) ::DestroyPLEvent);

View File

@@ -715,6 +715,12 @@ PresShell::~PresShell()
mViewEventListener->SetPresShell((nsIPresShell*)nsnull);
NS_RELEASE(mViewEventListener);
}
// Revoke pending reflow events
if (mPendingReflowEvent) {
mPendingReflowEvent = PR_FALSE;
mEventQueue->RevokeEvents(this);
}
}
/**
@@ -1875,7 +1881,7 @@ ReflowEvent::ReflowEvent(nsIPresShell* aPresShell, nsIEventQueue* aQueue)
mPresShell = getter_AddRefs(NS_GetWeakReference(aPresShell));
PL_InitEvent(this, nsnull,
PL_InitEvent(this, aPresShell,
(PLHandleEventProc) ::HandlePLEvent,
(PLDestroyEventProc) ::DestroyPLEvent);