зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1283617 - remove QI call when constructing AsyncEventDispatchers from WidgetEvents; r=baku
The compiler can just as easily do this cast for us; we don't have to rely on QI, and doing the conversion this way even saves an AddRef/Release pair.
This commit is contained in:
Родитель
197e47c6a7
Коммит
68e49f6d48
|
@ -27,7 +27,7 @@ AsyncEventDispatcher::AsyncEventDispatcher(EventTarget* aTarget,
|
|||
MOZ_ASSERT(mTarget);
|
||||
RefPtr<Event> event =
|
||||
EventDispatcher::CreateEvent(aTarget, nullptr, &aEvent, EmptyString());
|
||||
mEvent = do_QueryInterface(event);
|
||||
mEvent = event.forget();
|
||||
NS_ASSERTION(mEvent, "Should never fail to create an event");
|
||||
mEvent->DuplicatePrivateData();
|
||||
mEvent->SetTrusted(aEvent.IsTrusted());
|
||||
|
|
Загрузка…
Ссылка в новой задаче