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