Bug 1493737 - Fix many trivial calls to do_QueryInterface r=smaug

If class A is derived from class B, then an instance of class A can be
converted to B via a static cast, so a slower QI is not needed.

Differential Revision: https://phabricator.services.mozilla.com/D6861
This commit is contained in:
Andrew McCreight
2018-10-01 21:38:01 +00:00
parent 13274b53ff
commit 05b70f0bb6
74 changed files with 117 additions and 135 deletions

View File

@@ -2260,7 +2260,7 @@ XMLHttpRequestMainThread::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
NS_ASSERTION(!mFlagSyncLooping,
"We weren't supposed to support HTML parsing with XHR!");
mParseEndListener = new nsXHRParseEndListener(this);
nsCOMPtr<EventTarget> eventTarget = do_QueryInterface(mResponseXML);
nsCOMPtr<EventTarget> eventTarget = mResponseXML;
EventListenerManager* manager =
eventTarget->GetOrCreateListenerManager();
manager->AddEventListenerByType(mParseEndListener,