Bug 1843484 - Use EventTarget* instead of nsISupports* for the event target parameter of the EventDispatcher::Dispatch methods. r=smaug
This saves a few QueryInterface calls on the hot path. Differential Revision: https://phabricator.services.mozilla.com/D186977
This commit is contained in:
@@ -4220,9 +4220,8 @@ bool nsGlobalWindowInner::DispatchEvent(Event& aEvent, CallerType aCallerType,
|
||||
RefPtr<nsPresContext> presContext = mDoc->GetPresContext();
|
||||
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
// TODO: Bug 1506441
|
||||
nsresult rv = EventDispatcher::DispatchDOMEvent(
|
||||
MOZ_KnownLive(ToSupports(this)), nullptr, &aEvent, presContext, &status);
|
||||
nsresult rv = EventDispatcher::DispatchDOMEvent(this, nullptr, &aEvent,
|
||||
presContext, &status);
|
||||
bool retval = !aEvent.DefaultPrevented(aCallerType);
|
||||
if (NS_FAILED(rv)) {
|
||||
aRv.Throw(rv);
|
||||
|
||||
Reference in New Issue
Block a user