Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/dom/PURLClassifierChild.h"
8 :
9 : #include "mozilla/dom/PContentChild.h"
10 :
11 : #include "nsIFile.h"
12 : #include "GeckoProfiler.h"
13 :
14 : namespace mozilla {
15 : namespace dom {
16 :
17 :
18 0 : auto PURLClassifierChild::Recv__delete__(
19 : const MaybeInfo& info,
20 : const nsresult& errorCode) -> mozilla::ipc::IPCResult
21 : {
22 0 : return IPC_OK();
23 : }
24 :
25 0 : auto PURLClassifierChild::ActorDestroy(ActorDestroyReason aWhy) -> void
26 : {
27 0 : }
28 :
29 0 : MOZ_IMPLICIT PURLClassifierChild::PURLClassifierChild() :
30 : mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
31 0 : mState(PURLClassifier::__Dead)
32 : {
33 0 : MOZ_COUNT_CTOR(PURLClassifierChild);
34 0 : }
35 :
36 0 : PURLClassifierChild::~PURLClassifierChild()
37 : {
38 0 : MOZ_COUNT_DTOR(PURLClassifierChild);
39 0 : }
40 :
41 0 : auto PURLClassifierChild::Manager() const -> PContentChild*
42 : {
43 0 : return static_cast<PContentChild*>(IProtocol::Manager());
44 : }
45 :
46 0 : auto PURLClassifierChild::RemoveManagee(
47 : int32_t aProtocolId,
48 : ProtocolBase* aListener) -> void
49 : {
50 0 : FatalError("unreached");
51 0 : return;
52 : }
53 :
54 0 : auto PURLClassifierChild::OnMessageReceived(const Message& msg__) -> PURLClassifierChild::Result
55 : {
56 0 : switch ((msg__).type()) {
57 : case PURLClassifier::Msg___delete____ID:
58 : {
59 0 : if (mozilla::ipc::LoggingEnabledFor("PURLClassifierChild")) {
60 0 : mozilla::ipc::LogMessageForProtocol("PURLClassifierChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
61 : }
62 0 : AUTO_PROFILER_LABEL("PURLClassifier::Msg___delete__", OTHER);
63 :
64 0 : PickleIterator iter__(msg__);
65 : PURLClassifierChild* actor;
66 0 : MaybeInfo info;
67 : nsresult errorCode;
68 :
69 0 : if ((!(Read((&(actor)), (&(msg__)), (&(iter__)), false)))) {
70 0 : FatalError("Error deserializing 'PURLClassifierChild'");
71 0 : return MsgValueError;
72 : }
73 : // Sentinel = 'actor'
74 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
75 0 : mozilla::ipc::SentinelReadError("Error deserializing 'PURLClassifierChild'");
76 0 : return MsgValueError;
77 : }
78 0 : if ((!(Read((&(info)), (&(msg__)), (&(iter__)))))) {
79 0 : FatalError("Error deserializing 'MaybeInfo'");
80 0 : return MsgValueError;
81 : }
82 : // Sentinel = 'info'
83 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3750868832)))) {
84 0 : mozilla::ipc::SentinelReadError("Error deserializing 'MaybeInfo'");
85 0 : return MsgValueError;
86 : }
87 0 : if ((!(Read((&(errorCode)), (&(msg__)), (&(iter__)))))) {
88 0 : FatalError("Error deserializing 'nsresult'");
89 0 : return MsgValueError;
90 : }
91 : // Sentinel = 'errorCode'
92 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 262143504)))) {
93 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
94 0 : return MsgValueError;
95 : }
96 0 : (msg__).EndRead(iter__, (msg__).type());
97 0 : PURLClassifier::Transition(PURLClassifier::Msg___delete____ID, (&(mState)));
98 0 : if ((!(Recv__delete__(mozilla::Move(info), mozilla::Move(errorCode))))) {
99 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
100 : // Error handled in mozilla::ipc::IPCResult
101 0 : return MsgProcessingError;
102 : }
103 :
104 :
105 0 : IProtocol* mgr = (actor)->Manager();
106 0 : (actor)->DestroySubtree(Deletion);
107 0 : (actor)->DeallocSubtree();
108 0 : (mgr)->RemoveManagee(PURLClassifierMsgStart, actor);
109 :
110 0 : return MsgProcessed;
111 : }
112 : default:
113 : {
114 0 : return MsgNotKnown;
115 : }
116 : }
117 : }
118 :
119 0 : auto PURLClassifierChild::OnMessageReceived(
120 : const Message& msg__,
121 : Message*& reply__) -> PURLClassifierChild::Result
122 : {
123 0 : return MsgNotKnown;
124 : }
125 :
126 0 : auto PURLClassifierChild::OnCallReceived(
127 : const Message& msg__,
128 : Message*& reply__) -> PURLClassifierChild::Result
129 : {
130 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
131 : return MsgNotKnown;
132 : }
133 :
134 0 : auto PURLClassifierChild::GetProtocolTypeId() -> int32_t
135 : {
136 0 : return PURLClassifierMsgStart;
137 : }
138 :
139 0 : auto PURLClassifierChild::ProtocolName() const -> const char*
140 : {
141 0 : return "PURLClassifierChild";
142 : }
143 :
144 0 : auto PURLClassifierChild::DestroySubtree(ActorDestroyReason why) -> void
145 : {
146 : // Unregister from our manager.
147 0 : Unregister(Id());
148 :
149 : // Reject owning pending promises.
150 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
151 :
152 : // Finally, destroy "us".
153 0 : ActorDestroy(why);
154 0 : }
155 :
156 0 : auto PURLClassifierChild::DeallocSubtree() -> void
157 : {
158 0 : }
159 :
160 0 : auto PURLClassifierChild::Write(
161 : const ClassifierInfo& v__,
162 : Message* msg__) -> void
163 : {
164 0 : Write((v__).list(), msg__);
165 : // Sentinel = 'list'
166 0 : (msg__)->WriteSentinel(1914335340);
167 0 : Write((v__).provider(), msg__);
168 : // Sentinel = 'provider'
169 0 : (msg__)->WriteSentinel(3034771127);
170 0 : Write((v__).prefix(), msg__);
171 : // Sentinel = 'prefix'
172 0 : (msg__)->WriteSentinel(4169957394);
173 0 : }
174 :
175 0 : auto PURLClassifierChild::Read(
176 : ClassifierInfo* v__,
177 : const Message* msg__,
178 : PickleIterator* iter__) -> bool
179 : {
180 0 : if ((!(Read((&((v__)->list())), msg__, iter__)))) {
181 0 : FatalError("Error deserializing 'list' (nsCString) member of 'ClassifierInfo'");
182 0 : return false;
183 : }
184 : // Sentinel = 'list'
185 0 : if ((!((msg__)->ReadSentinel(iter__, 1914335340)))) {
186 0 : mozilla::ipc::SentinelReadError("Error deserializing 'list' (nsCString) member of 'ClassifierInfo'");
187 0 : return false;
188 : }
189 0 : if ((!(Read((&((v__)->provider())), msg__, iter__)))) {
190 0 : FatalError("Error deserializing 'provider' (nsCString) member of 'ClassifierInfo'");
191 0 : return false;
192 : }
193 : // Sentinel = 'provider'
194 0 : if ((!((msg__)->ReadSentinel(iter__, 3034771127)))) {
195 0 : mozilla::ipc::SentinelReadError("Error deserializing 'provider' (nsCString) member of 'ClassifierInfo'");
196 0 : return false;
197 : }
198 0 : if ((!(Read((&((v__)->prefix())), msg__, iter__)))) {
199 0 : FatalError("Error deserializing 'prefix' (nsCString) member of 'ClassifierInfo'");
200 0 : return false;
201 : }
202 : // Sentinel = 'prefix'
203 0 : if ((!((msg__)->ReadSentinel(iter__, 4169957394)))) {
204 0 : mozilla::ipc::SentinelReadError("Error deserializing 'prefix' (nsCString) member of 'ClassifierInfo'");
205 0 : return false;
206 : }
207 0 : return true;
208 : }
209 :
210 0 : auto PURLClassifierChild::Write(
211 : const PURLClassifierChild* v__,
212 : Message* msg__,
213 : bool nullable__) -> void
214 : {
215 : int32_t id;
216 0 : if ((!(v__))) {
217 0 : if ((!(nullable__))) {
218 0 : FatalError("NULL actor value passed to non-nullable param");
219 : }
220 0 : id = 0;
221 : }
222 : else {
223 0 : id = (v__)->Id();
224 0 : if ((1) == (id)) {
225 0 : FatalError("actor has been |delete|d");
226 : }
227 : }
228 :
229 0 : Write(id, msg__);
230 0 : }
231 :
232 0 : auto PURLClassifierChild::Read(
233 : PURLClassifierChild** v__,
234 : const Message* msg__,
235 : PickleIterator* iter__,
236 : bool nullable__) -> bool
237 : {
238 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PURLClassifier", PURLClassifierMsgStart);
239 0 : if ((actor).isNothing()) {
240 0 : return false;
241 : }
242 :
243 0 : (*(v__)) = static_cast<PURLClassifierChild*>((actor).value());
244 0 : return true;
245 : }
246 :
247 0 : auto PURLClassifierChild::Write(
248 : const MaybeInfo& v__,
249 : Message* msg__) -> void
250 : {
251 : typedef MaybeInfo type__;
252 0 : Write(int((v__).type()), msg__);
253 : // Sentinel = 'MaybeInfo'
254 0 : (msg__)->WriteSentinel(3293711665);
255 :
256 0 : switch ((v__).type()) {
257 : case type__::TClassifierInfo:
258 : {
259 0 : Write((v__).get_ClassifierInfo(), msg__);
260 : // Sentinel = 'TClassifierInfo'
261 0 : (msg__)->WriteSentinel(1454833332);
262 0 : return;
263 : }
264 : case type__::Tvoid_t:
265 : {
266 0 : Write((v__).get_void_t(), msg__);
267 : // Sentinel = 'Tvoid_t'
268 0 : (msg__)->WriteSentinel(3041273328);
269 0 : return;
270 : }
271 : default:
272 : {
273 0 : FatalError("unknown union type");
274 0 : return;
275 : }
276 : }
277 : }
278 :
279 0 : auto PURLClassifierChild::Read(
280 : MaybeInfo* v__,
281 : const Message* msg__,
282 : PickleIterator* iter__) -> bool
283 : {
284 : typedef MaybeInfo type__;
285 : int type;
286 0 : if ((!(Read((&(type)), msg__, iter__)))) {
287 0 : mozilla::ipc::UnionTypeReadError("MaybeInfo");
288 0 : return false;
289 : }
290 : // Sentinel = 'MaybeInfo'
291 0 : if ((!((msg__)->ReadSentinel(iter__, 3293711665)))) {
292 0 : mozilla::ipc::SentinelReadError("MaybeInfo");
293 0 : return false;
294 : }
295 :
296 0 : switch (type) {
297 : case type__::TClassifierInfo:
298 : {
299 0 : ClassifierInfo tmp = ClassifierInfo();
300 0 : (*(v__)) = tmp;
301 0 : if ((!(Read((&((v__)->get_ClassifierInfo())), msg__, iter__)))) {
302 0 : FatalError("Error deserializing Union type");
303 0 : return false;
304 : }
305 : // Sentinel = 'TClassifierInfo'
306 0 : if ((!((msg__)->ReadSentinel(iter__, 1454833332)))) {
307 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
308 0 : return false;
309 : }
310 0 : return true;
311 : }
312 : case type__::Tvoid_t:
313 : {
314 : void_t tmp = void_t();
315 0 : (*(v__)) = tmp;
316 0 : if ((!(Read((&((v__)->get_void_t())), msg__, iter__)))) {
317 0 : FatalError("Error deserializing Union type");
318 0 : return false;
319 : }
320 : // Sentinel = 'Tvoid_t'
321 0 : if ((!((msg__)->ReadSentinel(iter__, 3041273328)))) {
322 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
323 0 : return false;
324 : }
325 0 : return true;
326 : }
327 : default:
328 : {
329 0 : FatalError("unknown union type");
330 0 : return false;
331 : }
332 : }
333 : }
334 :
335 :
336 :
337 : } // namespace dom
338 : } // namespace mozilla
|