/work/obj-fuzz/ipc/ipdl/PBackgroundIDBDatabaseChild.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/indexedDB/PBackgroundIDBDatabaseChild.h" |
8 | | #include "ipc/IPCMessageUtils.h" |
9 | | |
10 | | #include "mozilla/dom/indexedDB/PBackgroundIDBDatabaseFileChild.h" |
11 | | #include "mozilla/dom/indexedDB/PBackgroundIDBDatabaseRequestChild.h" |
12 | | #include "mozilla/dom/indexedDB/PBackgroundIDBFactoryChild.h" |
13 | | #include "mozilla/dom/indexedDB/PBackgroundIDBTransactionChild.h" |
14 | | #include "mozilla/dom/indexedDB/PBackgroundIDBVersionChangeTransactionChild.h" |
15 | | #include "mozilla/dom/PBackgroundMutableFileChild.h" |
16 | | #include "mozilla/ipc/PChildToParentStreamChild.h" |
17 | | #include "mozilla/ipc/PFileDescriptorSetChild.h" |
18 | | #include "mozilla/ipc/PIPCBlobInputStreamChild.h" |
19 | | #include "mozilla/ipc/PParentToChildStreamChild.h" |
20 | | |
21 | | #include "nsIFile.h" |
22 | | #include "GeckoProfiler.h" |
23 | | |
24 | | namespace mozilla { |
25 | | namespace dom { |
26 | | namespace indexedDB { |
27 | | |
28 | | |
29 | | auto PBackgroundIDBDatabaseChild::Recv__delete__() -> mozilla::ipc::IPCResult |
30 | 0 | { |
31 | 0 | return IPC_OK(); |
32 | 0 | } |
33 | | |
34 | | auto PBackgroundIDBDatabaseChild::RecvPBackgroundIDBVersionChangeTransactionConstructor( |
35 | | PBackgroundIDBVersionChangeTransactionChild* actor, |
36 | | const uint64_t& currentVersion, |
37 | | const uint64_t& requestedVersion, |
38 | | const int64_t& nextObjectStoreId, |
39 | | const int64_t& nextIndexId) -> mozilla::ipc::IPCResult |
40 | 0 | { |
41 | 0 | return IPC_OK(); |
42 | 0 | } |
43 | | |
44 | | auto PBackgroundIDBDatabaseChild::RecvPBackgroundMutableFileConstructor( |
45 | | PBackgroundMutableFileChild* actor, |
46 | | const nsString& name, |
47 | | const nsString& type) -> mozilla::ipc::IPCResult |
48 | 0 | { |
49 | 0 | return IPC_OK(); |
50 | 0 | } |
51 | | |
52 | | auto PBackgroundIDBDatabaseChild::ActorDestroy(ActorDestroyReason aWhy) -> void |
53 | 0 | { |
54 | 0 | } |
55 | | |
56 | | MOZ_IMPLICIT PBackgroundIDBDatabaseChild::PBackgroundIDBDatabaseChild() : |
57 | | mozilla::ipc::IProtocol(mozilla::ipc::ChildSide), |
58 | | mLivenessState(mozilla::ipc::LivenessState::Dead) |
59 | 0 | { |
60 | 0 | MOZ_COUNT_CTOR(PBackgroundIDBDatabaseChild); |
61 | 0 | } |
62 | | |
63 | | PBackgroundIDBDatabaseChild::~PBackgroundIDBDatabaseChild() |
64 | 0 | { |
65 | 0 | MOZ_COUNT_DTOR(PBackgroundIDBDatabaseChild); |
66 | 0 | } |
67 | | |
68 | | auto PBackgroundIDBDatabaseChild::Manager() const -> PBackgroundIDBFactoryChild* |
69 | 0 | { |
70 | 0 | return static_cast<PBackgroundIDBFactoryChild*>(IProtocol::Manager()); |
71 | 0 | } |
72 | | |
73 | | auto PBackgroundIDBDatabaseChild::ManagedPBackgroundIDBDatabaseFileChild(nsTArray<PBackgroundIDBDatabaseFileChild*>& aArr) const -> void |
74 | 0 | { |
75 | 0 | (mManagedPBackgroundIDBDatabaseFileChild).ToArray(aArr); |
76 | 0 | } |
77 | | |
78 | | auto PBackgroundIDBDatabaseChild::ManagedPBackgroundIDBDatabaseFileChild() const -> const ManagedContainer<PBackgroundIDBDatabaseFileChild>& |
79 | 0 | { |
80 | 0 | return mManagedPBackgroundIDBDatabaseFileChild; |
81 | 0 | } |
82 | | |
83 | | auto PBackgroundIDBDatabaseChild::ManagedPBackgroundIDBDatabaseRequestChild(nsTArray<PBackgroundIDBDatabaseRequestChild*>& aArr) const -> void |
84 | 0 | { |
85 | 0 | (mManagedPBackgroundIDBDatabaseRequestChild).ToArray(aArr); |
86 | 0 | } |
87 | | |
88 | | auto PBackgroundIDBDatabaseChild::ManagedPBackgroundIDBDatabaseRequestChild() const -> const ManagedContainer<PBackgroundIDBDatabaseRequestChild>& |
89 | 0 | { |
90 | 0 | return mManagedPBackgroundIDBDatabaseRequestChild; |
91 | 0 | } |
92 | | |
93 | | auto PBackgroundIDBDatabaseChild::ManagedPBackgroundIDBTransactionChild(nsTArray<PBackgroundIDBTransactionChild*>& aArr) const -> void |
94 | 0 | { |
95 | 0 | (mManagedPBackgroundIDBTransactionChild).ToArray(aArr); |
96 | 0 | } |
97 | | |
98 | | auto PBackgroundIDBDatabaseChild::ManagedPBackgroundIDBTransactionChild() const -> const ManagedContainer<PBackgroundIDBTransactionChild>& |
99 | 0 | { |
100 | 0 | return mManagedPBackgroundIDBTransactionChild; |
101 | 0 | } |
102 | | |
103 | | auto PBackgroundIDBDatabaseChild::ManagedPBackgroundIDBVersionChangeTransactionChild(nsTArray<PBackgroundIDBVersionChangeTransactionChild*>& aArr) const -> void |
104 | 0 | { |
105 | 0 | (mManagedPBackgroundIDBVersionChangeTransactionChild).ToArray(aArr); |
106 | 0 | } |
107 | | |
108 | | auto PBackgroundIDBDatabaseChild::ManagedPBackgroundIDBVersionChangeTransactionChild() const -> const ManagedContainer<PBackgroundIDBVersionChangeTransactionChild>& |
109 | 0 | { |
110 | 0 | return mManagedPBackgroundIDBVersionChangeTransactionChild; |
111 | 0 | } |
112 | | |
113 | | auto PBackgroundIDBDatabaseChild::ManagedPBackgroundMutableFileChild(nsTArray<PBackgroundMutableFileChild*>& aArr) const -> void |
114 | 0 | { |
115 | 0 | (mManagedPBackgroundMutableFileChild).ToArray(aArr); |
116 | 0 | } |
117 | | |
118 | | auto PBackgroundIDBDatabaseChild::ManagedPBackgroundMutableFileChild() const -> const ManagedContainer<PBackgroundMutableFileChild>& |
119 | 0 | { |
120 | 0 | return mManagedPBackgroundMutableFileChild; |
121 | 0 | } |
122 | | |
123 | | auto PBackgroundIDBDatabaseChild::SendDeleteMe() -> bool |
124 | 0 | { |
125 | 0 | IPC::Message* msg__ = PBackgroundIDBDatabase::Msg_DeleteMe(Id()); |
126 | 0 |
|
127 | 0 |
|
128 | 0 |
|
129 | 0 |
|
130 | 0 |
|
131 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBDatabaseChild")) { |
132 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundIDBDatabaseChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
133 | 0 | } |
134 | 0 | AUTO_PROFILER_LABEL("PBackgroundIDBDatabase::Msg_DeleteMe", OTHER); |
135 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
136 | 0 | mozilla::ipc::LogicError("Transition error"); |
137 | 0 | } |
138 | 0 |
|
139 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
140 | 0 | return sendok__; |
141 | 0 | } |
142 | | |
143 | | auto PBackgroundIDBDatabaseChild::SendBlocked() -> bool |
144 | 0 | { |
145 | 0 | IPC::Message* msg__ = PBackgroundIDBDatabase::Msg_Blocked(Id()); |
146 | 0 |
|
147 | 0 |
|
148 | 0 |
|
149 | 0 |
|
150 | 0 |
|
151 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBDatabaseChild")) { |
152 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundIDBDatabaseChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
153 | 0 | } |
154 | 0 | AUTO_PROFILER_LABEL("PBackgroundIDBDatabase::Msg_Blocked", OTHER); |
155 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
156 | 0 | mozilla::ipc::LogicError("Transition error"); |
157 | 0 | } |
158 | 0 |
|
159 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
160 | 0 | return sendok__; |
161 | 0 | } |
162 | | |
163 | | auto PBackgroundIDBDatabaseChild::SendClose() -> bool |
164 | 0 | { |
165 | 0 | IPC::Message* msg__ = PBackgroundIDBDatabase::Msg_Close(Id()); |
166 | 0 |
|
167 | 0 |
|
168 | 0 |
|
169 | 0 |
|
170 | 0 |
|
171 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBDatabaseChild")) { |
172 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundIDBDatabaseChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
173 | 0 | } |
174 | 0 | AUTO_PROFILER_LABEL("PBackgroundIDBDatabase::Msg_Close", OTHER); |
175 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
176 | 0 | mozilla::ipc::LogicError("Transition error"); |
177 | 0 | } |
178 | 0 |
|
179 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
180 | 0 | return sendok__; |
181 | 0 | } |
182 | | |
183 | | auto PBackgroundIDBDatabaseChild::SendPBackgroundIDBDatabaseFileConstructor(const IPCBlob& blob) -> PBackgroundIDBDatabaseFileChild* |
184 | 0 | { |
185 | 0 | return SendPBackgroundIDBDatabaseFileConstructor(AllocPBackgroundIDBDatabaseFileChild(blob), blob); |
186 | 0 | } |
187 | | |
188 | | auto PBackgroundIDBDatabaseChild::SendPBackgroundIDBDatabaseFileConstructor( |
189 | | PBackgroundIDBDatabaseFileChild* actor, |
190 | | const IPCBlob& blob) -> PBackgroundIDBDatabaseFileChild* |
191 | 0 | { |
192 | 0 | if ((!(actor))) { |
193 | 0 | NS_WARNING("Error constructing actor PBackgroundIDBDatabaseFileChild"); |
194 | 0 | return nullptr; |
195 | 0 | } |
196 | 0 | (actor)->SetManagerAndRegister(this); |
197 | 0 | (mManagedPBackgroundIDBDatabaseFileChild).PutEntry(actor); |
198 | 0 | (actor)->mLivenessState = mozilla::ipc::LivenessState::Start; |
199 | 0 |
|
200 | 0 | IPC::Message* msg__ = PBackgroundIDBDatabase::Msg_PBackgroundIDBDatabaseFileConstructor(Id()); |
201 | 0 |
|
202 | 0 | MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param"); |
203 | 0 | WriteIPDLParam(msg__, this, actor); |
204 | 0 | // Sentinel = 'actor' |
205 | 0 | (msg__)->WriteSentinel(875202478); |
206 | 0 | WriteIPDLParam(msg__, this, blob); |
207 | 0 | // Sentinel = 'blob' |
208 | 0 | (msg__)->WriteSentinel(1963585077); |
209 | 0 |
|
210 | 0 |
|
211 | 0 |
|
212 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBDatabaseChild")) { |
213 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundIDBDatabaseChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
214 | 0 | } |
215 | 0 | AUTO_PROFILER_LABEL("PBackgroundIDBDatabase::Msg_PBackgroundIDBDatabaseFileConstructor", OTHER); |
216 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
217 | 0 | mozilla::ipc::LogicError("Transition error"); |
218 | 0 | } |
219 | 0 |
|
220 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
221 | 0 | if ((!(sendok__))) { |
222 | 0 | FatalError("constructor for actor failed"); |
223 | 0 | return nullptr; |
224 | 0 | } |
225 | 0 | return actor; |
226 | 0 | } |
227 | | |
228 | | auto PBackgroundIDBDatabaseChild::SendPBackgroundIDBDatabaseRequestConstructor(const DatabaseRequestParams& params) -> PBackgroundIDBDatabaseRequestChild* |
229 | 0 | { |
230 | 0 | return SendPBackgroundIDBDatabaseRequestConstructor(AllocPBackgroundIDBDatabaseRequestChild(params), params); |
231 | 0 | } |
232 | | |
233 | | auto PBackgroundIDBDatabaseChild::SendPBackgroundIDBDatabaseRequestConstructor( |
234 | | PBackgroundIDBDatabaseRequestChild* actor, |
235 | | const DatabaseRequestParams& params) -> PBackgroundIDBDatabaseRequestChild* |
236 | 0 | { |
237 | 0 | if ((!(actor))) { |
238 | 0 | NS_WARNING("Error constructing actor PBackgroundIDBDatabaseRequestChild"); |
239 | 0 | return nullptr; |
240 | 0 | } |
241 | 0 | (actor)->SetManagerAndRegister(this); |
242 | 0 | (mManagedPBackgroundIDBDatabaseRequestChild).PutEntry(actor); |
243 | 0 | (actor)->mLivenessState = mozilla::ipc::LivenessState::Start; |
244 | 0 |
|
245 | 0 | IPC::Message* msg__ = PBackgroundIDBDatabase::Msg_PBackgroundIDBDatabaseRequestConstructor(Id()); |
246 | 0 |
|
247 | 0 | MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param"); |
248 | 0 | WriteIPDLParam(msg__, this, actor); |
249 | 0 | // Sentinel = 'actor' |
250 | 0 | (msg__)->WriteSentinel(875202478); |
251 | 0 | WriteIPDLParam(msg__, this, params); |
252 | 0 | // Sentinel = 'params' |
253 | 0 | (msg__)->WriteSentinel(1677790004); |
254 | 0 |
|
255 | 0 |
|
256 | 0 |
|
257 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBDatabaseChild")) { |
258 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundIDBDatabaseChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
259 | 0 | } |
260 | 0 | AUTO_PROFILER_LABEL("PBackgroundIDBDatabase::Msg_PBackgroundIDBDatabaseRequestConstructor", OTHER); |
261 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
262 | 0 | mozilla::ipc::LogicError("Transition error"); |
263 | 0 | } |
264 | 0 |
|
265 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
266 | 0 | if ((!(sendok__))) { |
267 | 0 | FatalError("constructor for actor failed"); |
268 | 0 | return nullptr; |
269 | 0 | } |
270 | 0 | return actor; |
271 | 0 | } |
272 | | |
273 | | auto PBackgroundIDBDatabaseChild::SendPBackgroundIDBTransactionConstructor( |
274 | | const nsTArray<nsString>& objectStoreNames, |
275 | | const Mode& mode) -> PBackgroundIDBTransactionChild* |
276 | 0 | { |
277 | 0 | return SendPBackgroundIDBTransactionConstructor(AllocPBackgroundIDBTransactionChild(objectStoreNames, mode), objectStoreNames, mode); |
278 | 0 | } |
279 | | |
280 | | auto PBackgroundIDBDatabaseChild::SendPBackgroundIDBTransactionConstructor( |
281 | | PBackgroundIDBTransactionChild* actor, |
282 | | const nsTArray<nsString>& objectStoreNames, |
283 | | const Mode& mode) -> PBackgroundIDBTransactionChild* |
284 | 0 | { |
285 | 0 | if ((!(actor))) { |
286 | 0 | NS_WARNING("Error constructing actor PBackgroundIDBTransactionChild"); |
287 | 0 | return nullptr; |
288 | 0 | } |
289 | 0 | (actor)->SetManagerAndRegister(this); |
290 | 0 | (mManagedPBackgroundIDBTransactionChild).PutEntry(actor); |
291 | 0 | (actor)->mLivenessState = mozilla::ipc::LivenessState::Start; |
292 | 0 |
|
293 | 0 | IPC::Message* msg__ = PBackgroundIDBDatabase::Msg_PBackgroundIDBTransactionConstructor(Id()); |
294 | 0 |
|
295 | 0 | MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param"); |
296 | 0 | WriteIPDLParam(msg__, this, actor); |
297 | 0 | // Sentinel = 'actor' |
298 | 0 | (msg__)->WriteSentinel(875202478); |
299 | 0 | WriteIPDLParam(msg__, this, objectStoreNames); |
300 | 0 | // Sentinel = 'objectStoreNames' |
301 | 0 | (msg__)->WriteSentinel(2433166752); |
302 | 0 | WriteIPDLParam(msg__, this, mode); |
303 | 0 | // Sentinel = 'mode' |
304 | 0 | (msg__)->WriteSentinel(3911367285); |
305 | 0 |
|
306 | 0 |
|
307 | 0 |
|
308 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBDatabaseChild")) { |
309 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundIDBDatabaseChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
310 | 0 | } |
311 | 0 | AUTO_PROFILER_LABEL("PBackgroundIDBDatabase::Msg_PBackgroundIDBTransactionConstructor", OTHER); |
312 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
313 | 0 | mozilla::ipc::LogicError("Transition error"); |
314 | 0 | } |
315 | 0 |
|
316 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
317 | 0 | if ((!(sendok__))) { |
318 | 0 | FatalError("constructor for actor failed"); |
319 | 0 | return nullptr; |
320 | 0 | } |
321 | 0 | return actor; |
322 | 0 | } |
323 | | |
324 | | auto PBackgroundIDBDatabaseChild::RemoveManagee( |
325 | | int32_t aProtocolId, |
326 | | IProtocol* aListener) -> void |
327 | 0 | { |
328 | 0 | switch (aProtocolId) { |
329 | 0 | case PBackgroundIDBDatabaseFileMsgStart: |
330 | 0 | { |
331 | 0 | PBackgroundIDBDatabaseFileChild* actor = static_cast<PBackgroundIDBDatabaseFileChild*>(aListener); |
332 | 0 | auto& container = mManagedPBackgroundIDBDatabaseFileChild; |
333 | 0 | MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!"); |
334 | 0 |
|
335 | 0 | (container).RemoveEntry(actor); |
336 | 0 | DeallocPBackgroundIDBDatabaseFileChild(actor); |
337 | 0 | return; |
338 | 0 | } |
339 | 0 | case PBackgroundIDBDatabaseRequestMsgStart: |
340 | 0 | { |
341 | 0 | PBackgroundIDBDatabaseRequestChild* actor = static_cast<PBackgroundIDBDatabaseRequestChild*>(aListener); |
342 | 0 | auto& container = mManagedPBackgroundIDBDatabaseRequestChild; |
343 | 0 | MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!"); |
344 | 0 |
|
345 | 0 | (container).RemoveEntry(actor); |
346 | 0 | DeallocPBackgroundIDBDatabaseRequestChild(actor); |
347 | 0 | return; |
348 | 0 | } |
349 | 0 | case PBackgroundIDBTransactionMsgStart: |
350 | 0 | { |
351 | 0 | PBackgroundIDBTransactionChild* actor = static_cast<PBackgroundIDBTransactionChild*>(aListener); |
352 | 0 | auto& container = mManagedPBackgroundIDBTransactionChild; |
353 | 0 | MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!"); |
354 | 0 |
|
355 | 0 | (container).RemoveEntry(actor); |
356 | 0 | DeallocPBackgroundIDBTransactionChild(actor); |
357 | 0 | return; |
358 | 0 | } |
359 | 0 | case PBackgroundIDBVersionChangeTransactionMsgStart: |
360 | 0 | { |
361 | 0 | PBackgroundIDBVersionChangeTransactionChild* actor = static_cast<PBackgroundIDBVersionChangeTransactionChild*>(aListener); |
362 | 0 | auto& container = mManagedPBackgroundIDBVersionChangeTransactionChild; |
363 | 0 | MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!"); |
364 | 0 |
|
365 | 0 | (container).RemoveEntry(actor); |
366 | 0 | DeallocPBackgroundIDBVersionChangeTransactionChild(actor); |
367 | 0 | return; |
368 | 0 | } |
369 | 0 | case PBackgroundMutableFileMsgStart: |
370 | 0 | { |
371 | 0 | PBackgroundMutableFileChild* actor = static_cast<PBackgroundMutableFileChild*>(aListener); |
372 | 0 | auto& container = mManagedPBackgroundMutableFileChild; |
373 | 0 | MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!"); |
374 | 0 |
|
375 | 0 | (container).RemoveEntry(actor); |
376 | 0 | DeallocPBackgroundMutableFileChild(actor); |
377 | 0 | return; |
378 | 0 | } |
379 | 0 | default: |
380 | 0 | { |
381 | 0 | FatalError("unreached"); |
382 | 0 | return; |
383 | 0 | } |
384 | 0 | } |
385 | 0 | } |
386 | | |
387 | | auto PBackgroundIDBDatabaseChild::OnMessageReceived(const Message& msg__) -> PBackgroundIDBDatabaseChild::Result |
388 | 0 | { |
389 | 0 | switch ((msg__).type()) { |
390 | 0 | case PBackgroundIDBDatabase::Reply_PBackgroundIDBDatabaseFileConstructor__ID: |
391 | 0 | { |
392 | 0 | return MsgProcessed; |
393 | 0 | } |
394 | 0 | case PBackgroundIDBDatabase::Reply_PBackgroundIDBDatabaseRequestConstructor__ID: |
395 | 0 | { |
396 | 0 | return MsgProcessed; |
397 | 0 | } |
398 | 0 | case PBackgroundIDBDatabase::Reply_PBackgroundIDBTransactionConstructor__ID: |
399 | 0 | { |
400 | 0 | return MsgProcessed; |
401 | 0 | } |
402 | 0 | case PBackgroundIDBDatabase::Msg___delete____ID: |
403 | 0 | { |
404 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBDatabaseChild")) { |
405 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundIDBDatabaseChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
406 | 0 | } |
407 | 0 | AUTO_PROFILER_LABEL("PBackgroundIDBDatabase::Msg___delete__", OTHER); |
408 | 0 |
|
409 | 0 | PickleIterator iter__(msg__); |
410 | 0 | PBackgroundIDBDatabaseChild* actor; |
411 | 0 |
|
412 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(actor)))))) { |
413 | 0 | FatalError("Error deserializing 'PBackgroundIDBDatabaseChild'"); |
414 | 0 | return MsgValueError; |
415 | 0 | } |
416 | 0 | if ((!((*((&(actor))))))) { |
417 | 0 | FatalError("Error deserializing 'PBackgroundIDBDatabaseChild'"); |
418 | 0 | return MsgValueError; |
419 | 0 | } |
420 | 0 | // Sentinel = 'actor' |
421 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) { |
422 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'PBackgroundIDBDatabaseChild'"); |
423 | 0 | return MsgValueError; |
424 | 0 | } |
425 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
426 | 0 | if ((!(StateTransition(true, (&(mLivenessState)))))) { |
427 | 0 | FatalError("Transition error"); |
428 | 0 | return MsgValueError; |
429 | 0 | } |
430 | 0 | if ((!(Recv__delete__()))) { |
431 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
432 | 0 | // Error handled in mozilla::ipc::IPCResult |
433 | 0 | return MsgProcessingError; |
434 | 0 | } |
435 | 0 | |
436 | 0 | |
437 | 0 | IProtocol* mgr = (actor)->Manager(); |
438 | 0 | (actor)->DestroySubtree(Deletion); |
439 | 0 | (actor)->DeallocSubtree(); |
440 | 0 | (mgr)->RemoveManagee(PBackgroundIDBDatabaseMsgStart, actor); |
441 | 0 |
|
442 | 0 | return MsgProcessed; |
443 | 0 | } |
444 | 0 | case PBackgroundIDBDatabase::Msg_VersionChange__ID: |
445 | 0 | { |
446 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBDatabaseChild")) { |
447 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundIDBDatabaseChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
448 | 0 | } |
449 | 0 | AUTO_PROFILER_LABEL("PBackgroundIDBDatabase::Msg_VersionChange", OTHER); |
450 | 0 |
|
451 | 0 | PickleIterator iter__(msg__); |
452 | 0 | uint64_t oldVersion; |
453 | 0 | NullableVersion newVersion; |
454 | 0 |
|
455 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(oldVersion)))))) { |
456 | 0 | FatalError("Error deserializing 'uint64_t'"); |
457 | 0 | return MsgValueError; |
458 | 0 | } |
459 | 0 | // Sentinel = 'oldVersion' |
460 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1241972167)))) { |
461 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'"); |
462 | 0 | return MsgValueError; |
463 | 0 | } |
464 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(newVersion)))))) { |
465 | 0 | FatalError("Error deserializing 'NullableVersion'"); |
466 | 0 | return MsgValueError; |
467 | 0 | } |
468 | 0 | // Sentinel = 'newVersion' |
469 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2786012988)))) { |
470 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'NullableVersion'"); |
471 | 0 | return MsgValueError; |
472 | 0 | } |
473 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
474 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
475 | 0 | FatalError("Transition error"); |
476 | 0 | return MsgValueError; |
477 | 0 | } |
478 | 0 | if ((!(RecvVersionChange(oldVersion, newVersion)))) { |
479 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
480 | 0 | // Error handled in mozilla::ipc::IPCResult |
481 | 0 | return MsgProcessingError; |
482 | 0 | } |
483 | 0 | |
484 | 0 | return MsgProcessed; |
485 | 0 | } |
486 | 0 | case PBackgroundIDBDatabase::Msg_Invalidate__ID: |
487 | 0 | { |
488 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBDatabaseChild")) { |
489 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundIDBDatabaseChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
490 | 0 | } |
491 | 0 | AUTO_PROFILER_LABEL("PBackgroundIDBDatabase::Msg_Invalidate", OTHER); |
492 | 0 |
|
493 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
494 | 0 | FatalError("Transition error"); |
495 | 0 | return MsgValueError; |
496 | 0 | } |
497 | 0 | if ((!(RecvInvalidate()))) { |
498 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
499 | 0 | // Error handled in mozilla::ipc::IPCResult |
500 | 0 | return MsgProcessingError; |
501 | 0 | } |
502 | 0 | |
503 | 0 | return MsgProcessed; |
504 | 0 | } |
505 | 0 | case PBackgroundIDBDatabase::Msg_CloseAfterInvalidationComplete__ID: |
506 | 0 | { |
507 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBDatabaseChild")) { |
508 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundIDBDatabaseChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
509 | 0 | } |
510 | 0 | AUTO_PROFILER_LABEL("PBackgroundIDBDatabase::Msg_CloseAfterInvalidationComplete", OTHER); |
511 | 0 |
|
512 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
513 | 0 | FatalError("Transition error"); |
514 | 0 | return MsgValueError; |
515 | 0 | } |
516 | 0 | if ((!(RecvCloseAfterInvalidationComplete()))) { |
517 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
518 | 0 | // Error handled in mozilla::ipc::IPCResult |
519 | 0 | return MsgProcessingError; |
520 | 0 | } |
521 | 0 | |
522 | 0 | return MsgProcessed; |
523 | 0 | } |
524 | 0 | case PBackgroundIDBDatabase::Msg_PBackgroundIDBVersionChangeTransactionConstructor__ID: |
525 | 0 | { |
526 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBDatabaseChild")) { |
527 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundIDBDatabaseChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
528 | 0 | } |
529 | 0 | AUTO_PROFILER_LABEL("PBackgroundIDBDatabase::Msg_PBackgroundIDBVersionChangeTransactionConstructor", OTHER); |
530 | 0 |
|
531 | 0 | PickleIterator iter__(msg__); |
532 | 0 | ActorHandle handle__; |
533 | 0 | PBackgroundIDBVersionChangeTransactionChild* actor; |
534 | 0 | uint64_t currentVersion; |
535 | 0 | uint64_t requestedVersion; |
536 | 0 | int64_t nextObjectStoreId; |
537 | 0 | int64_t nextIndexId; |
538 | 0 |
|
539 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(handle__)))))) { |
540 | 0 | FatalError("Error deserializing 'ActorHandle'"); |
541 | 0 | return MsgValueError; |
542 | 0 | } |
543 | 0 | // Sentinel = 'actor' |
544 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) { |
545 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'"); |
546 | 0 | return MsgValueError; |
547 | 0 | } |
548 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(currentVersion)))))) { |
549 | 0 | FatalError("Error deserializing 'uint64_t'"); |
550 | 0 | return MsgValueError; |
551 | 0 | } |
552 | 0 | // Sentinel = 'currentVersion' |
553 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1138986547)))) { |
554 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'"); |
555 | 0 | return MsgValueError; |
556 | 0 | } |
557 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(requestedVersion)))))) { |
558 | 0 | FatalError("Error deserializing 'uint64_t'"); |
559 | 0 | return MsgValueError; |
560 | 0 | } |
561 | 0 | // Sentinel = 'requestedVersion' |
562 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2070076908)))) { |
563 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'"); |
564 | 0 | return MsgValueError; |
565 | 0 | } |
566 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(nextObjectStoreId)))))) { |
567 | 0 | FatalError("Error deserializing 'int64_t'"); |
568 | 0 | return MsgValueError; |
569 | 0 | } |
570 | 0 | // Sentinel = 'nextObjectStoreId' |
571 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 882891943)))) { |
572 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'int64_t'"); |
573 | 0 | return MsgValueError; |
574 | 0 | } |
575 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(nextIndexId)))))) { |
576 | 0 | FatalError("Error deserializing 'int64_t'"); |
577 | 0 | return MsgValueError; |
578 | 0 | } |
579 | 0 | // Sentinel = 'nextIndexId' |
580 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 298839989)))) { |
581 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'int64_t'"); |
582 | 0 | return MsgValueError; |
583 | 0 | } |
584 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
585 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
586 | 0 | FatalError("Transition error"); |
587 | 0 | return MsgValueError; |
588 | 0 | } |
589 | 0 | actor = AllocPBackgroundIDBVersionChangeTransactionChild(currentVersion, requestedVersion, nextObjectStoreId, nextIndexId); |
590 | 0 | if ((!(actor))) { |
591 | 0 | NS_WARNING("Error constructing actor PBackgroundIDBVersionChangeTransactionChild"); |
592 | 0 | return MsgValueError; |
593 | 0 | } |
594 | 0 | (actor)->SetManagerAndRegister(this, (handle__).mId); |
595 | 0 | (mManagedPBackgroundIDBVersionChangeTransactionChild).PutEntry(actor); |
596 | 0 | (actor)->mLivenessState = mozilla::ipc::LivenessState::Start; |
597 | 0 |
|
598 | 0 | if ((!(RecvPBackgroundIDBVersionChangeTransactionConstructor(actor, currentVersion, requestedVersion, nextObjectStoreId, nextIndexId)))) { |
599 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
600 | 0 | // Error handled in mozilla::ipc::IPCResult |
601 | 0 | return MsgProcessingError; |
602 | 0 | } |
603 | 0 | |
604 | 0 | return MsgProcessed; |
605 | 0 | } |
606 | 0 | case PBackgroundIDBDatabase::Msg_PBackgroundMutableFileConstructor__ID: |
607 | 0 | { |
608 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBDatabaseChild")) { |
609 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundIDBDatabaseChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
610 | 0 | } |
611 | 0 | AUTO_PROFILER_LABEL("PBackgroundIDBDatabase::Msg_PBackgroundMutableFileConstructor", OTHER); |
612 | 0 |
|
613 | 0 | PickleIterator iter__(msg__); |
614 | 0 | ActorHandle handle__; |
615 | 0 | PBackgroundMutableFileChild* actor; |
616 | 0 | nsString name; |
617 | 0 | nsString type; |
618 | 0 |
|
619 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(handle__)))))) { |
620 | 0 | FatalError("Error deserializing 'ActorHandle'"); |
621 | 0 | return MsgValueError; |
622 | 0 | } |
623 | 0 | // Sentinel = 'actor' |
624 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) { |
625 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'"); |
626 | 0 | return MsgValueError; |
627 | 0 | } |
628 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(name)))))) { |
629 | 0 | FatalError("Error deserializing 'nsString'"); |
630 | 0 | return MsgValueError; |
631 | 0 | } |
632 | 0 | // Sentinel = 'name' |
633 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 15034981)))) { |
634 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsString'"); |
635 | 0 | return MsgValueError; |
636 | 0 | } |
637 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(type)))))) { |
638 | 0 | FatalError("Error deserializing 'nsString'"); |
639 | 0 | return MsgValueError; |
640 | 0 | } |
641 | 0 | // Sentinel = 'type' |
642 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2982068540)))) { |
643 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsString'"); |
644 | 0 | return MsgValueError; |
645 | 0 | } |
646 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
647 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
648 | 0 | FatalError("Transition error"); |
649 | 0 | return MsgValueError; |
650 | 0 | } |
651 | 0 | actor = AllocPBackgroundMutableFileChild(name, type); |
652 | 0 | if ((!(actor))) { |
653 | 0 | NS_WARNING("Error constructing actor PBackgroundMutableFileChild"); |
654 | 0 | return MsgValueError; |
655 | 0 | } |
656 | 0 | (actor)->SetManagerAndRegister(this, (handle__).mId); |
657 | 0 | (mManagedPBackgroundMutableFileChild).PutEntry(actor); |
658 | 0 | (actor)->mLivenessState = mozilla::ipc::LivenessState::Start; |
659 | 0 |
|
660 | 0 | if ((!(RecvPBackgroundMutableFileConstructor(actor, name, type)))) { |
661 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
662 | 0 | // Error handled in mozilla::ipc::IPCResult |
663 | 0 | return MsgProcessingError; |
664 | 0 | } |
665 | 0 | |
666 | 0 | return MsgProcessed; |
667 | 0 | } |
668 | 0 | default: |
669 | 0 | { |
670 | 0 | return MsgNotKnown; |
671 | 0 | } |
672 | 0 | } |
673 | 0 | } |
674 | | |
675 | | auto PBackgroundIDBDatabaseChild::OnMessageReceived( |
676 | | const Message& msg__, |
677 | | Message*& reply__) -> PBackgroundIDBDatabaseChild::Result |
678 | 0 | { |
679 | 0 | return MsgNotKnown; |
680 | 0 | } |
681 | | |
682 | | auto PBackgroundIDBDatabaseChild::OnCallReceived( |
683 | | const Message& msg__, |
684 | | Message*& reply__) -> PBackgroundIDBDatabaseChild::Result |
685 | 0 | { |
686 | 0 | MOZ_ASSERT_UNREACHABLE("message protocol not supported"); |
687 | 0 | return MsgNotKnown; |
688 | 0 | } |
689 | | |
690 | | auto PBackgroundIDBDatabaseChild::GetProtocolTypeId() -> int32_t |
691 | 0 | { |
692 | 0 | return PBackgroundIDBDatabaseMsgStart; |
693 | 0 | } |
694 | | |
695 | | auto PBackgroundIDBDatabaseChild::DestroySubtree(ActorDestroyReason why) -> void |
696 | 0 | { |
697 | 0 | // Unregister from our manager. |
698 | 0 | Unregister(Id()); |
699 | 0 |
|
700 | 0 | ActorDestroyReason subtreewhy = (((why) == (Deletion)) || ((why) == (FailedConstructor)) ? AncestorDeletion : why); |
701 | 0 |
|
702 | 0 | { |
703 | 0 | // Recursively shutting down PBackgroundIDBDatabaseFile kids |
704 | 0 | nsTArray<PBackgroundIDBDatabaseFileChild*> kids; |
705 | 0 | // Accumulate kids into a stable structure to iterate over |
706 | 0 | ManagedPBackgroundIDBDatabaseFileChild(kids); |
707 | 0 | for (auto& kid : kids) { |
708 | 0 | // Guarding against a child removing a sibling from the list during the iteration. |
709 | 0 | if ((mManagedPBackgroundIDBDatabaseFileChild).Contains(kid)) { |
710 | 0 | (kid)->DestroySubtree(subtreewhy); |
711 | 0 | } |
712 | 0 | } |
713 | 0 | } |
714 | 0 | { |
715 | 0 | // Recursively shutting down PBackgroundIDBDatabaseRequest kids |
716 | 0 | nsTArray<PBackgroundIDBDatabaseRequestChild*> kids; |
717 | 0 | // Accumulate kids into a stable structure to iterate over |
718 | 0 | ManagedPBackgroundIDBDatabaseRequestChild(kids); |
719 | 0 | for (auto& kid : kids) { |
720 | 0 | // Guarding against a child removing a sibling from the list during the iteration. |
721 | 0 | if ((mManagedPBackgroundIDBDatabaseRequestChild).Contains(kid)) { |
722 | 0 | (kid)->DestroySubtree(subtreewhy); |
723 | 0 | } |
724 | 0 | } |
725 | 0 | } |
726 | 0 | { |
727 | 0 | // Recursively shutting down PBackgroundIDBTransaction kids |
728 | 0 | nsTArray<PBackgroundIDBTransactionChild*> kids; |
729 | 0 | // Accumulate kids into a stable structure to iterate over |
730 | 0 | ManagedPBackgroundIDBTransactionChild(kids); |
731 | 0 | for (auto& kid : kids) { |
732 | 0 | // Guarding against a child removing a sibling from the list during the iteration. |
733 | 0 | if ((mManagedPBackgroundIDBTransactionChild).Contains(kid)) { |
734 | 0 | (kid)->DestroySubtree(subtreewhy); |
735 | 0 | } |
736 | 0 | } |
737 | 0 | } |
738 | 0 | { |
739 | 0 | // Recursively shutting down PBackgroundIDBVersionChangeTransaction kids |
740 | 0 | nsTArray<PBackgroundIDBVersionChangeTransactionChild*> kids; |
741 | 0 | // Accumulate kids into a stable structure to iterate over |
742 | 0 | ManagedPBackgroundIDBVersionChangeTransactionChild(kids); |
743 | 0 | for (auto& kid : kids) { |
744 | 0 | // Guarding against a child removing a sibling from the list during the iteration. |
745 | 0 | if ((mManagedPBackgroundIDBVersionChangeTransactionChild).Contains(kid)) { |
746 | 0 | (kid)->DestroySubtree(subtreewhy); |
747 | 0 | } |
748 | 0 | } |
749 | 0 | } |
750 | 0 | { |
751 | 0 | // Recursively shutting down PBackgroundMutableFile kids |
752 | 0 | nsTArray<PBackgroundMutableFileChild*> kids; |
753 | 0 | // Accumulate kids into a stable structure to iterate over |
754 | 0 | ManagedPBackgroundMutableFileChild(kids); |
755 | 0 | for (auto& kid : kids) { |
756 | 0 | // Guarding against a child removing a sibling from the list during the iteration. |
757 | 0 | if ((mManagedPBackgroundMutableFileChild).Contains(kid)) { |
758 | 0 | (kid)->DestroySubtree(subtreewhy); |
759 | 0 | } |
760 | 0 | } |
761 | 0 | } |
762 | 0 |
|
763 | 0 | // Reject owning pending responses. |
764 | 0 | (GetIPCChannel())->RejectPendingResponsesForActor(this); |
765 | 0 |
|
766 | 0 | // Finally, destroy "us". |
767 | 0 | ActorDestroy(why); |
768 | 0 | } |
769 | | |
770 | | auto PBackgroundIDBDatabaseChild::DeallocSubtree() -> void |
771 | 0 | { |
772 | 0 | { |
773 | 0 | // Recursively deleting PBackgroundIDBDatabaseFile kids |
774 | 0 | for (auto iter = (mManagedPBackgroundIDBDatabaseFileChild).Iter(); (!((iter).Done())); (iter).Next()) { |
775 | 0 | (((iter).Get())->GetKey())->DeallocSubtree(); |
776 | 0 | } |
777 | 0 |
|
778 | 0 | for (auto iter = (mManagedPBackgroundIDBDatabaseFileChild).Iter(); (!((iter).Done())); (iter).Next()) { |
779 | 0 | DeallocPBackgroundIDBDatabaseFileChild(((iter).Get())->GetKey()); |
780 | 0 | } |
781 | 0 | (mManagedPBackgroundIDBDatabaseFileChild).Clear(); |
782 | 0 | } |
783 | 0 | { |
784 | 0 | // Recursively deleting PBackgroundIDBDatabaseRequest kids |
785 | 0 | for (auto iter = (mManagedPBackgroundIDBDatabaseRequestChild).Iter(); (!((iter).Done())); (iter).Next()) { |
786 | 0 | (((iter).Get())->GetKey())->DeallocSubtree(); |
787 | 0 | } |
788 | 0 |
|
789 | 0 | for (auto iter = (mManagedPBackgroundIDBDatabaseRequestChild).Iter(); (!((iter).Done())); (iter).Next()) { |
790 | 0 | DeallocPBackgroundIDBDatabaseRequestChild(((iter).Get())->GetKey()); |
791 | 0 | } |
792 | 0 | (mManagedPBackgroundIDBDatabaseRequestChild).Clear(); |
793 | 0 | } |
794 | 0 | { |
795 | 0 | // Recursively deleting PBackgroundIDBTransaction kids |
796 | 0 | for (auto iter = (mManagedPBackgroundIDBTransactionChild).Iter(); (!((iter).Done())); (iter).Next()) { |
797 | 0 | (((iter).Get())->GetKey())->DeallocSubtree(); |
798 | 0 | } |
799 | 0 |
|
800 | 0 | for (auto iter = (mManagedPBackgroundIDBTransactionChild).Iter(); (!((iter).Done())); (iter).Next()) { |
801 | 0 | DeallocPBackgroundIDBTransactionChild(((iter).Get())->GetKey()); |
802 | 0 | } |
803 | 0 | (mManagedPBackgroundIDBTransactionChild).Clear(); |
804 | 0 | } |
805 | 0 | { |
806 | 0 | // Recursively deleting PBackgroundIDBVersionChangeTransaction kids |
807 | 0 | for (auto iter = (mManagedPBackgroundIDBVersionChangeTransactionChild).Iter(); (!((iter).Done())); (iter).Next()) { |
808 | 0 | (((iter).Get())->GetKey())->DeallocSubtree(); |
809 | 0 | } |
810 | 0 |
|
811 | 0 | for (auto iter = (mManagedPBackgroundIDBVersionChangeTransactionChild).Iter(); (!((iter).Done())); (iter).Next()) { |
812 | 0 | DeallocPBackgroundIDBVersionChangeTransactionChild(((iter).Get())->GetKey()); |
813 | 0 | } |
814 | 0 | (mManagedPBackgroundIDBVersionChangeTransactionChild).Clear(); |
815 | 0 | } |
816 | 0 | { |
817 | 0 | // Recursively deleting PBackgroundMutableFile kids |
818 | 0 | for (auto iter = (mManagedPBackgroundMutableFileChild).Iter(); (!((iter).Done())); (iter).Next()) { |
819 | 0 | (((iter).Get())->GetKey())->DeallocSubtree(); |
820 | 0 | } |
821 | 0 |
|
822 | 0 | for (auto iter = (mManagedPBackgroundMutableFileChild).Iter(); (!((iter).Done())); (iter).Next()) { |
823 | 0 | DeallocPBackgroundMutableFileChild(((iter).Get())->GetKey()); |
824 | 0 | } |
825 | 0 | (mManagedPBackgroundMutableFileChild).Clear(); |
826 | 0 | } |
827 | 0 | } |
828 | | |
829 | | |
830 | | |
831 | | } // namespace indexedDB |
832 | | } // namespace dom |
833 | | } // namespace mozilla |
834 | | namespace mozilla { |
835 | | namespace ipc { |
836 | | auto IPDLParamTraits<mozilla::dom::indexedDB::PBackgroundIDBDatabaseChild>::Write( |
837 | | IPC::Message* aMsg, |
838 | | mozilla::ipc::IProtocol* aActor, |
839 | | const paramType& aVar) -> void |
840 | 0 | { |
841 | 0 | int32_t id; |
842 | 0 | if ((!(aVar))) { |
843 | 0 | id = 0; |
844 | 0 | } |
845 | 0 | else { |
846 | 0 | id = (aVar)->Id(); |
847 | 0 | if ((1) == (id)) { |
848 | 0 | (aActor)->FatalError("actor has been |delete|d"); |
849 | 0 | } |
850 | 0 | } |
851 | 0 | WriteIPDLParam(aMsg, aActor, id); |
852 | 0 | } |
853 | | |
854 | | auto IPDLParamTraits<mozilla::dom::indexedDB::PBackgroundIDBDatabaseChild>::Read( |
855 | | const IPC::Message* aMsg, |
856 | | PickleIterator* aIter, |
857 | | mozilla::ipc::IProtocol* aActor, |
858 | | paramType* aVar) -> bool |
859 | 0 | { |
860 | 0 | mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PBackgroundIDBDatabase", PBackgroundIDBDatabaseMsgStart); |
861 | 0 | if ((actor).isNothing()) { |
862 | 0 | return false; |
863 | 0 | } |
864 | 0 | |
865 | 0 | (*(aVar)) = static_cast<mozilla::dom::indexedDB::PBackgroundIDBDatabaseChild*>((actor).value()); |
866 | 0 | return true; |
867 | 0 | } |
868 | | |
869 | | } // namespace ipc |
870 | | } // namespace mozilla |