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:
Nathan Froyd 2016-07-05 18:49:06 -04:00
Родитель 197e47c6a7
Коммит 68e49f6d48
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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());