Backed out changeset 2f0e513820c0 (bug 1358697) for build bustage
authorIris Hsiao <ihsiao@mozilla.com>
Tue, 25 Apr 2017 10:04:11 +0800
changeset 354718 1b60cc98d34fd9b7443c6e8ac71ebf0085776043
parent 354717 9be73bee2f91dc41116caad6d29341b66f0d21b2
child 354719 1163b1091f35b5e5ffff15233a6bf8a71c4a8984
push id31711
push usercbook@mozilla.com
push dateTue, 25 Apr 2017 09:24:00 +0000
treeherdermozilla-central@a30dc237c3a6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1358697
milestone55.0a1
backs out2f0e513820c08f6d1df62f96e435e80de20e38cc
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
Backed out changeset 2f0e513820c0 (bug 1358697) for build bustage
ipc/glue/MessageChannel.cpp
ipc/glue/MessageChannel.h
ipc/ipdl/test/cxx/TestAsyncReturns.cpp
--- a/ipc/glue/MessageChannel.cpp
+++ b/ipc/glue/MessageChannel.cpp
@@ -712,17 +712,17 @@ MessageChannel::Clear()
     }
 
     if (mWorkerLoop) {
         mWorkerLoop->RemoveDestructionObserver(this);
     }
 
     gUnresolvedPromises -= mPendingPromises.size();
     for (auto& pair : mPendingPromises) {
-        pair.second.mRejectFunction(pair.second.mPromise, __func__);
+        pair.second.mRejectFunction(__func__);
     }
     mPendingPromises.clear();
 
     mWorkerLoop = nullptr;
     delete mLink;
     mLink = nullptr;
 
     mOnChannelConnectedTask->Cancel();
--- a/ipc/glue/MessageChannel.h
+++ b/ipc/glue/MessageChannel.h
@@ -93,17 +93,17 @@ class MessageChannel : HasResultCodes, M
     class CxxStackFrame;
     class InterruptFrame;
 
     typedef mozilla::Monitor Monitor;
 
     struct PromiseHolder
     {
         RefPtr<MozPromiseRefcountable> mPromise;
-        std::function<void(MozPromiseRefcountable*, const char*)> mRejectFunction;
+        std::function<void(const char*)> mRejectFunction;
     };
     static Atomic<size_t> gUnresolvedPromises;
     friend class PromiseReporter;
 
   public:
     static const int32_t kNoTimeout;
 
     typedef IPC::Message Message;
@@ -181,20 +181,18 @@ class MessageChannel : HasResultCodes, M
     bool Send(Message* aMsg, Promise* aPromise) {
         int32_t seqno = NextSeqno();
         aMsg->set_seqno(seqno);
         if (!Send(aMsg)) {
             return false;
         }
         PromiseHolder holder;
         holder.mPromise = aPromise;
-        holder.mRejectFunction = [](MozPromiseRefcountable* aPromise,
-                                    const char* aRejectSite) {
-            static_cast<Promise*>(aPromise)->Reject(
-                PromiseRejectReason::ChannelClosed, aRejectSite);
+        holder.mRejectFunction = [aPromise](const char* aRejectSite) {
+            aPromise->Reject(PromiseRejectReason::ChannelClosed, aRejectSite);
         };
         mPendingPromises.insert(std::make_pair(seqno, Move(holder)));
         gUnresolvedPromises++;
         return true;
     }
 
     void SendBuildID();
 
--- a/ipc/ipdl/test/cxx/TestAsyncReturns.cpp
+++ b/ipc/ipdl/test/cxx/TestAsyncReturns.cpp
@@ -1,14 +1,12 @@
 #include "TestAsyncReturns.h"
 
 #include "IPDLUnitTests.h"      // fail etc.
 
-#include "mozilla/Unused.h"
-
 namespace mozilla {
 namespace _ipdltest {
 
 static uint32_t sMagic1 = 0x105b59fb;
 static uint32_t sMagic2 = 0x09b6f5e3;
 
 //-----------------------------------------------------------------------------
 // parent
@@ -76,17 +74,17 @@ TestAsyncReturnsChild::~TestAsyncReturns
 {
   MOZ_COUNT_DTOR(TestAsyncReturnsChild);
 }
 
 mozilla::ipc::IPCResult
 TestAsyncReturnsChild::RecvNoReturn(RefPtr<NoReturnPromise>&& aPromise)
 {
   // Leak the promise intentionally
-  Unused << do_AddRef(aPromise);
+  aPromise->AddRef();
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
 TestAsyncReturnsChild::RecvPing(RefPtr<PingPromise>&& aPromise)
 {
   if (!AbstractThread::GetCurrent()) {
     fail("AbstractThread not initalized");