/work/obj-fuzz/ipc/ipdl/PBackgroundStorageParent.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | // |
2 | | // Automatically generated by ipdlc. |
3 | | // Edit at your own risk |
4 | | // |
5 | | |
6 | | |
7 | | #include "mozilla/dom/PBackgroundStorageParent.h" |
8 | | |
9 | | #include "mozilla/ipc/PBackgroundParent.h" |
10 | | |
11 | | #include "nsIFile.h" |
12 | | #include "GeckoProfiler.h" |
13 | | |
14 | | namespace mozilla { |
15 | | namespace dom { |
16 | | |
17 | | |
18 | | auto PBackgroundStorageParent::ActorDestroy(ActorDestroyReason aWhy) -> void |
19 | 0 | { |
20 | 0 | } |
21 | | |
22 | | MOZ_IMPLICIT PBackgroundStorageParent::PBackgroundStorageParent() : |
23 | | mozilla::ipc::IProtocol(mozilla::ipc::ParentSide), |
24 | | mLivenessState(mozilla::ipc::LivenessState::Dead) |
25 | 0 | { |
26 | 0 | MOZ_COUNT_CTOR(PBackgroundStorageParent); |
27 | 0 | } |
28 | | |
29 | | PBackgroundStorageParent::~PBackgroundStorageParent() |
30 | 0 | { |
31 | 0 | MOZ_COUNT_DTOR(PBackgroundStorageParent); |
32 | 0 | } |
33 | | |
34 | | auto PBackgroundStorageParent::Manager() const -> PBackgroundParent* |
35 | 0 | { |
36 | 0 | return static_cast<PBackgroundParent*>(IProtocol::Manager()); |
37 | 0 | } |
38 | | |
39 | | auto PBackgroundStorageParent::Send__delete__(PBackgroundStorageParent* actor) -> bool |
40 | 0 | { |
41 | 0 | if ((!(actor))) { |
42 | 0 | return false; |
43 | 0 | } |
44 | 0 | |
45 | 0 | IPC::Message* msg__ = PBackgroundStorage::Msg___delete__((actor)->Id()); |
46 | 0 |
|
47 | 0 | MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param"); |
48 | 0 | WriteIPDLParam(msg__, actor, actor); |
49 | 0 | // Sentinel = 'actor' |
50 | 0 | (msg__)->WriteSentinel(875202478); |
51 | 0 |
|
52 | 0 |
|
53 | 0 |
|
54 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
55 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
56 | 0 | } |
57 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg___delete__", OTHER); |
58 | 0 | if ((!(StateTransition(true, (&((actor)->mLivenessState)))))) { |
59 | 0 | mozilla::ipc::LogicError("Transition error"); |
60 | 0 | } |
61 | 0 |
|
62 | 0 | bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__); |
63 | 0 |
|
64 | 0 | IProtocol* mgr = (actor)->Manager(); |
65 | 0 | (actor)->DestroySubtree(Deletion); |
66 | 0 | (actor)->DeallocSubtree(); |
67 | 0 | (mgr)->RemoveManagee(PBackgroundStorageMsgStart, actor); |
68 | 0 | return sendok__; |
69 | 0 | } |
70 | | |
71 | | auto PBackgroundStorageParent::SendObserve( |
72 | | const nsCString& topic, |
73 | | const nsString& originAttributesPattern, |
74 | | const nsCString& originScope) -> bool |
75 | 0 | { |
76 | 0 | IPC::Message* msg__ = PBackgroundStorage::Msg_Observe(Id()); |
77 | 0 |
|
78 | 0 | WriteIPDLParam(msg__, this, topic); |
79 | 0 | // Sentinel = 'topic' |
80 | 0 | (msg__)->WriteSentinel(261826960); |
81 | 0 | WriteIPDLParam(msg__, this, originAttributesPattern); |
82 | 0 | // Sentinel = 'originAttributesPattern' |
83 | 0 | (msg__)->WriteSentinel(1130778426); |
84 | 0 | WriteIPDLParam(msg__, this, originScope); |
85 | 0 | // Sentinel = 'originScope' |
86 | 0 | (msg__)->WriteSentinel(1301332537); |
87 | 0 |
|
88 | 0 |
|
89 | 0 |
|
90 | 0 |
|
91 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
92 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
93 | 0 | } |
94 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_Observe", OTHER); |
95 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
96 | 0 | mozilla::ipc::LogicError("Transition error"); |
97 | 0 | } |
98 | 0 |
|
99 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
100 | 0 | return sendok__; |
101 | 0 | } |
102 | | |
103 | | auto PBackgroundStorageParent::SendOriginsHavingData(const nsTArray<nsCString>& origins) -> bool |
104 | 0 | { |
105 | 0 | IPC::Message* msg__ = PBackgroundStorage::Msg_OriginsHavingData(Id()); |
106 | 0 |
|
107 | 0 | WriteIPDLParam(msg__, this, origins); |
108 | 0 | // Sentinel = 'origins' |
109 | 0 | (msg__)->WriteSentinel(1146949350); |
110 | 0 |
|
111 | 0 |
|
112 | 0 |
|
113 | 0 |
|
114 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
115 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
116 | 0 | } |
117 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_OriginsHavingData", OTHER); |
118 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
119 | 0 | mozilla::ipc::LogicError("Transition error"); |
120 | 0 | } |
121 | 0 |
|
122 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
123 | 0 | return sendok__; |
124 | 0 | } |
125 | | |
126 | | auto PBackgroundStorageParent::SendLoadItem( |
127 | | const nsCString& originSuffix, |
128 | | const nsCString& originNoSuffix, |
129 | | const nsString& key, |
130 | | const nsString& value) -> bool |
131 | 0 | { |
132 | 0 | IPC::Message* msg__ = PBackgroundStorage::Msg_LoadItem(Id()); |
133 | 0 |
|
134 | 0 | WriteIPDLParam(msg__, this, originSuffix); |
135 | 0 | // Sentinel = 'originSuffix' |
136 | 0 | (msg__)->WriteSentinel(4013336113); |
137 | 0 | WriteIPDLParam(msg__, this, originNoSuffix); |
138 | 0 | // Sentinel = 'originNoSuffix' |
139 | 0 | (msg__)->WriteSentinel(2833071422); |
140 | 0 | WriteIPDLParam(msg__, this, key); |
141 | 0 | // Sentinel = 'key' |
142 | 0 | (msg__)->WriteSentinel(35142870); |
143 | 0 | WriteIPDLParam(msg__, this, value); |
144 | 0 | // Sentinel = 'value' |
145 | 0 | (msg__)->WriteSentinel(3456818542); |
146 | 0 |
|
147 | 0 |
|
148 | 0 |
|
149 | 0 |
|
150 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
151 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
152 | 0 | } |
153 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_LoadItem", OTHER); |
154 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
155 | 0 | mozilla::ipc::LogicError("Transition error"); |
156 | 0 | } |
157 | 0 |
|
158 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
159 | 0 | return sendok__; |
160 | 0 | } |
161 | | |
162 | | auto PBackgroundStorageParent::SendLoadDone( |
163 | | const nsCString& originSuffix, |
164 | | const nsCString& originNoSuffix, |
165 | | const nsresult& rv) -> bool |
166 | 0 | { |
167 | 0 | IPC::Message* msg__ = PBackgroundStorage::Msg_LoadDone(Id()); |
168 | 0 |
|
169 | 0 | WriteIPDLParam(msg__, this, originSuffix); |
170 | 0 | // Sentinel = 'originSuffix' |
171 | 0 | (msg__)->WriteSentinel(4013336113); |
172 | 0 | WriteIPDLParam(msg__, this, originNoSuffix); |
173 | 0 | // Sentinel = 'originNoSuffix' |
174 | 0 | (msg__)->WriteSentinel(2833071422); |
175 | 0 | WriteIPDLParam(msg__, this, rv); |
176 | 0 | // Sentinel = 'rv' |
177 | 0 | (msg__)->WriteSentinel(702481058); |
178 | 0 |
|
179 | 0 |
|
180 | 0 |
|
181 | 0 |
|
182 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
183 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
184 | 0 | } |
185 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_LoadDone", OTHER); |
186 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
187 | 0 | mozilla::ipc::LogicError("Transition error"); |
188 | 0 | } |
189 | 0 |
|
190 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
191 | 0 | return sendok__; |
192 | 0 | } |
193 | | |
194 | | auto PBackgroundStorageParent::SendLoadUsage( |
195 | | const nsCString& scope, |
196 | | const int64_t& usage) -> bool |
197 | 0 | { |
198 | 0 | IPC::Message* msg__ = PBackgroundStorage::Msg_LoadUsage(Id()); |
199 | 0 |
|
200 | 0 | WriteIPDLParam(msg__, this, scope); |
201 | 0 | // Sentinel = 'scope' |
202 | 0 | (msg__)->WriteSentinel(2191984953); |
203 | 0 | WriteIPDLParam(msg__, this, usage); |
204 | 0 | // Sentinel = 'usage' |
205 | 0 | (msg__)->WriteSentinel(3419176504); |
206 | 0 |
|
207 | 0 |
|
208 | 0 |
|
209 | 0 |
|
210 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
211 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
212 | 0 | } |
213 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_LoadUsage", OTHER); |
214 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
215 | 0 | mozilla::ipc::LogicError("Transition error"); |
216 | 0 | } |
217 | 0 |
|
218 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
219 | 0 | return sendok__; |
220 | 0 | } |
221 | | |
222 | | auto PBackgroundStorageParent::SendError(const nsresult& rv) -> bool |
223 | 0 | { |
224 | 0 | IPC::Message* msg__ = PBackgroundStorage::Msg_Error(Id()); |
225 | 0 |
|
226 | 0 | WriteIPDLParam(msg__, this, rv); |
227 | 0 | // Sentinel = 'rv' |
228 | 0 | (msg__)->WriteSentinel(702481058); |
229 | 0 |
|
230 | 0 |
|
231 | 0 |
|
232 | 0 |
|
233 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
234 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
235 | 0 | } |
236 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_Error", OTHER); |
237 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
238 | 0 | mozilla::ipc::LogicError("Transition error"); |
239 | 0 | } |
240 | 0 |
|
241 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
242 | 0 | return sendok__; |
243 | 0 | } |
244 | | |
245 | | auto PBackgroundStorageParent::RemoveManagee( |
246 | | int32_t aProtocolId, |
247 | | IProtocol* aListener) -> void |
248 | 0 | { |
249 | 0 | FatalError("unreached"); |
250 | 0 | return; |
251 | 0 | } |
252 | | |
253 | | auto PBackgroundStorageParent::OnMessageReceived(const Message& msg__) -> PBackgroundStorageParent::Result |
254 | 0 | { |
255 | 0 | switch ((msg__).type()) { |
256 | 0 | case PBackgroundStorage::Msg_DeleteMe__ID: |
257 | 0 | { |
258 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
259 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
260 | 0 | } |
261 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_DeleteMe", OTHER); |
262 | 0 |
|
263 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
264 | 0 | FatalError("Transition error"); |
265 | 0 | return MsgValueError; |
266 | 0 | } |
267 | 0 | if ((!(RecvDeleteMe()))) { |
268 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
269 | 0 | // Error handled in mozilla::ipc::IPCResult |
270 | 0 | return MsgProcessingError; |
271 | 0 | } |
272 | 0 | |
273 | 0 | return MsgProcessed; |
274 | 0 | } |
275 | 0 | case PBackgroundStorage::Msg_AsyncPreload__ID: |
276 | 0 | { |
277 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
278 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
279 | 0 | } |
280 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_AsyncPreload", OTHER); |
281 | 0 |
|
282 | 0 | PickleIterator iter__(msg__); |
283 | 0 | nsCString originSuffix; |
284 | 0 | nsCString originNoSuffix; |
285 | 0 | bool priority; |
286 | 0 |
|
287 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(originSuffix)))))) { |
288 | 0 | FatalError("Error deserializing 'nsCString'"); |
289 | 0 | return MsgValueError; |
290 | 0 | } |
291 | 0 | // Sentinel = 'originSuffix' |
292 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4013336113)))) { |
293 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
294 | 0 | return MsgValueError; |
295 | 0 | } |
296 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(originNoSuffix)))))) { |
297 | 0 | FatalError("Error deserializing 'nsCString'"); |
298 | 0 | return MsgValueError; |
299 | 0 | } |
300 | 0 | // Sentinel = 'originNoSuffix' |
301 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2833071422)))) { |
302 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
303 | 0 | return MsgValueError; |
304 | 0 | } |
305 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(priority)))))) { |
306 | 0 | FatalError("Error deserializing 'bool'"); |
307 | 0 | return MsgValueError; |
308 | 0 | } |
309 | 0 | // Sentinel = 'priority' |
310 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 558136112)))) { |
311 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); |
312 | 0 | return MsgValueError; |
313 | 0 | } |
314 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
315 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
316 | 0 | FatalError("Transition error"); |
317 | 0 | return MsgValueError; |
318 | 0 | } |
319 | 0 | if ((!(RecvAsyncPreload(originSuffix, originNoSuffix, priority)))) { |
320 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
321 | 0 | // Error handled in mozilla::ipc::IPCResult |
322 | 0 | return MsgProcessingError; |
323 | 0 | } |
324 | 0 | |
325 | 0 | return MsgProcessed; |
326 | 0 | } |
327 | 0 | case PBackgroundStorage::Msg_AsyncGetUsage__ID: |
328 | 0 | { |
329 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
330 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
331 | 0 | } |
332 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_AsyncGetUsage", OTHER); |
333 | 0 |
|
334 | 0 | PickleIterator iter__(msg__); |
335 | 0 | nsCString scope; |
336 | 0 |
|
337 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(scope)))))) { |
338 | 0 | FatalError("Error deserializing 'nsCString'"); |
339 | 0 | return MsgValueError; |
340 | 0 | } |
341 | 0 | // Sentinel = 'scope' |
342 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2191984953)))) { |
343 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
344 | 0 | return MsgValueError; |
345 | 0 | } |
346 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
347 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
348 | 0 | FatalError("Transition error"); |
349 | 0 | return MsgValueError; |
350 | 0 | } |
351 | 0 | if ((!(RecvAsyncGetUsage(scope)))) { |
352 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
353 | 0 | // Error handled in mozilla::ipc::IPCResult |
354 | 0 | return MsgProcessingError; |
355 | 0 | } |
356 | 0 | |
357 | 0 | return MsgProcessed; |
358 | 0 | } |
359 | 0 | case PBackgroundStorage::Msg_AsyncAddItem__ID: |
360 | 0 | { |
361 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
362 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
363 | 0 | } |
364 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_AsyncAddItem", OTHER); |
365 | 0 |
|
366 | 0 | PickleIterator iter__(msg__); |
367 | 0 | nsCString originSuffix; |
368 | 0 | nsCString originNoSuffix; |
369 | 0 | nsString key; |
370 | 0 | nsString value; |
371 | 0 |
|
372 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(originSuffix)))))) { |
373 | 0 | FatalError("Error deserializing 'nsCString'"); |
374 | 0 | return MsgValueError; |
375 | 0 | } |
376 | 0 | // Sentinel = 'originSuffix' |
377 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4013336113)))) { |
378 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
379 | 0 | return MsgValueError; |
380 | 0 | } |
381 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(originNoSuffix)))))) { |
382 | 0 | FatalError("Error deserializing 'nsCString'"); |
383 | 0 | return MsgValueError; |
384 | 0 | } |
385 | 0 | // Sentinel = 'originNoSuffix' |
386 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2833071422)))) { |
387 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
388 | 0 | return MsgValueError; |
389 | 0 | } |
390 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(key)))))) { |
391 | 0 | FatalError("Error deserializing 'nsString'"); |
392 | 0 | return MsgValueError; |
393 | 0 | } |
394 | 0 | // Sentinel = 'key' |
395 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 35142870)))) { |
396 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsString'"); |
397 | 0 | return MsgValueError; |
398 | 0 | } |
399 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(value)))))) { |
400 | 0 | FatalError("Error deserializing 'nsString'"); |
401 | 0 | return MsgValueError; |
402 | 0 | } |
403 | 0 | // Sentinel = 'value' |
404 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3456818542)))) { |
405 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsString'"); |
406 | 0 | return MsgValueError; |
407 | 0 | } |
408 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
409 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
410 | 0 | FatalError("Transition error"); |
411 | 0 | return MsgValueError; |
412 | 0 | } |
413 | 0 | if ((!(RecvAsyncAddItem(originSuffix, originNoSuffix, key, value)))) { |
414 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
415 | 0 | // Error handled in mozilla::ipc::IPCResult |
416 | 0 | return MsgProcessingError; |
417 | 0 | } |
418 | 0 | |
419 | 0 | return MsgProcessed; |
420 | 0 | } |
421 | 0 | case PBackgroundStorage::Msg_AsyncUpdateItem__ID: |
422 | 0 | { |
423 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
424 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
425 | 0 | } |
426 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_AsyncUpdateItem", OTHER); |
427 | 0 |
|
428 | 0 | PickleIterator iter__(msg__); |
429 | 0 | nsCString originSuffix; |
430 | 0 | nsCString originNoSuffix; |
431 | 0 | nsString key; |
432 | 0 | nsString value; |
433 | 0 |
|
434 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(originSuffix)))))) { |
435 | 0 | FatalError("Error deserializing 'nsCString'"); |
436 | 0 | return MsgValueError; |
437 | 0 | } |
438 | 0 | // Sentinel = 'originSuffix' |
439 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4013336113)))) { |
440 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
441 | 0 | return MsgValueError; |
442 | 0 | } |
443 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(originNoSuffix)))))) { |
444 | 0 | FatalError("Error deserializing 'nsCString'"); |
445 | 0 | return MsgValueError; |
446 | 0 | } |
447 | 0 | // Sentinel = 'originNoSuffix' |
448 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2833071422)))) { |
449 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
450 | 0 | return MsgValueError; |
451 | 0 | } |
452 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(key)))))) { |
453 | 0 | FatalError("Error deserializing 'nsString'"); |
454 | 0 | return MsgValueError; |
455 | 0 | } |
456 | 0 | // Sentinel = 'key' |
457 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 35142870)))) { |
458 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsString'"); |
459 | 0 | return MsgValueError; |
460 | 0 | } |
461 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(value)))))) { |
462 | 0 | FatalError("Error deserializing 'nsString'"); |
463 | 0 | return MsgValueError; |
464 | 0 | } |
465 | 0 | // Sentinel = 'value' |
466 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3456818542)))) { |
467 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsString'"); |
468 | 0 | return MsgValueError; |
469 | 0 | } |
470 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
471 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
472 | 0 | FatalError("Transition error"); |
473 | 0 | return MsgValueError; |
474 | 0 | } |
475 | 0 | if ((!(RecvAsyncUpdateItem(originSuffix, originNoSuffix, key, value)))) { |
476 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
477 | 0 | // Error handled in mozilla::ipc::IPCResult |
478 | 0 | return MsgProcessingError; |
479 | 0 | } |
480 | 0 | |
481 | 0 | return MsgProcessed; |
482 | 0 | } |
483 | 0 | case PBackgroundStorage::Msg_AsyncRemoveItem__ID: |
484 | 0 | { |
485 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
486 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
487 | 0 | } |
488 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_AsyncRemoveItem", OTHER); |
489 | 0 |
|
490 | 0 | PickleIterator iter__(msg__); |
491 | 0 | nsCString originSuffix; |
492 | 0 | nsCString originNoSuffix; |
493 | 0 | nsString key; |
494 | 0 |
|
495 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(originSuffix)))))) { |
496 | 0 | FatalError("Error deserializing 'nsCString'"); |
497 | 0 | return MsgValueError; |
498 | 0 | } |
499 | 0 | // Sentinel = 'originSuffix' |
500 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4013336113)))) { |
501 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
502 | 0 | return MsgValueError; |
503 | 0 | } |
504 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(originNoSuffix)))))) { |
505 | 0 | FatalError("Error deserializing 'nsCString'"); |
506 | 0 | return MsgValueError; |
507 | 0 | } |
508 | 0 | // Sentinel = 'originNoSuffix' |
509 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2833071422)))) { |
510 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
511 | 0 | return MsgValueError; |
512 | 0 | } |
513 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(key)))))) { |
514 | 0 | FatalError("Error deserializing 'nsString'"); |
515 | 0 | return MsgValueError; |
516 | 0 | } |
517 | 0 | // Sentinel = 'key' |
518 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 35142870)))) { |
519 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsString'"); |
520 | 0 | return MsgValueError; |
521 | 0 | } |
522 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
523 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
524 | 0 | FatalError("Transition error"); |
525 | 0 | return MsgValueError; |
526 | 0 | } |
527 | 0 | if ((!(RecvAsyncRemoveItem(originSuffix, originNoSuffix, key)))) { |
528 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
529 | 0 | // Error handled in mozilla::ipc::IPCResult |
530 | 0 | return MsgProcessingError; |
531 | 0 | } |
532 | 0 | |
533 | 0 | return MsgProcessed; |
534 | 0 | } |
535 | 0 | case PBackgroundStorage::Msg_AsyncClear__ID: |
536 | 0 | { |
537 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
538 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
539 | 0 | } |
540 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_AsyncClear", OTHER); |
541 | 0 |
|
542 | 0 | PickleIterator iter__(msg__); |
543 | 0 | nsCString originSuffix; |
544 | 0 | nsCString originNoSuffix; |
545 | 0 |
|
546 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(originSuffix)))))) { |
547 | 0 | FatalError("Error deserializing 'nsCString'"); |
548 | 0 | return MsgValueError; |
549 | 0 | } |
550 | 0 | // Sentinel = 'originSuffix' |
551 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4013336113)))) { |
552 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
553 | 0 | return MsgValueError; |
554 | 0 | } |
555 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(originNoSuffix)))))) { |
556 | 0 | FatalError("Error deserializing 'nsCString'"); |
557 | 0 | return MsgValueError; |
558 | 0 | } |
559 | 0 | // Sentinel = 'originNoSuffix' |
560 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2833071422)))) { |
561 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
562 | 0 | return MsgValueError; |
563 | 0 | } |
564 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
565 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
566 | 0 | FatalError("Transition error"); |
567 | 0 | return MsgValueError; |
568 | 0 | } |
569 | 0 | if ((!(RecvAsyncClear(originSuffix, originNoSuffix)))) { |
570 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
571 | 0 | // Error handled in mozilla::ipc::IPCResult |
572 | 0 | return MsgProcessingError; |
573 | 0 | } |
574 | 0 | |
575 | 0 | return MsgProcessed; |
576 | 0 | } |
577 | 0 | case PBackgroundStorage::Msg_AsyncFlush__ID: |
578 | 0 | { |
579 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
580 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
581 | 0 | } |
582 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_AsyncFlush", OTHER); |
583 | 0 |
|
584 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
585 | 0 | FatalError("Transition error"); |
586 | 0 | return MsgValueError; |
587 | 0 | } |
588 | 0 | if ((!(RecvAsyncFlush()))) { |
589 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
590 | 0 | // Error handled in mozilla::ipc::IPCResult |
591 | 0 | return MsgProcessingError; |
592 | 0 | } |
593 | 0 | |
594 | 0 | return MsgProcessed; |
595 | 0 | } |
596 | 0 | case PBackgroundStorage::Msg_Startup__ID: |
597 | 0 | { |
598 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
599 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
600 | 0 | } |
601 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_Startup", OTHER); |
602 | 0 |
|
603 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
604 | 0 | FatalError("Transition error"); |
605 | 0 | return MsgValueError; |
606 | 0 | } |
607 | 0 | if ((!(RecvStartup()))) { |
608 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
609 | 0 | // Error handled in mozilla::ipc::IPCResult |
610 | 0 | return MsgProcessingError; |
611 | 0 | } |
612 | 0 | |
613 | 0 | return MsgProcessed; |
614 | 0 | } |
615 | 0 | case PBackgroundStorage::Msg_ClearAll__ID: |
616 | 0 | { |
617 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
618 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
619 | 0 | } |
620 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_ClearAll", OTHER); |
621 | 0 |
|
622 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
623 | 0 | FatalError("Transition error"); |
624 | 0 | return MsgValueError; |
625 | 0 | } |
626 | 0 | if ((!(RecvClearAll()))) { |
627 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
628 | 0 | // Error handled in mozilla::ipc::IPCResult |
629 | 0 | return MsgProcessingError; |
630 | 0 | } |
631 | 0 | |
632 | 0 | return MsgProcessed; |
633 | 0 | } |
634 | 0 | case PBackgroundStorage::Msg_ClearMatchingOrigin__ID: |
635 | 0 | { |
636 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
637 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
638 | 0 | } |
639 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_ClearMatchingOrigin", OTHER); |
640 | 0 |
|
641 | 0 | PickleIterator iter__(msg__); |
642 | 0 | nsCString originNoSuffix; |
643 | 0 |
|
644 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(originNoSuffix)))))) { |
645 | 0 | FatalError("Error deserializing 'nsCString'"); |
646 | 0 | return MsgValueError; |
647 | 0 | } |
648 | 0 | // Sentinel = 'originNoSuffix' |
649 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2833071422)))) { |
650 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
651 | 0 | return MsgValueError; |
652 | 0 | } |
653 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
654 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
655 | 0 | FatalError("Transition error"); |
656 | 0 | return MsgValueError; |
657 | 0 | } |
658 | 0 | if ((!(RecvClearMatchingOrigin(originNoSuffix)))) { |
659 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
660 | 0 | // Error handled in mozilla::ipc::IPCResult |
661 | 0 | return MsgProcessingError; |
662 | 0 | } |
663 | 0 | |
664 | 0 | return MsgProcessed; |
665 | 0 | } |
666 | 0 | case PBackgroundStorage::Msg_ClearMatchingOriginAttributes__ID: |
667 | 0 | { |
668 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
669 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
670 | 0 | } |
671 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_ClearMatchingOriginAttributes", OTHER); |
672 | 0 |
|
673 | 0 | PickleIterator iter__(msg__); |
674 | 0 | OriginAttributesPattern pattern; |
675 | 0 |
|
676 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(pattern)))))) { |
677 | 0 | FatalError("Error deserializing 'OriginAttributesPattern'"); |
678 | 0 | return MsgValueError; |
679 | 0 | } |
680 | 0 | // Sentinel = 'pattern' |
681 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2105892009)))) { |
682 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'OriginAttributesPattern'"); |
683 | 0 | return MsgValueError; |
684 | 0 | } |
685 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
686 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
687 | 0 | FatalError("Transition error"); |
688 | 0 | return MsgValueError; |
689 | 0 | } |
690 | 0 | if ((!(RecvClearMatchingOriginAttributes(pattern)))) { |
691 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
692 | 0 | // Error handled in mozilla::ipc::IPCResult |
693 | 0 | return MsgProcessingError; |
694 | 0 | } |
695 | 0 | |
696 | 0 | return MsgProcessed; |
697 | 0 | } |
698 | 0 | case PBackgroundStorage::Reply___delete____ID: |
699 | 0 | { |
700 | 0 | return MsgProcessed; |
701 | 0 | } |
702 | 0 | default: |
703 | 0 | { |
704 | 0 | return MsgNotKnown; |
705 | 0 | } |
706 | 0 | } |
707 | 0 | } |
708 | | |
709 | | auto PBackgroundStorageParent::OnMessageReceived( |
710 | | const Message& msg__, |
711 | | Message*& reply__) -> PBackgroundStorageParent::Result |
712 | 0 | { |
713 | 0 | switch ((msg__).type()) { |
714 | 0 | case PBackgroundStorage::Msg_Preload__ID: |
715 | 0 | { |
716 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
717 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
718 | 0 | } |
719 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_Preload", OTHER); |
720 | 0 |
|
721 | 0 | PickleIterator iter__(msg__); |
722 | 0 | nsCString originSuffix; |
723 | 0 | nsCString originNoSuffix; |
724 | 0 | uint32_t alreadyLoadedCount; |
725 | 0 |
|
726 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(originSuffix)))))) { |
727 | 0 | FatalError("Error deserializing 'nsCString'"); |
728 | 0 | return MsgValueError; |
729 | 0 | } |
730 | 0 | // Sentinel = 'originSuffix' |
731 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4013336113)))) { |
732 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
733 | 0 | return MsgValueError; |
734 | 0 | } |
735 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(originNoSuffix)))))) { |
736 | 0 | FatalError("Error deserializing 'nsCString'"); |
737 | 0 | return MsgValueError; |
738 | 0 | } |
739 | 0 | // Sentinel = 'originNoSuffix' |
740 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2833071422)))) { |
741 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
742 | 0 | return MsgValueError; |
743 | 0 | } |
744 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(alreadyLoadedCount)))))) { |
745 | 0 | FatalError("Error deserializing 'uint32_t'"); |
746 | 0 | return MsgValueError; |
747 | 0 | } |
748 | 0 | // Sentinel = 'alreadyLoadedCount' |
749 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1974303722)))) { |
750 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'"); |
751 | 0 | return MsgValueError; |
752 | 0 | } |
753 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
754 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
755 | 0 | FatalError("Transition error"); |
756 | 0 | return MsgValueError; |
757 | 0 | } |
758 | 0 | int32_t id__ = Id(); |
759 | 0 | nsTArray<nsString> keys; |
760 | 0 | nsTArray<nsString> values; |
761 | 0 | nsresult rv; |
762 | 0 | if ((!(RecvPreload(originSuffix, originNoSuffix, alreadyLoadedCount, (&(keys)), (&(values)), (&(rv)))))) { |
763 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
764 | 0 | // Error handled in mozilla::ipc::IPCResult |
765 | 0 | return MsgProcessingError; |
766 | 0 | } |
767 | 0 | |
768 | 0 | reply__ = PBackgroundStorage::Reply_Preload(id__); |
769 | 0 |
|
770 | 0 | WriteIPDLParam(reply__, this, keys); |
771 | 0 | // Sentinel = 'keys' |
772 | 0 | (reply__)->WriteSentinel(1552012744); |
773 | 0 | WriteIPDLParam(reply__, this, values); |
774 | 0 | // Sentinel = 'values' |
775 | 0 | (reply__)->WriteSentinel(3006433652); |
776 | 0 | WriteIPDLParam(reply__, this, rv); |
777 | 0 | // Sentinel = 'rv' |
778 | 0 | (reply__)->WriteSentinel(702481058); |
779 | 0 |
|
780 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageParent")) { |
781 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
782 | 0 | } |
783 | 0 | return MsgProcessed; |
784 | 0 | } |
785 | 0 | default: |
786 | 0 | { |
787 | 0 | return MsgNotKnown; |
788 | 0 | } |
789 | 0 | } |
790 | 0 | } |
791 | | |
792 | | auto PBackgroundStorageParent::OnCallReceived( |
793 | | const Message& msg__, |
794 | | Message*& reply__) -> PBackgroundStorageParent::Result |
795 | 0 | { |
796 | 0 | MOZ_ASSERT_UNREACHABLE("message protocol not supported"); |
797 | 0 | return MsgNotKnown; |
798 | 0 | } |
799 | | |
800 | | auto PBackgroundStorageParent::GetProtocolTypeId() -> int32_t |
801 | 0 | { |
802 | 0 | return PBackgroundStorageMsgStart; |
803 | 0 | } |
804 | | |
805 | | auto PBackgroundStorageParent::DestroySubtree(ActorDestroyReason why) -> void |
806 | 0 | { |
807 | 0 | // Unregister from our manager. |
808 | 0 | Unregister(Id()); |
809 | 0 |
|
810 | 0 | // Reject owning pending responses. |
811 | 0 | (GetIPCChannel())->RejectPendingResponsesForActor(this); |
812 | 0 |
|
813 | 0 | // Finally, destroy "us". |
814 | 0 | ActorDestroy(why); |
815 | 0 | } |
816 | | |
817 | | auto PBackgroundStorageParent::DeallocSubtree() -> void |
818 | 0 | { |
819 | 0 | } |
820 | | |
821 | | |
822 | | |
823 | | } // namespace dom |
824 | | } // namespace mozilla |
825 | | namespace mozilla { |
826 | | namespace ipc { |
827 | | auto IPDLParamTraits<mozilla::dom::PBackgroundStorageParent>::Write( |
828 | | IPC::Message* aMsg, |
829 | | mozilla::ipc::IProtocol* aActor, |
830 | | const paramType& aVar) -> void |
831 | 0 | { |
832 | 0 | int32_t id; |
833 | 0 | if ((!(aVar))) { |
834 | 0 | id = 0; |
835 | 0 | } |
836 | 0 | else { |
837 | 0 | id = (aVar)->Id(); |
838 | 0 | if ((1) == (id)) { |
839 | 0 | (aActor)->FatalError("actor has been |delete|d"); |
840 | 0 | } |
841 | 0 | } |
842 | 0 | WriteIPDLParam(aMsg, aActor, id); |
843 | 0 | } |
844 | | |
845 | | auto IPDLParamTraits<mozilla::dom::PBackgroundStorageParent>::Read( |
846 | | const IPC::Message* aMsg, |
847 | | PickleIterator* aIter, |
848 | | mozilla::ipc::IProtocol* aActor, |
849 | | paramType* aVar) -> bool |
850 | 0 | { |
851 | 0 | mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PBackgroundStorage", PBackgroundStorageMsgStart); |
852 | 0 | if ((actor).isNothing()) { |
853 | 0 | return false; |
854 | 0 | } |
855 | 0 | |
856 | 0 | (*(aVar)) = static_cast<mozilla::dom::PBackgroundStorageParent*>((actor).value()); |
857 | 0 | return true; |
858 | 0 | } |
859 | | |
860 | | } // namespace ipc |
861 | | } // namespace mozilla |