Bug 1371982 - Use a RefPtr<> to hold the MozPromise. r=gerald, a=jcristau
authorJW Wang <jwwang@mozilla.com>
Mon, 26 Jun 2017 20:13:27 -0400
changeset 414136 79a937693943a5eefc70ccd5034cff3bb4cdac16
parent 414135 7ca275e013ff7a6bedeb4aeaa996af8d2a96c61d
child 414137 12d97a961c0e8ea32ae79ea063c9a9be8970e2a4
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald, jcristau
bugs1371982
milestone55.0
Bug 1371982 - Use a RefPtr<> to hold the MozPromise. r=gerald, a=jcristau
xpcom/threads/MozPromise.h
--- a/xpcom/threads/MozPromise.h
+++ b/xpcom/threads/MozPromise.h
@@ -958,17 +958,17 @@ protected:
     {
       return this;
     }
 
   private:
     AbstractThread* mResponseThread;
     const char* mCallSite;
     RefPtr<ThenValueType> mThenValue;
-    MozPromise* mReceiver;
+    RefPtr<MozPromise> mReceiver;
   };
 
 public:
   template<typename ThisType,
            typename... Methods,
            typename ThenValueType = ThenValue<ThisType*, Methods...>,
            typename ReturnType = ThenCommand<ThenValueType>>
   ReturnType Then(AbstractThread* aResponseThread,