mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Bug 496792 - Optimize nsGlobalWindow::PostHandleEvent, r+sr=bz
This commit is contained in:
parent
9d37b793b6
commit
6ee8aa0742
@ -2299,6 +2299,17 @@ nsresult
|
||||
nsGlobalWindow::PostHandleEvent(nsEventChainPostVisitor& aVisitor)
|
||||
{
|
||||
NS_PRECONDITION(IsInnerWindow(), "PostHandleEvent is used on outer window!?");
|
||||
|
||||
// Return early if there is nothing to do.
|
||||
switch (aVisitor.mEvent->message) {
|
||||
case NS_RESIZE_EVENT:
|
||||
case NS_PAGE_UNLOAD:
|
||||
case NS_LOAD:
|
||||
break;
|
||||
default:
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* mChromeEventHandler and mContext go dangling in the middle of this
|
||||
function under some circumstances (events that destroy the window)
|
||||
without this addref. */
|
||||
|
Loading…
Reference in New Issue
Block a user