Bug 1189369, part 4 - Get rid of some old style QIs from nsMaybeWeakPtrArray. r=mak
authorAndrew McCreight <continuation@gmail.com>
Tue, 04 Aug 2015 13:55:01 -0700
changeset 287857 2f18ac5ee440f50252ae94dce4dec54a4bed2ae2
parent 287856 0182ea87c203f51b64a92f8616701f989ae62201
child 287858 cfccfcaa49f8ebf50e541b958c44a9961c60bf63
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1189369
milestone42.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 1189369, part 4 - Get rid of some old style QIs from nsMaybeWeakPtrArray. r=mak
toolkit/components/places/nsMaybeWeakPtr.h
--- a/toolkit/components/places/nsMaybeWeakPtr.h
+++ b/toolkit/components/places/nsMaybeWeakPtr.h
@@ -64,25 +64,25 @@ public:
 
 template<class T>
 const nsCOMPtr<T>
 nsMaybeWeakPtr<T>::GetValue() const
 {
   nsresult rv;
   nsCOMPtr<T> ref;
   if (mPtr) {
-    rv = mPtr->QueryInterface(NS_GET_TEMPLATE_IID(T), getter_AddRefs(ref));
+    ref = do_QueryInterface(mPtr, &rv);
     if (NS_SUCCEEDED(rv)) {
       return ref;
     }
   }
 
   nsCOMPtr<nsIWeakReference> weakRef = do_QueryInterface(mPtr);
   if (weakRef) {
-    rv = weakRef->QueryReferent(NS_GET_TEMPLATE_IID(T), getter_AddRefs(ref));
+    ref = do_QueryReferent(weakRef, &rv);
     if (NS_SUCCEEDED(rv)) {
       return ref;
     }
   }
 
   return nullptr;
 }