Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/dom/PServiceWorkerUpdaterParent.h"
8 :
9 : #include "mozilla/dom/PServiceWorkerManagerParent.h"
10 :
11 : #include "nsIFile.h"
12 : #include "GeckoProfiler.h"
13 :
14 : namespace mozilla {
15 : namespace dom {
16 :
17 :
18 0 : auto PServiceWorkerUpdaterParent::Recv__delete__() -> mozilla::ipc::IPCResult
19 : {
20 0 : return IPC_OK();
21 : }
22 :
23 :
24 0 : MOZ_IMPLICIT PServiceWorkerUpdaterParent::PServiceWorkerUpdaterParent() :
25 : mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
26 0 : mState(PServiceWorkerUpdater::__Dead)
27 : {
28 0 : MOZ_COUNT_CTOR(PServiceWorkerUpdaterParent);
29 0 : }
30 :
31 0 : PServiceWorkerUpdaterParent::~PServiceWorkerUpdaterParent()
32 : {
33 0 : MOZ_COUNT_DTOR(PServiceWorkerUpdaterParent);
34 0 : }
35 :
36 0 : auto PServiceWorkerUpdaterParent::Manager() const -> PServiceWorkerManagerParent*
37 : {
38 0 : return static_cast<PServiceWorkerManagerParent*>(IProtocol::Manager());
39 : }
40 :
41 0 : auto PServiceWorkerUpdaterParent::SendProceed(const bool& allowed) -> bool
42 : {
43 0 : IPC::Message* msg__ = PServiceWorkerUpdater::Msg_Proceed(Id());
44 :
45 0 : Write(allowed, msg__);
46 : // Sentinel = 'allowed'
47 0 : (msg__)->WriteSentinel(1297156503);
48 :
49 :
50 :
51 :
52 0 : if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerUpdaterParent")) {
53 0 : mozilla::ipc::LogMessageForProtocol("PServiceWorkerUpdaterParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
54 : }
55 0 : AUTO_PROFILER_LABEL("PServiceWorkerUpdater::Msg_Proceed", OTHER);
56 0 : PServiceWorkerUpdater::Transition(PServiceWorkerUpdater::Msg_Proceed__ID, (&(mState)));
57 :
58 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
59 0 : return sendok__;
60 : }
61 :
62 0 : auto PServiceWorkerUpdaterParent::RemoveManagee(
63 : int32_t aProtocolId,
64 : ProtocolBase* aListener) -> void
65 : {
66 0 : FatalError("unreached");
67 0 : return;
68 : }
69 :
70 0 : auto PServiceWorkerUpdaterParent::OnMessageReceived(const Message& msg__) -> PServiceWorkerUpdaterParent::Result
71 : {
72 0 : switch ((msg__).type()) {
73 : case PServiceWorkerUpdater::Msg___delete____ID:
74 : {
75 0 : if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerUpdaterParent")) {
76 0 : mozilla::ipc::LogMessageForProtocol("PServiceWorkerUpdaterParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
77 : }
78 0 : AUTO_PROFILER_LABEL("PServiceWorkerUpdater::Msg___delete__", OTHER);
79 :
80 0 : PickleIterator iter__(msg__);
81 : PServiceWorkerUpdaterParent* actor;
82 :
83 0 : if ((!(Read((&(actor)), (&(msg__)), (&(iter__)), false)))) {
84 0 : FatalError("Error deserializing 'PServiceWorkerUpdaterParent'");
85 0 : return MsgValueError;
86 : }
87 : // Sentinel = 'actor'
88 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
89 0 : mozilla::ipc::SentinelReadError("Error deserializing 'PServiceWorkerUpdaterParent'");
90 0 : return MsgValueError;
91 : }
92 0 : (msg__).EndRead(iter__, (msg__).type());
93 0 : PServiceWorkerUpdater::Transition(PServiceWorkerUpdater::Msg___delete____ID, (&(mState)));
94 0 : if ((!(Recv__delete__()))) {
95 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
96 : // Error handled in mozilla::ipc::IPCResult
97 0 : return MsgProcessingError;
98 : }
99 :
100 :
101 0 : IProtocol* mgr = (actor)->Manager();
102 0 : (actor)->DestroySubtree(Deletion);
103 0 : (actor)->DeallocSubtree();
104 0 : (mgr)->RemoveManagee(PServiceWorkerUpdaterMsgStart, actor);
105 :
106 0 : return MsgProcessed;
107 : }
108 : default:
109 : {
110 0 : return MsgNotKnown;
111 : }
112 : }
113 : }
114 :
115 0 : auto PServiceWorkerUpdaterParent::OnMessageReceived(
116 : const Message& msg__,
117 : Message*& reply__) -> PServiceWorkerUpdaterParent::Result
118 : {
119 0 : return MsgNotKnown;
120 : }
121 :
122 0 : auto PServiceWorkerUpdaterParent::OnCallReceived(
123 : const Message& msg__,
124 : Message*& reply__) -> PServiceWorkerUpdaterParent::Result
125 : {
126 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
127 : return MsgNotKnown;
128 : }
129 :
130 0 : auto PServiceWorkerUpdaterParent::GetProtocolTypeId() -> int32_t
131 : {
132 0 : return PServiceWorkerUpdaterMsgStart;
133 : }
134 :
135 0 : auto PServiceWorkerUpdaterParent::ProtocolName() const -> const char*
136 : {
137 0 : return "PServiceWorkerUpdaterParent";
138 : }
139 :
140 0 : auto PServiceWorkerUpdaterParent::DestroySubtree(ActorDestroyReason why) -> void
141 : {
142 : // Unregister from our manager.
143 0 : Unregister(Id());
144 :
145 : // Reject owning pending promises.
146 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
147 :
148 : // Finally, destroy "us".
149 0 : ActorDestroy(why);
150 0 : }
151 :
152 0 : auto PServiceWorkerUpdaterParent::DeallocSubtree() -> void
153 : {
154 0 : }
155 :
156 0 : auto PServiceWorkerUpdaterParent::Write(
157 : const PServiceWorkerUpdaterParent* v__,
158 : Message* msg__,
159 : bool nullable__) -> void
160 : {
161 : int32_t id;
162 0 : if ((!(v__))) {
163 0 : if ((!(nullable__))) {
164 0 : FatalError("NULL actor value passed to non-nullable param");
165 : }
166 0 : id = 0;
167 : }
168 : else {
169 0 : id = (v__)->Id();
170 0 : if ((1) == (id)) {
171 0 : FatalError("actor has been |delete|d");
172 : }
173 : }
174 :
175 0 : Write(id, msg__);
176 0 : }
177 :
178 0 : auto PServiceWorkerUpdaterParent::Read(
179 : PServiceWorkerUpdaterParent** v__,
180 : const Message* msg__,
181 : PickleIterator* iter__,
182 : bool nullable__) -> bool
183 : {
184 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PServiceWorkerUpdater", PServiceWorkerUpdaterMsgStart);
185 0 : if ((actor).isNothing()) {
186 0 : return false;
187 : }
188 :
189 0 : (*(v__)) = static_cast<PServiceWorkerUpdaterParent*>((actor).value());
190 0 : return true;
191 : }
192 :
193 :
194 :
195 : } // namespace dom
196 : } // namespace mozilla
|