Bug 1495814 - Remove pointless do_QueryInterface() functions from nsBaseChannel.h r=mayhemer
authorAndrew McCreight <continuation@gmail.com>
Thu, 04 Oct 2018 10:53:21 +0000
changeset 439556 fc4e7aa8f23ec6048fea85e69703deebe2b7477c
parent 439555 f49d04b37bb27fbe3cbbe497c29a6d64a3b5ed47
child 439557 f394dec256736d9ccd559397cdc33b101aee9445
push id34778
push usernbeleuzu@mozilla.com
push dateThu, 04 Oct 2018 15:22:02 +0000
treeherdermozilla-central@01634947caab [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer
bugs1495814
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1495814 - Remove pointless do_QueryInterface() functions from nsBaseChannel.h r=mayhemer The first QI is never used. The second one is the same as the one in nsCOMPtr.h, so we should be able to call that instead, which can be done simply by deleting the method. The motivation is that I'm changing how do_QueryInterface works, and I'd like to avoid changing this place given that it isn't actually needed. Differential Revision: https://phabricator.services.mozilla.com/D7528
netwerk/base/nsBaseChannel.h
--- a/netwerk/base/nsBaseChannel.h
+++ b/netwerk/base/nsBaseChannel.h
@@ -182,25 +182,16 @@ public:
     return mPumpingData || mWaitingOnAsyncRedirect;
  }
 
   // Helper function for querying the channel's notification callbacks.
   template <class T> void GetCallback(nsCOMPtr<T> &result) {
     GetInterface(NS_GET_TEMPLATE_IID(T), getter_AddRefs(result));
   }
 
-  // Helper function for calling QueryInterface on this.
-  nsQueryInterface do_QueryInterface() {
-    return nsQueryInterface(static_cast<nsIChannel *>(this));
-  }
-  // MSVC needs this:
-  nsQueryInterface do_QueryInterface(nsISupports *obj) {
-    return nsQueryInterface(obj);
-  }
-
   // If a subclass does not want to feed transport-layer progress events to the
   // base channel via nsITransportEventSink, then it may set this flag to cause
   // the base channel to synthesize progress events when it receives data from
   // the content stream.  By default, progress events are not synthesized.
   void EnableSynthesizedProgressEvents(bool enable) {
     mSynthProgressEvents = enable;
   }