// // Automatically generated by ipdlc. // Edit at your own risk // #include "mozilla/dom/PCookieStoreChild.h" #include "ipc/IPCMessageUtils.h" #include "mozilla/ProfilerLabels.h" #include "mozilla/dom/CookieStoreChild.h" #include "mozilla/dom/DomSecurityIPCUtils.h" #include "mozilla/ipc/IPCCore.h" #include "mozilla/ipc/URIUtils.h" #include "nsID.h" #include "mozilla/ipc/PBackgroundChild.h" #include "ipc/IPCMessageUtils.h" #include "ipc/IPCMessageUtilsSpecializations.h" #include "nsIFile.h" #include "mozilla/ipc/Endpoint.h" #include "mozilla/ipc/ProtocolMessageUtils.h" #include "mozilla/ipc/ProtocolUtils.h" #include "mozilla/ipc/ShmemMessageUtils.h" #include "mozilla/ipc/TaintingIPCUtils.h" namespace mozilla { namespace dom { auto PCookieStoreChild::Recv__delete__() -> mozilla::ipc::IPCResult { return IPC_OK(); } MOZ_IMPLICIT PCookieStoreChild::PCookieStoreChild() : mozilla::ipc::IProtocol(kProtocolId, mozilla::ipc::ChildSide) { MOZ_COUNT_CTOR(PCookieStoreChild); } PCookieStoreChild::~PCookieStoreChild() { MOZ_COUNT_DTOR(PCookieStoreChild); } auto PCookieStoreChild::ActorAlloc() -> void { } auto PCookieStoreChild::ActorDealloc() -> void { if (Manager()) { Manager()->DeallocManagee(kProtocolId, this); } } auto PCookieStoreChild::OtherPid() const -> ::base::ProcessId { ::base::ProcessId pid = ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid(); MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId); return pid; } auto PCookieStoreChild::OtherChildID() const -> ::GeckoChildID { ::GeckoChildID childID = ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherChildIDMaybeInvalid(); MOZ_RELEASE_ASSERT(childID != -1); return childID; } auto PCookieStoreChild::OtherEndpointProcInfo() const -> ::mozilla::ipc::EndpointProcInfo { return ::mozilla::ipc::EndpointProcInfo{OtherPid(), OtherChildID()}; } auto PCookieStoreChild::Manager() const -> PBackgroundChild* { return static_cast(IProtocol::Manager()); } auto PCookieStoreChild::ManagedProtocolIds() const -> mozilla::Span { return {}; } auto PCookieStoreChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer* { switch (aProtocol) { default: return nullptr; } } auto PCookieStoreChild::RejectPendingResponses(ResponseRejectReason aReason) -> void { mAsyncCallbacks.RejectPendingResponses(aReason); } auto PCookieStoreChild::SendGetRequest( mozilla::NotNull cookieURI, const OriginAttributes& attrs, const mozilla::Maybe& partitionedAttrs, const bool& thirdPartyContext, const bool& partitionForeign, const bool& usingStorageAccess, const bool& isOn3PCBExceptionList, const bool& matchName, const nsAString& name, const nsACString& path, const bool& onlyFirstMatch, mozilla::ipc::ResolveCallback>&& aResolve, mozilla::ipc::RejectCallback&& aReject) -> void { UniquePtr msg__ = PCookieStore::Msg_GetRequest(Id()); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), cookieURI); // Sentinel = 'cookieURI' ((&(writer__)))->WriteSentinel(303301483); IPC::WriteParam((&(writer__)), attrs); // Sentinel = 'attrs' ((&(writer__)))->WriteSentinel(107807279); IPC::WriteParam((&(writer__)), partitionedAttrs); // Sentinel = 'partitionedAttrs' ((&(writer__)))->WriteSentinel(958072498); IPC::WriteParam((&(writer__)), thirdPartyContext); // Sentinel = 'thirdPartyContext' ((&(writer__)))->WriteSentinel(1055852305); IPC::WriteParam((&(writer__)), partitionForeign); // Sentinel = 'partitionForeign' ((&(writer__)))->WriteSentinel(956368549); IPC::WriteParam((&(writer__)), usingStorageAccess); // Sentinel = 'usingStorageAccess' ((&(writer__)))->WriteSentinel(1180698446); IPC::WriteParam((&(writer__)), isOn3PCBExceptionList); // Sentinel = 'isOn3PCBExceptionList' ((&(writer__)))->WriteSentinel(1400571885); IPC::WriteParam((&(writer__)), matchName); // Sentinel = 'matchName' ((&(writer__)))->WriteSentinel(302384015); IPC::WriteParam((&(writer__)), name); // Sentinel = 'name' ((&(writer__)))->WriteSentinel(69075362); IPC::WriteParam((&(writer__)), path); // Sentinel = 'path' ((&(writer__)))->WriteSentinel(70713774); IPC::WriteParam((&(writer__)), onlyFirstMatch); // Sentinel = 'onlyFirstMatch' ((&(writer__)))->WriteSentinel(727844280); if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PCookieStoreChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PCookieStore::Msg_GetRequest", OTHER); IPC::Message::seqno_t seqno__ = 0; if (ChannelSend(std::move(msg__), (&(seqno__)))) { mAsyncCallbacks.AddCallback(seqno__, PCookieStore::Reply_GetRequest__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable { auto maybe__data = IPC::ReadParam>(aReader); if (!maybe__data) { (aReader)->FatalError("Error deserializing 'CookieStoreGetItem[]'"); return MsgValueError; } auto& data = *maybe__data; // Sentinel = 'data' if ((!((aReader)->ReadSentinel(67109275)))) { mozilla::ipc::SentinelReadError("Error deserializing 'CookieStoreGetItem[]'"); return MsgValueError; } aReader->EndRead(); resolve(std::move(data)); return MsgProcessed; }, std::move(aReject)); } else { aReject(::mozilla::ipc::ResponseRejectReason::SendError); } return; } auto PCookieStoreChild::SendGetRequest( mozilla::NotNull cookieURI, const OriginAttributes& attrs, const mozilla::Maybe& partitionedAttrs, const bool& thirdPartyContext, const bool& partitionForeign, const bool& usingStorageAccess, const bool& isOn3PCBExceptionList, const bool& matchName, const nsAString& name, const nsACString& path, const bool& onlyFirstMatch) -> RefPtr { RefPtr, ResponseRejectReason, true>::Private> promise__ = new MozPromise, ResponseRejectReason, true>::Private(__func__); promise__->UseDirectTaskDispatch(__func__); SendGetRequest(std::forward>(cookieURI), std::forward(attrs), std::forward&>(partitionedAttrs), std::forward(thirdPartyContext), std::forward(partitionForeign), std::forward(usingStorageAccess), std::forward(isOn3PCBExceptionList), std::forward(matchName), std::forward(name), std::forward(path), std::forward(onlyFirstMatch), [promise__](nsTArray&& aValue) { promise__->Resolve(std::move(aValue), __func__); }, [promise__](ResponseRejectReason&& aReason) { promise__->Reject(std::move(aReason), __func__); }); return promise__; } auto PCookieStoreChild::SendSetRequest( mozilla::NotNull cookieURI, const OriginAttributes& attrs, const bool& thirdPartyContext, const bool& partitionForeign, const bool& usingStorageAccess, const bool& isOn3PCBExceptionList, const nsAString& name, const nsAString& value, const bool& session, const int64_t& expires, const nsAString& domain, const nsAString& path, const int32_t& sameSite, const bool& partitioned, const nsID& operationId, mozilla::ipc::ResolveCallback&& aResolve, mozilla::ipc::RejectCallback&& aReject) -> void { UniquePtr msg__ = PCookieStore::Msg_SetRequest(Id()); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), cookieURI); // Sentinel = 'cookieURI' ((&(writer__)))->WriteSentinel(303301483); IPC::WriteParam((&(writer__)), attrs); // Sentinel = 'attrs' ((&(writer__)))->WriteSentinel(107807279); IPC::WriteParam((&(writer__)), thirdPartyContext); // Sentinel = 'thirdPartyContext' ((&(writer__)))->WriteSentinel(1055852305); IPC::WriteParam((&(writer__)), partitionForeign); // Sentinel = 'partitionForeign' ((&(writer__)))->WriteSentinel(956368549); IPC::WriteParam((&(writer__)), usingStorageAccess); // Sentinel = 'usingStorageAccess' ((&(writer__)))->WriteSentinel(1180698446); IPC::WriteParam((&(writer__)), isOn3PCBExceptionList); // Sentinel = 'isOn3PCBExceptionList' ((&(writer__)))->WriteSentinel(1400571885); IPC::WriteParam((&(writer__)), name); // Sentinel = 'name' ((&(writer__)))->WriteSentinel(69075362); IPC::WriteParam((&(writer__)), value); // Sentinel = 'value' ((&(writer__)))->WriteSentinel(107610654); IPC::WriteParam((&(writer__)), session); // Sentinel = 'session' ((&(writer__)))->WriteSentinel(203162373); IPC::WriteParam((&(writer__)), expires); // Sentinel = 'expires' ((&(writer__)))->WriteSentinel(201392897); IPC::WriteParam((&(writer__)), domain); // Sentinel = 'domain' ((&(writer__)))->WriteSentinel(144704121); IPC::WriteParam((&(writer__)), path); // Sentinel = 'path' ((&(writer__)))->WriteSentinel(70713774); IPC::WriteParam((&(writer__)), sameSite); // Sentinel = 'sameSite' ((&(writer__)))->WriteSentinel(245498684); IPC::WriteParam((&(writer__)), partitioned); // Sentinel = 'partitioned' ((&(writer__)))->WriteSentinel(471794852); IPC::WriteParam((&(writer__)), operationId); // Sentinel = 'operationId' ((&(writer__)))->WriteSentinel(464847999); if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PCookieStoreChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PCookieStore::Msg_SetRequest", OTHER); IPC::Message::seqno_t seqno__ = 0; if (ChannelSend(std::move(msg__), (&(seqno__)))) { mAsyncCallbacks.AddCallback(seqno__, PCookieStore::Reply_SetRequest__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable { auto maybe__result = IPC::ReadParam(aReader); if (!maybe__result) { (aReader)->FatalError("Error deserializing 'CookieStoreResult'"); return MsgValueError; } auto& result = *maybe__result; // Sentinel = 'result' if ((!((aReader)->ReadSentinel(153223840)))) { mozilla::ipc::SentinelReadError("Error deserializing 'CookieStoreResult'"); return MsgValueError; } aReader->EndRead(); resolve(std::move(result)); return MsgProcessed; }, std::move(aReject)); } else { aReject(::mozilla::ipc::ResponseRejectReason::SendError); } return; } auto PCookieStoreChild::SendSetRequest( mozilla::NotNull cookieURI, const OriginAttributes& attrs, const bool& thirdPartyContext, const bool& partitionForeign, const bool& usingStorageAccess, const bool& isOn3PCBExceptionList, const nsAString& name, const nsAString& value, const bool& session, const int64_t& expires, const nsAString& domain, const nsAString& path, const int32_t& sameSite, const bool& partitioned, const nsID& operationId) -> RefPtr { RefPtr::Private> promise__ = new MozPromise::Private(__func__); promise__->UseDirectTaskDispatch(__func__); SendSetRequest(std::forward>(cookieURI), std::forward(attrs), std::forward(thirdPartyContext), std::forward(partitionForeign), std::forward(usingStorageAccess), std::forward(isOn3PCBExceptionList), std::forward(name), std::forward(value), std::forward(session), std::forward(expires), std::forward(domain), std::forward(path), std::forward(sameSite), std::forward(partitioned), std::forward(operationId), [promise__](CookieStoreResult&& aValue) { promise__->Resolve(std::move(aValue), __func__); }, [promise__](ResponseRejectReason&& aReason) { promise__->Reject(std::move(aReason), __func__); }); return promise__; } auto PCookieStoreChild::SendDeleteRequest( mozilla::NotNull cookieURI, const OriginAttributes& attrs, const bool& thirdPartyContext, const bool& partitionForeign, const bool& usingStorageAccess, const bool& isOn3PCBExceptionList, const nsAString& name, const nsAString& domain, const nsAString& path, const bool& partitioned, const nsID& operationID, mozilla::ipc::ResolveCallback&& aResolve, mozilla::ipc::RejectCallback&& aReject) -> void { UniquePtr msg__ = PCookieStore::Msg_DeleteRequest(Id()); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), cookieURI); // Sentinel = 'cookieURI' ((&(writer__)))->WriteSentinel(303301483); IPC::WriteParam((&(writer__)), attrs); // Sentinel = 'attrs' ((&(writer__)))->WriteSentinel(107807279); IPC::WriteParam((&(writer__)), thirdPartyContext); // Sentinel = 'thirdPartyContext' ((&(writer__)))->WriteSentinel(1055852305); IPC::WriteParam((&(writer__)), partitionForeign); // Sentinel = 'partitionForeign' ((&(writer__)))->WriteSentinel(956368549); IPC::WriteParam((&(writer__)), usingStorageAccess); // Sentinel = 'usingStorageAccess' ((&(writer__)))->WriteSentinel(1180698446); IPC::WriteParam((&(writer__)), isOn3PCBExceptionList); // Sentinel = 'isOn3PCBExceptionList' ((&(writer__)))->WriteSentinel(1400571885); IPC::WriteParam((&(writer__)), name); // Sentinel = 'name' ((&(writer__)))->WriteSentinel(69075362); IPC::WriteParam((&(writer__)), domain); // Sentinel = 'domain' ((&(writer__)))->WriteSentinel(144704121); IPC::WriteParam((&(writer__)), path); // Sentinel = 'path' ((&(writer__)))->WriteSentinel(70713774); IPC::WriteParam((&(writer__)), partitioned); // Sentinel = 'partitioned' ((&(writer__)))->WriteSentinel(471794852); IPC::WriteParam((&(writer__)), operationID); // Sentinel = 'operationID' ((&(writer__)))->WriteSentinel(462750815); if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PCookieStoreChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PCookieStore::Msg_DeleteRequest", OTHER); IPC::Message::seqno_t seqno__ = 0; if (ChannelSend(std::move(msg__), (&(seqno__)))) { mAsyncCallbacks.AddCallback(seqno__, PCookieStore::Reply_DeleteRequest__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable { auto maybe__waitForNotification = IPC::ReadParam(aReader); if (!maybe__waitForNotification) { (aReader)->FatalError("Error deserializing 'bool'"); return MsgValueError; } auto& waitForNotification = *maybe__waitForNotification; // Sentinel = 'waitForNotification' if ((!((aReader)->ReadSentinel(1294731204)))) { mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); return MsgValueError; } aReader->EndRead(); resolve(std::move(waitForNotification)); return MsgProcessed; }, std::move(aReject)); } else { aReject(::mozilla::ipc::ResponseRejectReason::SendError); } return; } auto PCookieStoreChild::SendDeleteRequest( mozilla::NotNull cookieURI, const OriginAttributes& attrs, const bool& thirdPartyContext, const bool& partitionForeign, const bool& usingStorageAccess, const bool& isOn3PCBExceptionList, const nsAString& name, const nsAString& domain, const nsAString& path, const bool& partitioned, const nsID& operationID) -> RefPtr { RefPtr::Private> promise__ = new MozPromise::Private(__func__); promise__->UseDirectTaskDispatch(__func__); SendDeleteRequest(std::forward>(cookieURI), std::forward(attrs), std::forward(thirdPartyContext), std::forward(partitionForeign), std::forward(usingStorageAccess), std::forward(isOn3PCBExceptionList), std::forward(name), std::forward(domain), std::forward(path), std::forward(partitioned), std::forward(operationID), [promise__](bool&& aValue) { promise__->Resolve(std::move(aValue), __func__); }, [promise__](ResponseRejectReason&& aReason) { promise__->Reject(std::move(aReason), __func__); }); return promise__; } auto PCookieStoreChild::SendGetSubscriptionsRequest( const PrincipalInfo& principalInfo, const nsACString& scopeURL, mozilla::ipc::ResolveCallback>&& aResolve, mozilla::ipc::RejectCallback&& aReject) -> void { UniquePtr msg__ = PCookieStore::Msg_GetSubscriptionsRequest(Id()); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), principalInfo); // Sentinel = 'principalInfo' ((&(writer__)))->WriteSentinel(633472335); IPC::WriteParam((&(writer__)), scopeURL); // Sentinel = 'scopeURL' ((&(writer__)))->WriteSentinel(245498638); if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PCookieStoreChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PCookieStore::Msg_GetSubscriptionsRequest", OTHER); IPC::Message::seqno_t seqno__ = 0; if (ChannelSend(std::move(msg__), (&(seqno__)))) { mAsyncCallbacks.AddCallback(seqno__, PCookieStore::Reply_GetSubscriptionsRequest__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable { auto maybe__subscriptions = IPC::ReadParam>(aReader); if (!maybe__subscriptions) { (aReader)->FatalError("Error deserializing 'CookieSubscription[]'"); return MsgValueError; } auto& subscriptions = *maybe__subscriptions; // Sentinel = 'subscriptions' if ((!((aReader)->ReadSentinel(656541081)))) { mozilla::ipc::SentinelReadError("Error deserializing 'CookieSubscription[]'"); return MsgValueError; } aReader->EndRead(); resolve(std::move(subscriptions)); return MsgProcessed; }, std::move(aReject)); } else { aReject(::mozilla::ipc::ResponseRejectReason::SendError); } return; } auto PCookieStoreChild::SendGetSubscriptionsRequest( const PrincipalInfo& principalInfo, const nsACString& scopeURL) -> RefPtr { RefPtr, ResponseRejectReason, true>::Private> promise__ = new MozPromise, ResponseRejectReason, true>::Private(__func__); promise__->UseDirectTaskDispatch(__func__); SendGetSubscriptionsRequest(std::forward(principalInfo), std::forward(scopeURL), [promise__](nsTArray&& aValue) { promise__->Resolve(std::move(aValue), __func__); }, [promise__](ResponseRejectReason&& aReason) { promise__->Reject(std::move(aReason), __func__); }); return promise__; } auto PCookieStoreChild::SendSubscribeOrUnsubscribeRequest( const PrincipalInfo& principalInfo, const nsACString& scopeURL, mozilla::Span subscriptions, const bool& subscribe, mozilla::ipc::ResolveCallback&& aResolve, mozilla::ipc::RejectCallback&& aReject) -> void { UniquePtr msg__ = PCookieStore::Msg_SubscribeOrUnsubscribeRequest(Id()); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), principalInfo); // Sentinel = 'principalInfo' ((&(writer__)))->WriteSentinel(633472335); IPC::WriteParam((&(writer__)), scopeURL); // Sentinel = 'scopeURL' ((&(writer__)))->WriteSentinel(245498638); IPC::WriteParam((&(writer__)), subscriptions); // Sentinel = 'subscriptions' ((&(writer__)))->WriteSentinel(656541081); IPC::WriteParam((&(writer__)), subscribe); // Sentinel = 'subscribe' ((&(writer__)))->WriteSentinel(322372547); if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PCookieStoreChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PCookieStore::Msg_SubscribeOrUnsubscribeRequest", OTHER); IPC::Message::seqno_t seqno__ = 0; if (ChannelSend(std::move(msg__), (&(seqno__)))) { mAsyncCallbacks.AddCallback(seqno__, PCookieStore::Reply_SubscribeOrUnsubscribeRequest__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable { auto maybe__result = IPC::ReadParam(aReader); if (!maybe__result) { (aReader)->FatalError("Error deserializing 'bool'"); return MsgValueError; } auto& result = *maybe__result; // Sentinel = 'result' if ((!((aReader)->ReadSentinel(153223840)))) { mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); return MsgValueError; } aReader->EndRead(); resolve(std::move(result)); return MsgProcessed; }, std::move(aReject)); } else { aReject(::mozilla::ipc::ResponseRejectReason::SendError); } return; } auto PCookieStoreChild::SendSubscribeOrUnsubscribeRequest( const PrincipalInfo& principalInfo, const nsACString& scopeURL, mozilla::Span subscriptions, const bool& subscribe) -> RefPtr { RefPtr::Private> promise__ = new MozPromise::Private(__func__); promise__->UseDirectTaskDispatch(__func__); SendSubscribeOrUnsubscribeRequest(std::forward(principalInfo), std::forward(scopeURL), std::forward>(subscriptions), std::forward(subscribe), [promise__](bool&& aValue) { promise__->Resolve(std::move(aValue), __func__); }, [promise__](ResponseRejectReason&& aReason) { promise__->Reject(std::move(aReason), __func__); }); return promise__; } auto PCookieStoreChild::SendClose() -> bool { UniquePtr msg__ = PCookieStore::Msg_Close(Id()); IPC::MessageWriter writer__{ (*(msg__)), this}; if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PCookieStoreChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PCookieStore::Msg_Close", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PCookieStoreChild::DeallocManagee( mozilla::ipc::ProtocolId aProtocolId, IProtocol* aListener) -> void { FatalError("unreached"); return; } auto PCookieStoreChild::OnMessageReceived(const Message& msg__) -> PCookieStoreChild::Result { if (!CanSend()) { if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PCookieStoreChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Ignored message for dead actor", (&(msg__))->type(), mozilla::ipc::MessageDirection::eSending); } return MsgProcessed; } switch (msg__.type()) { case MANAGED_ENDPOINT_BOUND_MESSAGE_TYPE: { if (!mAwaitingManagedEndpointBind) { NS_WARNING("Unexpected managed endpoint lifecycle message after actor bound!"); return MsgNotAllowed; } mAwaitingManagedEndpointBind = false; return MsgProcessed; } case MANAGED_ENDPOINT_DROPPED_MESSAGE_TYPE: { if (!mAwaitingManagedEndpointBind) { NS_WARNING("Unexpected managed endpoint lifecycle message after actor bound!"); return MsgNotAllowed; } mAwaitingManagedEndpointBind = false; this->ActorDisconnected(ManagedEndpointDropped); return MsgProcessed; } case PCookieStore::Reply_GetRequest__ID: { if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PCookieStoreChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PCookieStore::Msg_GetRequest", OTHER); return mAsyncCallbacks.GotReply(this, msg__); } case PCookieStore::Reply_SetRequest__ID: { if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PCookieStoreChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PCookieStore::Msg_SetRequest", OTHER); return mAsyncCallbacks.GotReply(this, msg__); } case PCookieStore::Reply_DeleteRequest__ID: { if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PCookieStoreChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PCookieStore::Msg_DeleteRequest", OTHER); return mAsyncCallbacks.GotReply(this, msg__); } case PCookieStore::Reply_GetSubscriptionsRequest__ID: { if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PCookieStoreChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PCookieStore::Msg_GetSubscriptionsRequest", OTHER); return mAsyncCallbacks.GotReply(this, msg__); } case PCookieStore::Reply_SubscribeOrUnsubscribeRequest__ID: { if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PCookieStoreChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PCookieStore::Msg_SubscribeOrUnsubscribeRequest", OTHER); return mAsyncCallbacks.GotReply(this, msg__); } case PCookieStore::Msg___delete____ID: { if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PCookieStoreChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PCookieStore::Msg___delete__", OTHER); DoomSubtree(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::dom::CookieStoreChild*>(this))->Recv__delete__(); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } this->ActorDisconnected(Deletion); return MsgProcessed; } default: return MsgNotKnown; } } auto PCookieStoreChild::OnMessageReceived( const Message& msg__, UniquePtr& reply__) -> PCookieStoreChild::Result { if (!CanSend()) { return MsgDropped; } return MsgNotKnown; } } // namespace dom } // namespace mozilla