зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 3 changesets (bug 1539498, bug 1545196) for build bustages failures in DOMTypes.h on a CLOSED TREE
Backed out changeset 0f906da3634a (bug 1539498) Backed out changeset ccc2f1aad57a (bug 1545196) Backed out changeset 15e8d9547568 (bug 1545196)
This commit is contained in:
Родитель
d83b12a77d
Коммит
3e5b57f2d3
|
@ -24,27 +24,6 @@ namespace {
|
|||
|
||||
BroadcastChannelService* sInstance = nullptr;
|
||||
|
||||
ClonedMessageData CloneClonedMessageData(const ClonedMessageData& aOther) {
|
||||
auto cloneData = SerializedStructuredCloneBuffer{};
|
||||
cloneData.data.initScope(aOther.data().data.scope());
|
||||
const bool res = cloneData.data.Append(aOther.data().data);
|
||||
MOZ_RELEASE_ASSERT(res, "out of memory");
|
||||
return {std::move(cloneData), aOther.blobs(), aOther.inputStreams(),
|
||||
aOther.identifiers()};
|
||||
}
|
||||
|
||||
MessageData CloneMessageData(const MessageData& aOther) {
|
||||
switch (aOther.data().type()) {
|
||||
case MessageDataType::TClonedMessageData:
|
||||
return {aOther.agentClusterId(),
|
||||
CloneClonedMessageData(aOther.data().get_ClonedMessageData())};
|
||||
case MessageDataType::TRefMessageData:
|
||||
return {aOther.agentClusterId(), aOther.data().get_RefMessageData()};
|
||||
default:
|
||||
MOZ_CRASH("Unexpected MessageDataType type");
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
BroadcastChannelService::BroadcastChannelService() {
|
||||
|
@ -148,7 +127,7 @@ void BroadcastChannelService::PostMessage(BroadcastChannelParent* aParent,
|
|||
}
|
||||
|
||||
// We need to have a copy of the data for this parent.
|
||||
MessageData newData = CloneMessageData(aData);
|
||||
MessageData newData(aData);
|
||||
MOZ_ASSERT(newData.data().type() == aData.data().type());
|
||||
|
||||
if (!blobImpls.IsEmpty()) {
|
||||
|
|
|
@ -10,6 +10,7 @@ include protocol PParentToChildStream; // FIXME: bug 792908
|
|||
|
||||
include DOMTypes;
|
||||
|
||||
using struct mozilla::SerializedStructuredCloneBuffer from "ipc/IPCMessageUtils.h";
|
||||
using struct nsID from "nsID.h";
|
||||
|
||||
namespace mozilla {
|
||||
|
|
|
@ -42,7 +42,7 @@ void ClientHandle::StartOp(const ClientOpConstructorArgs& aArgs,
|
|||
RefPtr<ClientHandle> kungFuGrip = this;
|
||||
|
||||
MaybeExecute(
|
||||
[&aArgs, kungFuGrip, aRejectCallback,
|
||||
[aArgs, kungFuGrip, aRejectCallback,
|
||||
resolve = std::move(aResolveCallback)](ClientHandleChild* aActor) {
|
||||
MOZ_DIAGNOSTIC_ASSERT(aActor);
|
||||
ClientHandleOpChild* actor = new ClientHandleOpChild(
|
||||
|
@ -159,7 +159,7 @@ RefPtr<GenericPromise> ClientHandle::PostMessage(
|
|||
new GenericPromise::Private(__func__);
|
||||
|
||||
StartOp(
|
||||
std::move(args),
|
||||
args,
|
||||
[outerPromise](const ClientOpResult& aResult) {
|
||||
outerPromise->Resolve(true, __func__);
|
||||
},
|
||||
|
|
|
@ -23,12 +23,12 @@ void ClientHandleOpParent::ActorDestroy(ActorDestroyReason aReason) {
|
|||
mSourcePromiseRequestHolder.DisconnectIfExists();
|
||||
}
|
||||
|
||||
void ClientHandleOpParent::Init(ClientOpConstructorArgs&& aArgs) {
|
||||
void ClientHandleOpParent::Init(const ClientOpConstructorArgs& aArgs) {
|
||||
auto handle = static_cast<ClientHandleParent*>(Manager());
|
||||
handle->EnsureSource()
|
||||
->Then(
|
||||
GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[this, args = std::move(aArgs)](ClientSourceParent* source) mutable {
|
||||
[=](ClientSourceParent* source) {
|
||||
mSourcePromiseRequestHolder.Complete();
|
||||
RefPtr<ClientOpPromise> p;
|
||||
|
||||
|
@ -36,10 +36,10 @@ void ClientHandleOpParent::Init(ClientOpConstructorArgs&& aArgs) {
|
|||
// can't just forward the args from one PBackground manager to
|
||||
// another. Instead, unpack the structured clone data and repack
|
||||
// it into a new set of arguments.
|
||||
if (args.type() ==
|
||||
if (aArgs.type() ==
|
||||
ClientOpConstructorArgs::TClientPostMessageArgs) {
|
||||
const ClientPostMessageArgs& orig =
|
||||
args.get_ClientPostMessageArgs();
|
||||
aArgs.get_ClientPostMessageArgs();
|
||||
|
||||
ClientPostMessageArgs rebuild;
|
||||
rebuild.serviceWorker() = orig.serviceWorker();
|
||||
|
@ -54,12 +54,12 @@ void ClientHandleOpParent::Init(ClientOpConstructorArgs&& aArgs) {
|
|||
return;
|
||||
}
|
||||
|
||||
p = source->StartOp(std::move(rebuild));
|
||||
p = source->StartOp(rebuild);
|
||||
}
|
||||
|
||||
// Other argument types can just be forwarded straight through.
|
||||
else {
|
||||
p = source->StartOp(std::move(args));
|
||||
p = source->StartOp(aArgs);
|
||||
}
|
||||
|
||||
// Capturing 'this' is safe here because we disconnect the promise
|
||||
|
|
|
@ -28,7 +28,7 @@ class ClientHandleOpParent final : public PClientHandleOpParent {
|
|||
ClientHandleOpParent() = default;
|
||||
~ClientHandleOpParent() = default;
|
||||
|
||||
void Init(ClientOpConstructorArgs&& aArgs);
|
||||
void Init(const ClientOpConstructorArgs& aArgs);
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -49,7 +49,7 @@ bool ClientHandleParent::DeallocPClientHandleOpParent(
|
|||
IPCResult ClientHandleParent::RecvPClientHandleOpConstructor(
|
||||
PClientHandleOpParent* aActor, const ClientOpConstructorArgs& aArgs) {
|
||||
auto actor = static_cast<ClientHandleOpParent*>(aActor);
|
||||
actor->Init(std::move(const_cast<ClientOpConstructorArgs&>(aArgs)));
|
||||
actor->Init(aArgs);
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
|
|
|
@ -181,7 +181,7 @@ RefPtr<ClientOpPromise> ClientManager::StartOp(
|
|||
RefPtr<ClientManager> kungFuGrip = this;
|
||||
|
||||
MaybeExecute(
|
||||
[&aArgs, promise, kungFuGrip](ClientManagerChild* aActor) {
|
||||
[aArgs, promise, kungFuGrip](ClientManagerChild* aActor) {
|
||||
ClientManagerOpChild* actor =
|
||||
new ClientManagerOpChild(kungFuGrip, aArgs, promise);
|
||||
if (!aActor->SendPClientManagerOpConstructor(actor, aArgs)) {
|
||||
|
|
|
@ -43,9 +43,9 @@ IPCResult ClientSourceOpParent::Recv__delete__(const ClientOpResult& aResult) {
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
ClientSourceOpParent::ClientSourceOpParent(ClientOpConstructorArgs&& aArgs,
|
||||
ClientSourceOpParent::ClientSourceOpParent(const ClientOpConstructorArgs& aArgs,
|
||||
ClientOpPromise::Private* aPromise)
|
||||
: mArgs(std::move(aArgs)), mPromise(aPromise) {
|
||||
: mArgs(aArgs), mPromise(aPromise) {
|
||||
MOZ_DIAGNOSTIC_ASSERT(mPromise);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,11 +23,9 @@ class ClientSourceOpParent final : public PClientSourceOpParent {
|
|||
const ClientOpResult& aResult) override;
|
||||
|
||||
public:
|
||||
ClientSourceOpParent(ClientOpConstructorArgs&& aArgs,
|
||||
ClientSourceOpParent(const ClientOpConstructorArgs& aArgs,
|
||||
ClientOpPromise::Private* aPromise);
|
||||
|
||||
const ClientOpConstructorArgs& Args() const { return mArgs; }
|
||||
|
||||
~ClientSourceOpParent();
|
||||
};
|
||||
|
||||
|
|
|
@ -269,7 +269,7 @@ void ClientSourceParent::DetachHandle(ClientHandleParent* aClientHandle) {
|
|||
}
|
||||
|
||||
RefPtr<ClientOpPromise> ClientSourceParent::StartOp(
|
||||
ClientOpConstructorArgs&& aArgs) {
|
||||
const ClientOpConstructorArgs& aArgs) {
|
||||
RefPtr<ClientOpPromise::Private> promise =
|
||||
new ClientOpPromise::Private(__func__);
|
||||
|
||||
|
@ -285,9 +285,8 @@ RefPtr<ClientOpPromise> ClientSourceParent::StartOp(
|
|||
}
|
||||
|
||||
// Constructor failure will reject the promise via ActorDestroy().
|
||||
ClientSourceOpParent* actor =
|
||||
new ClientSourceOpParent(std::move(aArgs), promise);
|
||||
Unused << SendPClientSourceOpConstructor(actor, actor->Args());
|
||||
ClientSourceOpParent* actor = new ClientSourceOpParent(aArgs, promise);
|
||||
Unused << SendPClientSourceOpConstructor(actor, aArgs);
|
||||
|
||||
return promise.forget();
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ class ClientSourceParent final : public PClientSourceParent {
|
|||
|
||||
void DetachHandle(ClientHandleParent* aClientSource);
|
||||
|
||||
RefPtr<ClientOpPromise> StartOp(ClientOpConstructorArgs&& aArgs);
|
||||
RefPtr<ClientOpPromise> StartOp(const ClientOpConstructorArgs& aArgs);
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -6433,7 +6433,7 @@ class TransactionBase {
|
|||
CommitOrAbort();
|
||||
}
|
||||
|
||||
PBackgroundIDBRequestParent* AllocRequest(RequestParams&& aParams,
|
||||
PBackgroundIDBRequestParent* AllocRequest(const RequestParams& aParams,
|
||||
bool aTrustParams);
|
||||
|
||||
bool StartRequest(PBackgroundIDBRequestParent* aActor);
|
||||
|
@ -7415,7 +7415,7 @@ class ObjectStoreAddOrPutRequestOp final : public NormalTransactionOp {
|
|||
private:
|
||||
// Only created by TransactionBase.
|
||||
ObjectStoreAddOrPutRequestOp(RefPtr<TransactionBase> aTransaction,
|
||||
RequestParams&& aParams);
|
||||
const RequestParams& aParams);
|
||||
|
||||
~ObjectStoreAddOrPutRequestOp() override = default;
|
||||
|
||||
|
@ -14658,7 +14658,7 @@ void TransactionBase::Invalidate() {
|
|||
}
|
||||
|
||||
PBackgroundIDBRequestParent* TransactionBase::AllocRequest(
|
||||
RequestParams&& aParams, bool aTrustParams) {
|
||||
const RequestParams& aParams, bool aTrustParams) {
|
||||
AssertIsOnBackgroundThread();
|
||||
MOZ_ASSERT(aParams.type() != RequestParams::T__None);
|
||||
|
||||
|
@ -14682,7 +14682,7 @@ PBackgroundIDBRequestParent* TransactionBase::AllocRequest(
|
|||
switch (aParams.type()) {
|
||||
case RequestParams::TObjectStoreAddParams:
|
||||
case RequestParams::TObjectStorePutParams:
|
||||
actor = new ObjectStoreAddOrPutRequestOp(this, std::move(aParams));
|
||||
actor = new ObjectStoreAddOrPutRequestOp(this, aParams);
|
||||
break;
|
||||
|
||||
case RequestParams::TObjectStoreGetParams:
|
||||
|
@ -14958,8 +14958,7 @@ NormalTransaction::AllocPBackgroundIDBRequestParent(
|
|||
AssertIsOnBackgroundThread();
|
||||
MOZ_ASSERT(aParams.type() != RequestParams::T__None);
|
||||
|
||||
return AllocRequest(std::move(const_cast<RequestParams&>(aParams)),
|
||||
IsSameProcessActor());
|
||||
return AllocRequest(aParams, IsSameProcessActor());
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult NormalTransaction::RecvPBackgroundIDBRequestConstructor(
|
||||
|
@ -15592,8 +15591,7 @@ VersionChangeTransaction::AllocPBackgroundIDBRequestParent(
|
|||
AssertIsOnBackgroundThread();
|
||||
MOZ_ASSERT(aParams.type() != RequestParams::T__None);
|
||||
|
||||
return AllocRequest(std::move(const_cast<RequestParams&>(aParams)),
|
||||
IsSameProcessActor());
|
||||
return AllocRequest(aParams, IsSameProcessActor());
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
|
@ -24704,12 +24702,11 @@ mozilla::ipc::IPCResult NormalTransactionOp::RecvContinue(
|
|||
}
|
||||
|
||||
ObjectStoreAddOrPutRequestOp::ObjectStoreAddOrPutRequestOp(
|
||||
RefPtr<TransactionBase> aTransaction, RequestParams&& aParams)
|
||||
RefPtr<TransactionBase> aTransaction, const RequestParams& aParams)
|
||||
: NormalTransactionOp(std::move(aTransaction)),
|
||||
mParams(
|
||||
std::move(aParams.type() == RequestParams::TObjectStoreAddParams
|
||||
? aParams.get_ObjectStoreAddParams().commonParams()
|
||||
: aParams.get_ObjectStorePutParams().commonParams())),
|
||||
mParams(aParams.type() == RequestParams::TObjectStoreAddParams
|
||||
? aParams.get_ObjectStoreAddParams().commonParams()
|
||||
: aParams.get_ObjectStorePutParams().commonParams()),
|
||||
mGroup(Transaction().GetDatabase()->Group()),
|
||||
mOrigin(Transaction().GetDatabase()->Origin()),
|
||||
mPersistenceType(Transaction().GetDatabase()->Type()),
|
||||
|
|
|
@ -1650,9 +1650,9 @@ RefPtr<IDBRequest> IDBObjectStore::AddOrPut(JSContext* aCx,
|
|||
commonParams.fileAddInfos().SwapElements(fileAddInfos);
|
||||
}
|
||||
|
||||
const auto& params =
|
||||
aOverwrite ? RequestParams{ObjectStorePutParams(std::move(commonParams))}
|
||||
: RequestParams{ObjectStoreAddParams(std::move(commonParams))};
|
||||
const auto& params = aOverwrite
|
||||
? RequestParams{ObjectStorePutParams(commonParams)}
|
||||
: RequestParams{ObjectStoreAddParams(commonParams)};
|
||||
|
||||
auto request = GenerateRequest(aCx, this);
|
||||
MOZ_ASSERT(request);
|
||||
|
|
|
@ -37,7 +37,7 @@ using class mozilla::dom::indexedDB::KeyPath
|
|||
using mozilla::dom::quota::PersistenceType
|
||||
from "mozilla/dom/quota/PersistenceType.h";
|
||||
|
||||
using moveonly mozilla::SerializedStructuredCloneBuffer
|
||||
using mozilla::SerializedStructuredCloneBuffer
|
||||
from "ipc/IPCMessageUtils.h";
|
||||
|
||||
namespace mozilla {
|
||||
|
|
|
@ -17,7 +17,7 @@ include protocol PSHEntry;
|
|||
using struct mozilla::void_t
|
||||
from "ipc/IPCMessageUtils.h";
|
||||
|
||||
using moveonly struct mozilla::SerializedStructuredCloneBuffer
|
||||
using struct mozilla::SerializedStructuredCloneBuffer
|
||||
from "ipc/IPCMessageUtils.h";
|
||||
|
||||
using LayoutDeviceIntRect from "Units.h";
|
||||
|
|
|
@ -122,7 +122,7 @@ void SharedMessageBody::FromSharedToMessageChild(
|
|||
ClonedMessageData clonedData;
|
||||
aData->mCloneData->BuildClonedMessageDataForBackgroundChild(aManager,
|
||||
clonedData);
|
||||
aMessage.data() = std::move(clonedData);
|
||||
aMessage.data() = clonedData;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -227,7 +227,7 @@ bool SharedMessageBody::FromSharedToMessagesParent(
|
|||
ClonedMessageData clonedData;
|
||||
data->mCloneData->BuildClonedMessageDataForBackgroundParent(aManager,
|
||||
clonedData);
|
||||
message->data() = std::move(clonedData);
|
||||
message->data() = clonedData;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,9 @@ include protocol PParentToChildStream; // FIXME: bug 792908
|
|||
include DOMTypes;
|
||||
include ProtocolTypes;
|
||||
|
||||
using struct mozilla::SerializedStructuredCloneBuffer
|
||||
from "ipc/IPCMessageUtils.h";
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
|
|
|
@ -388,9 +388,9 @@ bool ServiceWorkerOp::MaybeStart(RemoteWorkerChild* aOwner,
|
|||
void ServiceWorkerOp::Cancel() { RejectAll(NS_ERROR_DOM_ABORT_ERR); }
|
||||
|
||||
ServiceWorkerOp::ServiceWorkerOp(
|
||||
ServiceWorkerOpArgs&& aArgs,
|
||||
const ServiceWorkerOpArgs& aArgs,
|
||||
std::function<void(const ServiceWorkerOpResult&)>&& aCallback)
|
||||
: mArgs(std::move(aArgs)) {
|
||||
: mArgs(aArgs) {
|
||||
MOZ_ASSERT(RemoteWorkerService::Thread()->IsOnCurrentThread());
|
||||
|
||||
RefPtr<ServiceWorkerOpPromise> promise = mPromiseHolder.Ensure(__func__);
|
||||
|
@ -931,9 +931,9 @@ class MessageEventOp final : public ExtendableEventOp {
|
|||
public:
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MessageEventOp, override)
|
||||
|
||||
MessageEventOp(ServiceWorkerOpArgs&& aArgs,
|
||||
MessageEventOp(const ServiceWorkerOpArgs& aArgs,
|
||||
std::function<void(const ServiceWorkerOpResult&)>&& aCallback)
|
||||
: ExtendableEventOp(std::move(aArgs), std::move(aCallback)),
|
||||
: ExtendableEventOp(aArgs, std::move(aCallback)),
|
||||
mData(new ServiceWorkerCloneData()) {
|
||||
mData->CopyFromClonedMessageDataForBackgroundChild(
|
||||
mArgs.get_ServiceWorkerMessageEventOpArgs().clonedData());
|
||||
|
@ -1633,7 +1633,7 @@ nsresult FetchEventOp::DispatchFetchEvent(JSContext* aCx,
|
|||
}
|
||||
|
||||
/* static */ already_AddRefed<ServiceWorkerOp> ServiceWorkerOp::Create(
|
||||
ServiceWorkerOpArgs&& aArgs,
|
||||
const ServiceWorkerOpArgs& aArgs,
|
||||
std::function<void(const ServiceWorkerOpResult&)>&& aCallback) {
|
||||
MOZ_ASSERT(RemoteWorkerService::Thread()->IsOnCurrentThread());
|
||||
|
||||
|
@ -1641,36 +1641,32 @@ nsresult FetchEventOp::DispatchFetchEvent(JSContext* aCx,
|
|||
|
||||
switch (aArgs.type()) {
|
||||
case ServiceWorkerOpArgs::TServiceWorkerCheckScriptEvaluationOpArgs:
|
||||
op = MakeRefPtr<CheckScriptEvaluationOp>(std::move(aArgs),
|
||||
std::move(aCallback));
|
||||
op = MakeRefPtr<CheckScriptEvaluationOp>(aArgs, std::move(aCallback));
|
||||
break;
|
||||
case ServiceWorkerOpArgs::TServiceWorkerUpdateStateOpArgs:
|
||||
op = MakeRefPtr<UpdateServiceWorkerStateOp>(std::move(aArgs),
|
||||
std::move(aCallback));
|
||||
op = MakeRefPtr<UpdateServiceWorkerStateOp>(aArgs, std::move(aCallback));
|
||||
break;
|
||||
case ServiceWorkerOpArgs::TServiceWorkerTerminateWorkerOpArgs:
|
||||
op = MakeRefPtr<TerminateServiceWorkerOp>(std::move(aArgs),
|
||||
std::move(aCallback));
|
||||
op = MakeRefPtr<TerminateServiceWorkerOp>(aArgs, std::move(aCallback));
|
||||
break;
|
||||
case ServiceWorkerOpArgs::TServiceWorkerLifeCycleEventOpArgs:
|
||||
op = MakeRefPtr<LifeCycleEventOp>(std::move(aArgs), std::move(aCallback));
|
||||
op = MakeRefPtr<LifeCycleEventOp>(aArgs, std::move(aCallback));
|
||||
break;
|
||||
case ServiceWorkerOpArgs::TServiceWorkerPushEventOpArgs:
|
||||
op = MakeRefPtr<PushEventOp>(std::move(aArgs), std::move(aCallback));
|
||||
op = MakeRefPtr<PushEventOp>(aArgs, std::move(aCallback));
|
||||
break;
|
||||
case ServiceWorkerOpArgs::TServiceWorkerPushSubscriptionChangeEventOpArgs:
|
||||
op = MakeRefPtr<PushSubscriptionChangeEventOp>(std::move(aArgs),
|
||||
op = MakeRefPtr<PushSubscriptionChangeEventOp>(aArgs,
|
||||
std::move(aCallback));
|
||||
break;
|
||||
case ServiceWorkerOpArgs::TServiceWorkerNotificationEventOpArgs:
|
||||
op = MakeRefPtr<NotificationEventOp>(std::move(aArgs),
|
||||
std::move(aCallback));
|
||||
op = MakeRefPtr<NotificationEventOp>(aArgs, std::move(aCallback));
|
||||
break;
|
||||
case ServiceWorkerOpArgs::TServiceWorkerMessageEventOpArgs:
|
||||
op = MakeRefPtr<MessageEventOp>(std::move(aArgs), std::move(aCallback));
|
||||
op = MakeRefPtr<MessageEventOp>(aArgs, std::move(aCallback));
|
||||
break;
|
||||
case ServiceWorkerOpArgs::TServiceWorkerFetchEventOpArgs:
|
||||
op = MakeRefPtr<FetchEventOp>(std::move(aArgs), std::move(aCallback));
|
||||
op = MakeRefPtr<FetchEventOp>(aArgs, std::move(aCallback));
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("Unknown Service Worker operation!");
|
||||
|
|
|
@ -30,11 +30,11 @@ class ServiceWorkerOp : public RemoteWorkerChild::Op {
|
|||
public:
|
||||
// `aCallback` will be called when the operation completes or is canceled.
|
||||
static already_AddRefed<ServiceWorkerOp> Create(
|
||||
ServiceWorkerOpArgs&& aArgs,
|
||||
const ServiceWorkerOpArgs& aArgs,
|
||||
std::function<void(const ServiceWorkerOpResult&)>&& aCallback);
|
||||
|
||||
ServiceWorkerOp(
|
||||
ServiceWorkerOpArgs&& aArgs,
|
||||
const ServiceWorkerOpArgs& aArgs,
|
||||
std::function<void(const ServiceWorkerOpResult&)>&& aCallback);
|
||||
|
||||
ServiceWorkerOp(const ServiceWorkerOp&) = delete;
|
||||
|
|
|
@ -997,7 +997,7 @@ IPCResult RemoteWorkerChild::RecvExecServiceWorkerOp(
|
|||
|
||||
MaybeReportServiceWorkerShutdownProgress(aArgs);
|
||||
|
||||
MaybeStartOp(ServiceWorkerOp::Create(std::move(aArgs), std::move(aResolve)));
|
||||
MaybeStartOp(ServiceWorkerOp::Create(aArgs, std::move(aResolve)));
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
|
|
|
@ -434,21 +434,6 @@ bool RemoteWorkerController::PendingServiceWorkerOp::MaybeStart(
|
|||
return false;
|
||||
}
|
||||
|
||||
const auto send = [this, &aOwner](const ServiceWorkerOpArgs& args) {
|
||||
aOwner->mActor->SendExecServiceWorkerOp(args)->Then(
|
||||
GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[promise = std::move(mPromise)](
|
||||
PRemoteWorkerParent::ExecServiceWorkerOpPromise::
|
||||
ResolveOrRejectValue&& aResult) {
|
||||
if (NS_WARN_IF(aResult.IsReject())) {
|
||||
promise->Reject(NS_ERROR_DOM_ABORT_ERR, __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
promise->Resolve(std::move(aResult.ResolveValue()), __func__);
|
||||
});
|
||||
};
|
||||
|
||||
if (mArgs.type() == ServiceWorkerOpArgs::TServiceWorkerMessageEventOpArgs) {
|
||||
auto& args = mArgs.get_ServiceWorkerMessageEventOpArgs();
|
||||
|
||||
|
@ -465,13 +450,22 @@ bool RemoteWorkerController::PendingServiceWorkerOp::MaybeStart(
|
|||
return true;
|
||||
}
|
||||
|
||||
// copyArgs depends on mArgs due to
|
||||
// BuildClonedMessageDataForBackgroundParent.
|
||||
send(std::move(copyArgs));
|
||||
} else {
|
||||
send(mArgs);
|
||||
mArgs = std::move(copyArgs);
|
||||
}
|
||||
|
||||
aOwner->mActor->SendExecServiceWorkerOp(mArgs)->Then(
|
||||
GetCurrentThreadSerialEventTarget(), __func__,
|
||||
[promise = std::move(mPromise)](
|
||||
PRemoteWorkerParent::ExecServiceWorkerOpPromise::
|
||||
ResolveOrRejectValue&& aResult) {
|
||||
if (NS_WARN_IF(aResult.IsReject())) {
|
||||
promise->Reject(NS_ERROR_DOM_ABORT_ERR, __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
promise->Resolve(std::move(aResult.ResolveValue()), __func__);
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -78,15 +78,18 @@ struct SerializedStructuredCloneBuffer final {
|
|||
SerializedStructuredCloneBuffer()
|
||||
: data(JS::StructuredCloneScope::Unassigned) {}
|
||||
|
||||
SerializedStructuredCloneBuffer(SerializedStructuredCloneBuffer&&) noexcept =
|
||||
default;
|
||||
SerializedStructuredCloneBuffer& operator=(
|
||||
SerializedStructuredCloneBuffer&&) noexcept = default;
|
||||
SerializedStructuredCloneBuffer(const SerializedStructuredCloneBuffer& aOther)
|
||||
: SerializedStructuredCloneBuffer() {
|
||||
*this = aOther;
|
||||
}
|
||||
|
||||
SerializedStructuredCloneBuffer(const SerializedStructuredCloneBuffer&) =
|
||||
delete;
|
||||
SerializedStructuredCloneBuffer& operator=(
|
||||
const SerializedStructuredCloneBuffer& aOther) = delete;
|
||||
const SerializedStructuredCloneBuffer& aOther) {
|
||||
data.Clear();
|
||||
data.initScope(aOther.data.scope());
|
||||
MOZ_RELEASE_ASSERT(data.Append(aOther.data), "out of memory");
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool operator==(const SerializedStructuredCloneBuffer& aOther) const {
|
||||
// The copy assignment operator and the equality operator are
|
||||
|
|
|
@ -585,7 +585,6 @@ def _cxxConstRefType(ipdltype, side):
|
|||
t.ref = True
|
||||
return t
|
||||
if ipdltype.isCxx() and ipdltype.isMoveonly():
|
||||
t.const = True
|
||||
t.ref = True
|
||||
return t
|
||||
if ipdltype.isCxx() and ipdltype.isRefcounted():
|
||||
|
|
Загрузка…
Ссылка в новой задаче