mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
deathgrip the event listener manager in HandleEvent. partial fix for bug 21397. r:hyatt a:chofmann
This commit is contained in:
parent
fe29f5d7a5
commit
4447892c87
@ -671,6 +671,11 @@ nsresult nsEventListenerManager::HandleEvent(nsIPresContext* aPresContext,
|
||||
aFlags |= (NS_EVENT_FLAG_BUBBLE | NS_EVENT_FLAG_CAPTURE);
|
||||
}
|
||||
|
||||
/* Without this addref, certain events, notably ones bound to
|
||||
keys which cause window deletion, can destroy this object
|
||||
before we're ready. */
|
||||
nsCOMPtr<nsIEventListenerManager> kungFuDeathGrip(this);
|
||||
|
||||
switch(aEvent->message) {
|
||||
case NS_MOUSE_LEFT_BUTTON_DOWN:
|
||||
case NS_MOUSE_MIDDLE_BUTTON_DOWN:
|
||||
|
@ -671,6 +671,11 @@ nsresult nsEventListenerManager::HandleEvent(nsIPresContext* aPresContext,
|
||||
aFlags |= (NS_EVENT_FLAG_BUBBLE | NS_EVENT_FLAG_CAPTURE);
|
||||
}
|
||||
|
||||
/* Without this addref, certain events, notably ones bound to
|
||||
keys which cause window deletion, can destroy this object
|
||||
before we're ready. */
|
||||
nsCOMPtr<nsIEventListenerManager> kungFuDeathGrip(this);
|
||||
|
||||
switch(aEvent->message) {
|
||||
case NS_MOUSE_LEFT_BUTTON_DOWN:
|
||||
case NS_MOUSE_MIDDLE_BUTTON_DOWN:
|
||||
|
Loading…
Reference in New Issue
Block a user