зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 2f0e513820c0 (bug 1358697) for build bustage
This commit is contained in:
Родитель
c32b6bb66b
Коммит
d838010e1d
|
@ -717,7 +717,7 @@ MessageChannel::Clear()
|
|||
|
||||
gUnresolvedPromises -= mPendingPromises.size();
|
||||
for (auto& pair : mPendingPromises) {
|
||||
pair.second.mRejectFunction(pair.second.mPromise, __func__);
|
||||
pair.second.mRejectFunction(__func__);
|
||||
}
|
||||
mPendingPromises.clear();
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ class MessageChannel : HasResultCodes, MessageLoop::DestructionObserver
|
|||
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;
|
||||
|
@ -186,10 +186,8 @@ class MessageChannel : HasResultCodes, MessageLoop::DestructionObserver
|
|||
}
|
||||
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++;
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
#include "IPDLUnitTests.h" // fail etc.
|
||||
|
||||
#include "mozilla/Unused.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace _ipdltest {
|
||||
|
||||
|
@ -81,7 +79,7 @@ mozilla::ipc::IPCResult
|
|||
TestAsyncReturnsChild::RecvNoReturn(RefPtr<NoReturnPromise>&& aPromise)
|
||||
{
|
||||
// Leak the promise intentionally
|
||||
Unused << do_AddRef(aPromise);
|
||||
aPromise->AddRef();
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче