зеркало из https://github.com/mozilla/gecko-dev.git
correctly remove event listeners when frame goes away. fixes bug 19542, r=rjc
This commit is contained in:
Родитель
e986659786
Коммит
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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче