/work/obj-fuzz/ipc/ipdl/PBackgroundIDBFactory.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/quota/SerializationHelpers.h" |
8 | | #include "mozilla/ipc/PBackgroundParent.h" |
9 | | #include "mozilla/ipc/PBackgroundChild.h" |
10 | | #include "mozilla/dom/indexedDB/PBackgroundIDBDatabaseParent.h" |
11 | | #include "mozilla/dom/indexedDB/PBackgroundIDBDatabaseChild.h" |
12 | | #include "mozilla/dom/indexedDB/PBackgroundIDBFactoryRequestParent.h" |
13 | | #include "mozilla/dom/indexedDB/PBackgroundIDBFactoryRequestChild.h" |
14 | | #include "mozilla/dom/indexedDB/PBackgroundIDBFactory.h" |
15 | | |
16 | | namespace mozilla { |
17 | | namespace dom { |
18 | | namespace indexedDB { |
19 | | namespace PBackgroundIDBFactory { |
20 | | |
21 | | nsresult |
22 | | CreateEndpoints( |
23 | | base::ProcessId aParentDestPid, |
24 | | base::ProcessId aChildDestPid, |
25 | | mozilla::ipc::Endpoint<mozilla::dom::indexedDB::PBackgroundIDBFactoryParent>* aParent, |
26 | | mozilla::ipc::Endpoint<mozilla::dom::indexedDB::PBackgroundIDBFactoryChild>* aChild) |
27 | 0 | { |
28 | 0 | return mozilla::ipc::CreateEndpoints(mozilla::ipc::PrivateIPDLInterface(), aParentDestPid, aChildDestPid, aParent, aChild); |
29 | 0 | } |
30 | | IPC::Message* |
31 | | Msg_DeleteMe(int32_t routingId) |
32 | 0 | { |
33 | 0 | return IPC::Message::IPDLMessage(routingId, Msg_DeleteMe__ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::NOT_REPLY)); |
34 | 0 | } |
35 | | IPC::Message* |
36 | | Msg_PBackgroundIDBFactoryRequestConstructor(int32_t routingId) |
37 | 0 | { |
38 | 0 | return IPC::Message::IPDLMessage(routingId, Msg_PBackgroundIDBFactoryRequestConstructor__ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::NOT_REPLY)); |
39 | 0 | } |
40 | | IPC::Message* |
41 | | Reply_PBackgroundIDBFactoryRequestConstructor(int32_t routingId) |
42 | 0 | { |
43 | 0 | return IPC::Message::IPDLMessage(routingId, Reply_PBackgroundIDBFactoryRequestConstructor__ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::REPLY)); |
44 | 0 | } |
45 | | IPC::Message* |
46 | | Msg_IncrementLoggingRequestSerialNumber(int32_t routingId) |
47 | 0 | { |
48 | 0 | return IPC::Message::IPDLMessage(routingId, Msg_IncrementLoggingRequestSerialNumber__ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::NOT_REPLY)); |
49 | 0 | } |
50 | | IPC::Message* |
51 | | Msg___delete__(int32_t routingId) |
52 | 0 | { |
53 | 0 | return IPC::Message::IPDLMessage(routingId, Msg___delete____ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::NOT_REPLY)); |
54 | 0 | } |
55 | | IPC::Message* |
56 | | Reply___delete__(int32_t routingId) |
57 | 0 | { |
58 | 0 | return IPC::Message::IPDLMessage(routingId, Reply___delete____ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::REPLY)); |
59 | 0 | } |
60 | | IPC::Message* |
61 | | Msg_PBackgroundIDBDatabaseConstructor(int32_t routingId) |
62 | 0 | { |
63 | 0 | return IPC::Message::IPDLMessage(routingId, Msg_PBackgroundIDBDatabaseConstructor__ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::NOT_REPLY)); |
64 | 0 | } |
65 | | IPC::Message* |
66 | | Reply_PBackgroundIDBDatabaseConstructor(int32_t routingId) |
67 | 0 | { |
68 | 0 | return IPC::Message::IPDLMessage(routingId, Reply_PBackgroundIDBDatabaseConstructor__ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::REPLY)); |
69 | 0 | } |
70 | | |
71 | | } // namespace PBackgroundIDBFactory |
72 | | } // namespace indexedDB |
73 | | } // namespace dom |
74 | | } // namespace mozilla |
75 | | |
76 | | //----------------------------------------------------------------------------- |
77 | | // Method definitions for the IPDL type |struct CommonFactoryRequestParams| |
78 | | // |
79 | | namespace mozilla { |
80 | | namespace dom { |
81 | | namespace indexedDB { |
82 | | auto CommonFactoryRequestParams::operator==(const CommonFactoryRequestParams& _o) const -> bool |
83 | 0 | { |
84 | 0 | if ((!((metadata()) == ((_o).metadata())))) { |
85 | 0 | return false; |
86 | 0 | } |
87 | 0 | if ((!((principalInfo()) == ((_o).principalInfo())))) { |
88 | 0 | return false; |
89 | 0 | } |
90 | 0 | return true; |
91 | 0 | } |
92 | | |
93 | | auto CommonFactoryRequestParams::operator!=(const CommonFactoryRequestParams& _o) const -> bool |
94 | 0 | { |
95 | 0 | return (!(operator==(_o))); |
96 | 0 | } |
97 | | |
98 | | } // namespace indexedDB |
99 | | } // namespace dom |
100 | | } // namespace mozilla |
101 | | |
102 | | namespace mozilla { |
103 | | namespace ipc { |
104 | | auto IPDLParamTraits<mozilla::dom::indexedDB::CommonFactoryRequestParams>::Write( |
105 | | IPC::Message* aMsg, |
106 | | mozilla::ipc::IProtocol* aActor, |
107 | | const paramType& aVar) -> void |
108 | 0 | { |
109 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).metadata()); |
110 | 0 | // Sentinel = 'metadata' |
111 | 0 | (aMsg)->WriteSentinel(541737151); |
112 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).principalInfo()); |
113 | 0 | // Sentinel = 'principalInfo' |
114 | 0 | (aMsg)->WriteSentinel(3386633731); |
115 | 0 | } |
116 | | |
117 | | auto IPDLParamTraits<mozilla::dom::indexedDB::CommonFactoryRequestParams>::Read( |
118 | | const IPC::Message* aMsg, |
119 | | PickleIterator* aIter, |
120 | | mozilla::ipc::IProtocol* aActor, |
121 | | paramType* aVar) -> bool |
122 | 0 | { |
123 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->metadata())))))) { |
124 | 0 | (aActor)->FatalError("Error deserializing 'metadata' (DatabaseMetadata) member of 'CommonFactoryRequestParams'"); |
125 | 0 | return false; |
126 | 0 | } |
127 | 0 | // Sentinel = 'metadata' |
128 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 541737151)))) { |
129 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'metadata' (DatabaseMetadata) member of 'CommonFactoryRequestParams'"); |
130 | 0 | return false; |
131 | 0 | } |
132 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->principalInfo())))))) { |
133 | 0 | (aActor)->FatalError("Error deserializing 'principalInfo' (PrincipalInfo) member of 'CommonFactoryRequestParams'"); |
134 | 0 | return false; |
135 | 0 | } |
136 | 0 | // Sentinel = 'principalInfo' |
137 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3386633731)))) { |
138 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'principalInfo' (PrincipalInfo) member of 'CommonFactoryRequestParams'"); |
139 | 0 | return false; |
140 | 0 | } |
141 | 0 | return true; |
142 | 0 | } |
143 | | |
144 | | } // namespace ipc |
145 | | } // namespace mozilla |
146 | | |
147 | | //----------------------------------------------------------------------------- |
148 | | // Method definitions for the IPDL type |struct OpenDatabaseRequestParams| |
149 | | // |
150 | | namespace mozilla { |
151 | | namespace dom { |
152 | | namespace indexedDB { |
153 | | auto OpenDatabaseRequestParams::operator==(const OpenDatabaseRequestParams& _o) const -> bool |
154 | 0 | { |
155 | 0 | if ((!((commonParams()) == ((_o).commonParams())))) { |
156 | 0 | return false; |
157 | 0 | } |
158 | 0 | return true; |
159 | 0 | } |
160 | | |
161 | | auto OpenDatabaseRequestParams::operator!=(const OpenDatabaseRequestParams& _o) const -> bool |
162 | 0 | { |
163 | 0 | return (!(operator==(_o))); |
164 | 0 | } |
165 | | |
166 | | } // namespace indexedDB |
167 | | } // namespace dom |
168 | | } // namespace mozilla |
169 | | |
170 | | namespace mozilla { |
171 | | namespace ipc { |
172 | | auto IPDLParamTraits<mozilla::dom::indexedDB::OpenDatabaseRequestParams>::Write( |
173 | | IPC::Message* aMsg, |
174 | | mozilla::ipc::IProtocol* aActor, |
175 | | const paramType& aVar) -> void |
176 | 0 | { |
177 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).commonParams()); |
178 | 0 | // Sentinel = 'commonParams' |
179 | 0 | (aMsg)->WriteSentinel(3132658281); |
180 | 0 | } |
181 | | |
182 | | auto IPDLParamTraits<mozilla::dom::indexedDB::OpenDatabaseRequestParams>::Read( |
183 | | const IPC::Message* aMsg, |
184 | | PickleIterator* aIter, |
185 | | mozilla::ipc::IProtocol* aActor, |
186 | | paramType* aVar) -> bool |
187 | 0 | { |
188 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->commonParams())))))) { |
189 | 0 | (aActor)->FatalError("Error deserializing 'commonParams' (CommonFactoryRequestParams) member of 'OpenDatabaseRequestParams'"); |
190 | 0 | return false; |
191 | 0 | } |
192 | 0 | // Sentinel = 'commonParams' |
193 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3132658281)))) { |
194 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'commonParams' (CommonFactoryRequestParams) member of 'OpenDatabaseRequestParams'"); |
195 | 0 | return false; |
196 | 0 | } |
197 | 0 | return true; |
198 | 0 | } |
199 | | |
200 | | } // namespace ipc |
201 | | } // namespace mozilla |
202 | | |
203 | | //----------------------------------------------------------------------------- |
204 | | // Method definitions for the IPDL type |struct DeleteDatabaseRequestParams| |
205 | | // |
206 | | namespace mozilla { |
207 | | namespace dom { |
208 | | namespace indexedDB { |
209 | | auto DeleteDatabaseRequestParams::operator==(const DeleteDatabaseRequestParams& _o) const -> bool |
210 | 0 | { |
211 | 0 | if ((!((commonParams()) == ((_o).commonParams())))) { |
212 | 0 | return false; |
213 | 0 | } |
214 | 0 | return true; |
215 | 0 | } |
216 | | |
217 | | auto DeleteDatabaseRequestParams::operator!=(const DeleteDatabaseRequestParams& _o) const -> bool |
218 | 0 | { |
219 | 0 | return (!(operator==(_o))); |
220 | 0 | } |
221 | | |
222 | | } // namespace indexedDB |
223 | | } // namespace dom |
224 | | } // namespace mozilla |
225 | | |
226 | | namespace mozilla { |
227 | | namespace ipc { |
228 | | auto IPDLParamTraits<mozilla::dom::indexedDB::DeleteDatabaseRequestParams>::Write( |
229 | | IPC::Message* aMsg, |
230 | | mozilla::ipc::IProtocol* aActor, |
231 | | const paramType& aVar) -> void |
232 | 0 | { |
233 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).commonParams()); |
234 | 0 | // Sentinel = 'commonParams' |
235 | 0 | (aMsg)->WriteSentinel(3132658281); |
236 | 0 | } |
237 | | |
238 | | auto IPDLParamTraits<mozilla::dom::indexedDB::DeleteDatabaseRequestParams>::Read( |
239 | | const IPC::Message* aMsg, |
240 | | PickleIterator* aIter, |
241 | | mozilla::ipc::IProtocol* aActor, |
242 | | paramType* aVar) -> bool |
243 | 0 | { |
244 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->commonParams())))))) { |
245 | 0 | (aActor)->FatalError("Error deserializing 'commonParams' (CommonFactoryRequestParams) member of 'DeleteDatabaseRequestParams'"); |
246 | 0 | return false; |
247 | 0 | } |
248 | 0 | // Sentinel = 'commonParams' |
249 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3132658281)))) { |
250 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'commonParams' (CommonFactoryRequestParams) member of 'DeleteDatabaseRequestParams'"); |
251 | 0 | return false; |
252 | 0 | } |
253 | 0 | return true; |
254 | 0 | } |
255 | | |
256 | | } // namespace ipc |
257 | | } // namespace mozilla |
258 | | |
259 | | //----------------------------------------------------------------------------- |
260 | | // Method definitions for the IPDL type |union FactoryRequestParams| |
261 | | // |
262 | | namespace mozilla { |
263 | | namespace dom { |
264 | | namespace indexedDB { |
265 | | auto FactoryRequestParams::MaybeDestroy(Type aNewType) -> bool |
266 | 0 | { |
267 | 0 | if ((mType) == (T__None)) { |
268 | 0 | return true; |
269 | 0 | } |
270 | 0 | if ((mType) == (aNewType)) { |
271 | 0 | return false; |
272 | 0 | } |
273 | 0 | switch (mType) { |
274 | 0 | case TOpenDatabaseRequestParams: |
275 | 0 | { |
276 | 0 | (ptr_OpenDatabaseRequestParams())->~OpenDatabaseRequestParams__tdef(); |
277 | 0 | break; |
278 | 0 | } |
279 | 0 | case TDeleteDatabaseRequestParams: |
280 | 0 | { |
281 | 0 | (ptr_DeleteDatabaseRequestParams())->~DeleteDatabaseRequestParams__tdef(); |
282 | 0 | break; |
283 | 0 | } |
284 | 0 | default: |
285 | 0 | { |
286 | 0 | mozilla::ipc::LogicError("not reached"); |
287 | 0 | break; |
288 | 0 | } |
289 | 0 | } |
290 | 0 | return true; |
291 | 0 | } |
292 | | |
293 | | MOZ_IMPLICIT FactoryRequestParams::FactoryRequestParams(const OpenDatabaseRequestParams& aOther) |
294 | 0 | { |
295 | 0 | new (mozilla::KnownNotNull, ptr_OpenDatabaseRequestParams()) OpenDatabaseRequestParams(aOther); |
296 | 0 | mType = TOpenDatabaseRequestParams; |
297 | 0 | } |
298 | | |
299 | | MOZ_IMPLICIT FactoryRequestParams::FactoryRequestParams(OpenDatabaseRequestParams&& aOther) |
300 | 0 | { |
301 | 0 | new (mozilla::KnownNotNull, ptr_OpenDatabaseRequestParams()) OpenDatabaseRequestParams(std::move(aOther)); |
302 | 0 | mType = TOpenDatabaseRequestParams; |
303 | 0 | } |
304 | | |
305 | | MOZ_IMPLICIT FactoryRequestParams::FactoryRequestParams(const DeleteDatabaseRequestParams& aOther) |
306 | 0 | { |
307 | 0 | new (mozilla::KnownNotNull, ptr_DeleteDatabaseRequestParams()) DeleteDatabaseRequestParams(aOther); |
308 | 0 | mType = TDeleteDatabaseRequestParams; |
309 | 0 | } |
310 | | |
311 | | MOZ_IMPLICIT FactoryRequestParams::FactoryRequestParams(DeleteDatabaseRequestParams&& aOther) |
312 | 0 | { |
313 | 0 | new (mozilla::KnownNotNull, ptr_DeleteDatabaseRequestParams()) DeleteDatabaseRequestParams(std::move(aOther)); |
314 | 0 | mType = TDeleteDatabaseRequestParams; |
315 | 0 | } |
316 | | |
317 | | MOZ_IMPLICIT FactoryRequestParams::FactoryRequestParams(const FactoryRequestParams& aOther) |
318 | 0 | { |
319 | 0 | (aOther).AssertSanity(); |
320 | 0 | switch ((aOther).type()) { |
321 | 0 | case TOpenDatabaseRequestParams: |
322 | 0 | { |
323 | 0 | new (mozilla::KnownNotNull, ptr_OpenDatabaseRequestParams()) OpenDatabaseRequestParams((aOther).get_OpenDatabaseRequestParams()); |
324 | 0 | break; |
325 | 0 | } |
326 | 0 | case TDeleteDatabaseRequestParams: |
327 | 0 | { |
328 | 0 | new (mozilla::KnownNotNull, ptr_DeleteDatabaseRequestParams()) DeleteDatabaseRequestParams((aOther).get_DeleteDatabaseRequestParams()); |
329 | 0 | break; |
330 | 0 | } |
331 | 0 | case T__None: |
332 | 0 | { |
333 | 0 | break; |
334 | 0 | } |
335 | 0 | default: |
336 | 0 | { |
337 | 0 | mozilla::ipc::LogicError("unreached"); |
338 | 0 | return; |
339 | 0 | } |
340 | 0 | } |
341 | 0 | mType = (aOther).type(); |
342 | 0 | } |
343 | | |
344 | | MOZ_IMPLICIT FactoryRequestParams::FactoryRequestParams(FactoryRequestParams&& aOther) |
345 | 0 | { |
346 | 0 | (aOther).AssertSanity(); |
347 | 0 | Type t = (aOther).type(); |
348 | 0 | switch (t) { |
349 | 0 | case TOpenDatabaseRequestParams: |
350 | 0 | { |
351 | 0 | new (mozilla::KnownNotNull, ptr_OpenDatabaseRequestParams()) OpenDatabaseRequestParams(std::move((aOther).get_OpenDatabaseRequestParams())); |
352 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
353 | 0 | break; |
354 | 0 | } |
355 | 0 | case TDeleteDatabaseRequestParams: |
356 | 0 | { |
357 | 0 | new (mozilla::KnownNotNull, ptr_DeleteDatabaseRequestParams()) DeleteDatabaseRequestParams(std::move((aOther).get_DeleteDatabaseRequestParams())); |
358 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
359 | 0 | break; |
360 | 0 | } |
361 | 0 | case T__None: |
362 | 0 | { |
363 | 0 | break; |
364 | 0 | } |
365 | 0 | default: |
366 | 0 | { |
367 | 0 | mozilla::ipc::LogicError("unreached"); |
368 | 0 | return; |
369 | 0 | } |
370 | 0 | } |
371 | 0 | (aOther).mType = T__None; |
372 | 0 | mType = t; |
373 | 0 | } |
374 | | |
375 | | FactoryRequestParams::~FactoryRequestParams() |
376 | 0 | { |
377 | 0 | static_cast<void>(MaybeDestroy(T__None)); |
378 | 0 | } |
379 | | |
380 | | auto FactoryRequestParams::operator=(const OpenDatabaseRequestParams& aRhs) -> FactoryRequestParams& |
381 | 0 | { |
382 | 0 | if (MaybeDestroy(TOpenDatabaseRequestParams)) { |
383 | 0 | new (mozilla::KnownNotNull, ptr_OpenDatabaseRequestParams()) OpenDatabaseRequestParams; |
384 | 0 | } |
385 | 0 | (*(ptr_OpenDatabaseRequestParams())) = aRhs; |
386 | 0 | mType = TOpenDatabaseRequestParams; |
387 | 0 | return (*(this)); |
388 | 0 | } |
389 | | |
390 | | auto FactoryRequestParams::operator=(OpenDatabaseRequestParams&& aRhs) -> FactoryRequestParams& |
391 | 0 | { |
392 | 0 | if (MaybeDestroy(TOpenDatabaseRequestParams)) { |
393 | 0 | new (mozilla::KnownNotNull, ptr_OpenDatabaseRequestParams()) OpenDatabaseRequestParams; |
394 | 0 | } |
395 | 0 | (*(ptr_OpenDatabaseRequestParams())) = std::move(aRhs); |
396 | 0 | mType = TOpenDatabaseRequestParams; |
397 | 0 | return (*(this)); |
398 | 0 | } |
399 | | |
400 | | auto FactoryRequestParams::operator=(const DeleteDatabaseRequestParams& aRhs) -> FactoryRequestParams& |
401 | 0 | { |
402 | 0 | if (MaybeDestroy(TDeleteDatabaseRequestParams)) { |
403 | 0 | new (mozilla::KnownNotNull, ptr_DeleteDatabaseRequestParams()) DeleteDatabaseRequestParams; |
404 | 0 | } |
405 | 0 | (*(ptr_DeleteDatabaseRequestParams())) = aRhs; |
406 | 0 | mType = TDeleteDatabaseRequestParams; |
407 | 0 | return (*(this)); |
408 | 0 | } |
409 | | |
410 | | auto FactoryRequestParams::operator=(DeleteDatabaseRequestParams&& aRhs) -> FactoryRequestParams& |
411 | 0 | { |
412 | 0 | if (MaybeDestroy(TDeleteDatabaseRequestParams)) { |
413 | 0 | new (mozilla::KnownNotNull, ptr_DeleteDatabaseRequestParams()) DeleteDatabaseRequestParams; |
414 | 0 | } |
415 | 0 | (*(ptr_DeleteDatabaseRequestParams())) = std::move(aRhs); |
416 | 0 | mType = TDeleteDatabaseRequestParams; |
417 | 0 | return (*(this)); |
418 | 0 | } |
419 | | |
420 | | auto FactoryRequestParams::operator=(const FactoryRequestParams& aRhs) -> FactoryRequestParams& |
421 | 0 | { |
422 | 0 | (aRhs).AssertSanity(); |
423 | 0 | Type t = (aRhs).type(); |
424 | 0 | switch (t) { |
425 | 0 | case TOpenDatabaseRequestParams: |
426 | 0 | { |
427 | 0 | if (MaybeDestroy(t)) { |
428 | 0 | new (mozilla::KnownNotNull, ptr_OpenDatabaseRequestParams()) OpenDatabaseRequestParams; |
429 | 0 | } |
430 | 0 | (*(ptr_OpenDatabaseRequestParams())) = (aRhs).get_OpenDatabaseRequestParams(); |
431 | 0 | break; |
432 | 0 | } |
433 | 0 | case TDeleteDatabaseRequestParams: |
434 | 0 | { |
435 | 0 | if (MaybeDestroy(t)) { |
436 | 0 | new (mozilla::KnownNotNull, ptr_DeleteDatabaseRequestParams()) DeleteDatabaseRequestParams; |
437 | 0 | } |
438 | 0 | (*(ptr_DeleteDatabaseRequestParams())) = (aRhs).get_DeleteDatabaseRequestParams(); |
439 | 0 | break; |
440 | 0 | } |
441 | 0 | case T__None: |
442 | 0 | { |
443 | 0 | static_cast<void>(MaybeDestroy(t)); |
444 | 0 | break; |
445 | 0 | } |
446 | 0 | default: |
447 | 0 | { |
448 | 0 | mozilla::ipc::LogicError("unreached"); |
449 | 0 | break; |
450 | 0 | } |
451 | 0 | } |
452 | 0 | mType = t; |
453 | 0 | return (*(this)); |
454 | 0 | } |
455 | | |
456 | | auto FactoryRequestParams::operator=(FactoryRequestParams&& aRhs) -> FactoryRequestParams& |
457 | 0 | { |
458 | 0 | (aRhs).AssertSanity(); |
459 | 0 | Type t = (aRhs).type(); |
460 | 0 | switch (t) { |
461 | 0 | case TOpenDatabaseRequestParams: |
462 | 0 | { |
463 | 0 | if (MaybeDestroy(t)) { |
464 | 0 | new (mozilla::KnownNotNull, ptr_OpenDatabaseRequestParams()) OpenDatabaseRequestParams; |
465 | 0 | } |
466 | 0 | (*(ptr_OpenDatabaseRequestParams())) = std::move((aRhs).get_OpenDatabaseRequestParams()); |
467 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
468 | 0 | break; |
469 | 0 | } |
470 | 0 | case TDeleteDatabaseRequestParams: |
471 | 0 | { |
472 | 0 | if (MaybeDestroy(t)) { |
473 | 0 | new (mozilla::KnownNotNull, ptr_DeleteDatabaseRequestParams()) DeleteDatabaseRequestParams; |
474 | 0 | } |
475 | 0 | (*(ptr_DeleteDatabaseRequestParams())) = std::move((aRhs).get_DeleteDatabaseRequestParams()); |
476 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
477 | 0 | break; |
478 | 0 | } |
479 | 0 | case T__None: |
480 | 0 | { |
481 | 0 | static_cast<void>(MaybeDestroy(t)); |
482 | 0 | break; |
483 | 0 | } |
484 | 0 | default: |
485 | 0 | { |
486 | 0 | mozilla::ipc::LogicError("unreached"); |
487 | 0 | break; |
488 | 0 | } |
489 | 0 | } |
490 | 0 | (aRhs).mType = T__None; |
491 | 0 | mType = t; |
492 | 0 | return (*(this)); |
493 | 0 | } |
494 | | |
495 | | auto FactoryRequestParams::operator==(const OpenDatabaseRequestParams& aRhs) const -> bool |
496 | 0 | { |
497 | 0 | return (get_OpenDatabaseRequestParams()) == (aRhs); |
498 | 0 | } |
499 | | |
500 | | auto FactoryRequestParams::operator==(const DeleteDatabaseRequestParams& aRhs) const -> bool |
501 | 0 | { |
502 | 0 | return (get_DeleteDatabaseRequestParams()) == (aRhs); |
503 | 0 | } |
504 | | |
505 | | auto FactoryRequestParams::operator==(const FactoryRequestParams& aRhs) const -> bool |
506 | 0 | { |
507 | 0 | if ((type()) != ((aRhs).type())) { |
508 | 0 | return false; |
509 | 0 | } |
510 | 0 | |
511 | 0 | switch (type()) { |
512 | 0 | case TOpenDatabaseRequestParams: |
513 | 0 | { |
514 | 0 | return (get_OpenDatabaseRequestParams()) == ((aRhs).get_OpenDatabaseRequestParams()); |
515 | 0 | } |
516 | 0 | case TDeleteDatabaseRequestParams: |
517 | 0 | { |
518 | 0 | return (get_DeleteDatabaseRequestParams()) == ((aRhs).get_DeleteDatabaseRequestParams()); |
519 | 0 | } |
520 | 0 | default: |
521 | 0 | { |
522 | 0 | mozilla::ipc::LogicError("unreached"); |
523 | 0 | return false; |
524 | 0 | } |
525 | 0 | } |
526 | 0 | } |
527 | | |
528 | | auto FactoryRequestParams::get(OpenDatabaseRequestParams* aOutValue) const -> void |
529 | 0 | { |
530 | 0 | (*(aOutValue)) = get_OpenDatabaseRequestParams(); |
531 | 0 | } |
532 | | |
533 | | auto FactoryRequestParams::get(DeleteDatabaseRequestParams* aOutValue) const -> void |
534 | 0 | { |
535 | 0 | (*(aOutValue)) = get_DeleteDatabaseRequestParams(); |
536 | 0 | } |
537 | | |
538 | | } // namespace indexedDB |
539 | | } // namespace dom |
540 | | } // namespace mozilla |
541 | | |
542 | | namespace mozilla { |
543 | | namespace ipc { |
544 | | auto IPDLParamTraits<mozilla::dom::indexedDB::FactoryRequestParams>::Write( |
545 | | IPC::Message* aMsg, |
546 | | mozilla::ipc::IProtocol* aActor, |
547 | | const paramType& aVar) -> void |
548 | | { |
549 | | typedef mozilla::dom::indexedDB::FactoryRequestParams union__; |
550 | | int type; |
551 | | type = (aVar).type(); |
552 | | WriteIPDLParam(aMsg, aActor, type); |
553 | | // Sentinel = 'FactoryRequestParams' |
554 | | (aMsg)->WriteSentinel(1444753303); |
555 | | |
556 | | switch (type) { |
557 | | case union__::TOpenDatabaseRequestParams: |
558 | | { |
559 | | WriteIPDLParam(aMsg, aActor, (aVar).get_OpenDatabaseRequestParams()); |
560 | | // Sentinel = 'TOpenDatabaseRequestParams' |
561 | | (aMsg)->WriteSentinel(4137782958); |
562 | | return; |
563 | | } |
564 | | case union__::TDeleteDatabaseRequestParams: |
565 | | { |
566 | | WriteIPDLParam(aMsg, aActor, (aVar).get_DeleteDatabaseRequestParams()); |
567 | | // Sentinel = 'TDeleteDatabaseRequestParams' |
568 | | (aMsg)->WriteSentinel(3237276035); |
569 | | return; |
570 | | } |
571 | | default: |
572 | | { |
573 | | (aActor)->FatalError("unknown union type"); |
574 | | return; |
575 | | } |
576 | | } |
577 | | } |
578 | | |
579 | | auto IPDLParamTraits<mozilla::dom::indexedDB::FactoryRequestParams>::Read( |
580 | | const IPC::Message* aMsg, |
581 | | PickleIterator* aIter, |
582 | | mozilla::ipc::IProtocol* aActor, |
583 | | paramType* aVar) -> bool |
584 | 0 | { |
585 | 0 | typedef mozilla::dom::indexedDB::FactoryRequestParams union__; |
586 | 0 | int type; |
587 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&(type)))))) { |
588 | 0 | (aActor)->FatalError("Error deserializing type of union FactoryRequestParams"); |
589 | 0 | return false; |
590 | 0 | } |
591 | 0 | // Sentinel = 'FactoryRequestParams' |
592 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1444753303)))) { |
593 | 0 | mozilla::ipc::SentinelReadError("Error deserializing type of union FactoryRequestParams"); |
594 | 0 | return false; |
595 | 0 | } |
596 | 0 | |
597 | 0 | switch (type) { |
598 | 0 | case union__::TOpenDatabaseRequestParams: |
599 | 0 | { |
600 | 0 | mozilla::dom::indexedDB::OpenDatabaseRequestParams tmp = mozilla::dom::indexedDB::OpenDatabaseRequestParams(); |
601 | 0 | (*(aVar)) = tmp; |
602 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_OpenDatabaseRequestParams())))))) { |
603 | 0 | (aActor)->FatalError("Error deserializing variant TOpenDatabaseRequestParams of union FactoryRequestParams"); |
604 | 0 | return false; |
605 | 0 | } |
606 | 0 | // Sentinel = 'TOpenDatabaseRequestParams' |
607 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 4137782958)))) { |
608 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TOpenDatabaseRequestParams of union FactoryRequestParams"); |
609 | 0 | return false; |
610 | 0 | } |
611 | 0 | return true; |
612 | 0 | } |
613 | 0 | case union__::TDeleteDatabaseRequestParams: |
614 | 0 | { |
615 | 0 | mozilla::dom::indexedDB::DeleteDatabaseRequestParams tmp = mozilla::dom::indexedDB::DeleteDatabaseRequestParams(); |
616 | 0 | (*(aVar)) = tmp; |
617 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_DeleteDatabaseRequestParams())))))) { |
618 | 0 | (aActor)->FatalError("Error deserializing variant TDeleteDatabaseRequestParams of union FactoryRequestParams"); |
619 | 0 | return false; |
620 | 0 | } |
621 | 0 | // Sentinel = 'TDeleteDatabaseRequestParams' |
622 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3237276035)))) { |
623 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TDeleteDatabaseRequestParams of union FactoryRequestParams"); |
624 | 0 | return false; |
625 | 0 | } |
626 | 0 | return true; |
627 | 0 | } |
628 | 0 | default: |
629 | 0 | { |
630 | 0 | (aActor)->FatalError("unknown union type"); |
631 | 0 | return false; |
632 | 0 | } |
633 | 0 | } |
634 | 0 | } |
635 | | |
636 | | } // namespace ipc |
637 | | } // namespace mozilla |