mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-07 20:17:37 +00:00
correctly remove event listeners when frame goes away. fixes bug 19542, r=rjc
This commit is contained in:
parent
e986659786
commit
812bedeaed
@ -201,8 +201,9 @@ nsToolbarFrame :: ~nsToolbarFrame ( )
|
||||
GetContent(getter_AddRefs(content));
|
||||
nsCOMPtr<nsIDOMEventReceiver> reciever(do_QueryInterface(content));
|
||||
|
||||
// NOTE: the Remove will delete the drag listener
|
||||
reciever->RemoveEventListenerByIID((nsIDOMDragListener *)mDragListener, nsIDOMDragListener::GetIID());
|
||||
// NOTE: the last Remove will delete the drag listener
|
||||
reciever->RemoveEventListener("dragover", mDragListener, PR_TRUE);
|
||||
reciever->RemoveEventListener("dragexit", mDragListener, PR_TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -88,8 +88,9 @@ nsTreeRowGroupFrame::~nsTreeRowGroupFrame()
|
||||
GetContent(getter_AddRefs(content));
|
||||
nsCOMPtr<nsIDOMEventReceiver> reciever(do_QueryInterface(content));
|
||||
|
||||
// NOTE: the Remove will delete the drag capturer
|
||||
reciever->RemoveEventListenerByIID((nsIDOMDragListener *)mDragCapturer, nsIDOMDragListener::GetIID());
|
||||
// NOTE: the last Remove will delete the drag capturer
|
||||
reciever->RemoveEventListener("dragover", mDragCapturer, PR_TRUE);
|
||||
reciever->RemoveEventListener("dragexit", mDragCapturer, PR_TRUE);
|
||||
|
||||
NS_IF_RELEASE(mContentChain);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user