/work/obj-fuzz/ipc/ipdl/IPCServiceWorkerRegistrationDescriptor.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/IPCServiceWorkerRegistrationDescriptor.h" |
8 | | |
9 | | |
10 | | //----------------------------------------------------------------------------- |
11 | | // Method definitions for the IPDL type |struct IPCServiceWorkerRegistrationDescriptor| |
12 | | // |
13 | | namespace mozilla { |
14 | | namespace dom { |
15 | | auto IPCServiceWorkerRegistrationDescriptor::operator==(const IPCServiceWorkerRegistrationDescriptor& _o) const -> bool |
16 | 0 | { |
17 | 0 | if ((!((id()) == ((_o).id())))) { |
18 | 0 | return false; |
19 | 0 | } |
20 | 0 | if ((!((version()) == ((_o).version())))) { |
21 | 0 | return false; |
22 | 0 | } |
23 | 0 | if ((!((principalInfo()) == ((_o).principalInfo())))) { |
24 | 0 | return false; |
25 | 0 | } |
26 | 0 | if ((!((scope()) == ((_o).scope())))) { |
27 | 0 | return false; |
28 | 0 | } |
29 | 0 | if ((!((updateViaCache()) == ((_o).updateViaCache())))) { |
30 | 0 | return false; |
31 | 0 | } |
32 | 0 | if ((!((installing()) == ((_o).installing())))) { |
33 | 0 | return false; |
34 | 0 | } |
35 | 0 | if ((!((waiting()) == ((_o).waiting())))) { |
36 | 0 | return false; |
37 | 0 | } |
38 | 0 | if ((!((active()) == ((_o).active())))) { |
39 | 0 | return false; |
40 | 0 | } |
41 | 0 | return true; |
42 | 0 | } |
43 | | |
44 | | auto IPCServiceWorkerRegistrationDescriptor::operator!=(const IPCServiceWorkerRegistrationDescriptor& _o) const -> bool |
45 | 0 | { |
46 | 0 | return (!(operator==(_o))); |
47 | 0 | } |
48 | | |
49 | | } // namespace dom |
50 | | } // namespace mozilla |
51 | | |
52 | | namespace mozilla { |
53 | | namespace ipc { |
54 | | auto IPDLParamTraits<mozilla::dom::IPCServiceWorkerRegistrationDescriptor>::Write( |
55 | | IPC::Message* aMsg, |
56 | | mozilla::ipc::IProtocol* aActor, |
57 | | const paramType& aVar) -> void |
58 | 0 | { |
59 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).id()); |
60 | 0 | // Sentinel = 'id' |
61 | 0 | (aMsg)->WriteSentinel(2794505629); |
62 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).version()); |
63 | 0 | // Sentinel = 'version' |
64 | 0 | (aMsg)->WriteSentinel(4003360947); |
65 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).principalInfo()); |
66 | 0 | // Sentinel = 'principalInfo' |
67 | 0 | (aMsg)->WriteSentinel(3386633731); |
68 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).scope()); |
69 | 0 | // Sentinel = 'scope' |
70 | 0 | (aMsg)->WriteSentinel(2191984953); |
71 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).updateViaCache()); |
72 | 0 | // Sentinel = 'updateViaCache' |
73 | 0 | (aMsg)->WriteSentinel(2560130927); |
74 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).installing()); |
75 | 0 | // Sentinel = 'installing' |
76 | 0 | (aMsg)->WriteSentinel(803737965); |
77 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).waiting()); |
78 | 0 | // Sentinel = 'waiting' |
79 | 0 | (aMsg)->WriteSentinel(1051719858); |
80 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).active()); |
81 | 0 | // Sentinel = 'active' |
82 | 0 | (aMsg)->WriteSentinel(984072408); |
83 | 0 | } |
84 | | |
85 | | auto IPDLParamTraits<mozilla::dom::IPCServiceWorkerRegistrationDescriptor>::Read( |
86 | | const IPC::Message* aMsg, |
87 | | PickleIterator* aIter, |
88 | | mozilla::ipc::IProtocol* aActor, |
89 | | paramType* aVar) -> bool |
90 | 0 | { |
91 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->id())))))) { |
92 | 0 | (aActor)->FatalError("Error deserializing 'id' (uint64_t) member of 'IPCServiceWorkerRegistrationDescriptor'"); |
93 | 0 | return false; |
94 | 0 | } |
95 | 0 | // Sentinel = 'id' |
96 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2794505629)))) { |
97 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'id' (uint64_t) member of 'IPCServiceWorkerRegistrationDescriptor'"); |
98 | 0 | return false; |
99 | 0 | } |
100 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->version())))))) { |
101 | 0 | (aActor)->FatalError("Error deserializing 'version' (uint64_t) member of 'IPCServiceWorkerRegistrationDescriptor'"); |
102 | 0 | return false; |
103 | 0 | } |
104 | 0 | // Sentinel = 'version' |
105 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 4003360947)))) { |
106 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'version' (uint64_t) member of 'IPCServiceWorkerRegistrationDescriptor'"); |
107 | 0 | return false; |
108 | 0 | } |
109 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->principalInfo())))))) { |
110 | 0 | (aActor)->FatalError("Error deserializing 'principalInfo' (PrincipalInfo) member of 'IPCServiceWorkerRegistrationDescriptor'"); |
111 | 0 | return false; |
112 | 0 | } |
113 | 0 | // Sentinel = 'principalInfo' |
114 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3386633731)))) { |
115 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'principalInfo' (PrincipalInfo) member of 'IPCServiceWorkerRegistrationDescriptor'"); |
116 | 0 | return false; |
117 | 0 | } |
118 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->scope())))))) { |
119 | 0 | (aActor)->FatalError("Error deserializing 'scope' (nsCString) member of 'IPCServiceWorkerRegistrationDescriptor'"); |
120 | 0 | return false; |
121 | 0 | } |
122 | 0 | // Sentinel = 'scope' |
123 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2191984953)))) { |
124 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'scope' (nsCString) member of 'IPCServiceWorkerRegistrationDescriptor'"); |
125 | 0 | return false; |
126 | 0 | } |
127 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->updateViaCache())))))) { |
128 | 0 | (aActor)->FatalError("Error deserializing 'updateViaCache' (ServiceWorkerUpdateViaCache) member of 'IPCServiceWorkerRegistrationDescriptor'"); |
129 | 0 | return false; |
130 | 0 | } |
131 | 0 | // Sentinel = 'updateViaCache' |
132 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2560130927)))) { |
133 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'updateViaCache' (ServiceWorkerUpdateViaCache) member of 'IPCServiceWorkerRegistrationDescriptor'"); |
134 | 0 | return false; |
135 | 0 | } |
136 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->installing())))))) { |
137 | 0 | (aActor)->FatalError("Error deserializing 'installing' (OptionalIPCServiceWorkerDescriptor) member of 'IPCServiceWorkerRegistrationDescriptor'"); |
138 | 0 | return false; |
139 | 0 | } |
140 | 0 | // Sentinel = 'installing' |
141 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 803737965)))) { |
142 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'installing' (OptionalIPCServiceWorkerDescriptor) member of 'IPCServiceWorkerRegistrationDescriptor'"); |
143 | 0 | return false; |
144 | 0 | } |
145 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->waiting())))))) { |
146 | 0 | (aActor)->FatalError("Error deserializing 'waiting' (OptionalIPCServiceWorkerDescriptor) member of 'IPCServiceWorkerRegistrationDescriptor'"); |
147 | 0 | return false; |
148 | 0 | } |
149 | 0 | // Sentinel = 'waiting' |
150 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1051719858)))) { |
151 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'waiting' (OptionalIPCServiceWorkerDescriptor) member of 'IPCServiceWorkerRegistrationDescriptor'"); |
152 | 0 | return false; |
153 | 0 | } |
154 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->active())))))) { |
155 | 0 | (aActor)->FatalError("Error deserializing 'active' (OptionalIPCServiceWorkerDescriptor) member of 'IPCServiceWorkerRegistrationDescriptor'"); |
156 | 0 | return false; |
157 | 0 | } |
158 | 0 | // Sentinel = 'active' |
159 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 984072408)))) { |
160 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'active' (OptionalIPCServiceWorkerDescriptor) member of 'IPCServiceWorkerRegistrationDescriptor'"); |
161 | 0 | return false; |
162 | 0 | } |
163 | 0 | return true; |
164 | 0 | } |
165 | | |
166 | | } // namespace ipc |
167 | | } // namespace mozilla |
168 | | |
169 | | //----------------------------------------------------------------------------- |
170 | | // Method definitions for the IPDL type |union IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult| |
171 | | // |
172 | | namespace mozilla { |
173 | | namespace dom { |
174 | | auto IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult::MaybeDestroy(Type aNewType) -> bool |
175 | 0 | { |
176 | 0 | if ((mType) == (T__None)) { |
177 | 0 | return true; |
178 | 0 | } |
179 | 0 | if ((mType) == (aNewType)) { |
180 | 0 | return false; |
181 | 0 | } |
182 | 0 | switch (mType) { |
183 | 0 | case TIPCServiceWorkerRegistrationDescriptor: |
184 | 0 | { |
185 | 0 | (ptr_IPCServiceWorkerRegistrationDescriptor())->~IPCServiceWorkerRegistrationDescriptor__tdef(); |
186 | 0 | break; |
187 | 0 | } |
188 | 0 | case TCopyableErrorResult: |
189 | 0 | { |
190 | 0 | (ptr_CopyableErrorResult())->~CopyableErrorResult__tdef(); |
191 | 0 | break; |
192 | 0 | } |
193 | 0 | default: |
194 | 0 | { |
195 | 0 | mozilla::ipc::LogicError("not reached"); |
196 | 0 | break; |
197 | 0 | } |
198 | 0 | } |
199 | 0 | return true; |
200 | 0 | } |
201 | | |
202 | | MOZ_IMPLICIT IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult::IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult(const IPCServiceWorkerRegistrationDescriptor& aOther) |
203 | 0 | { |
204 | 0 | new (mozilla::KnownNotNull, ptr_IPCServiceWorkerRegistrationDescriptor()) IPCServiceWorkerRegistrationDescriptor(aOther); |
205 | 0 | mType = TIPCServiceWorkerRegistrationDescriptor; |
206 | 0 | } |
207 | | |
208 | | MOZ_IMPLICIT IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult::IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult(IPCServiceWorkerRegistrationDescriptor&& aOther) |
209 | 0 | { |
210 | 0 | new (mozilla::KnownNotNull, ptr_IPCServiceWorkerRegistrationDescriptor()) IPCServiceWorkerRegistrationDescriptor(std::move(aOther)); |
211 | 0 | mType = TIPCServiceWorkerRegistrationDescriptor; |
212 | 0 | } |
213 | | |
214 | | MOZ_IMPLICIT IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult::IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult(const CopyableErrorResult& aOther) |
215 | 0 | { |
216 | 0 | new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult(aOther); |
217 | 0 | mType = TCopyableErrorResult; |
218 | 0 | } |
219 | | |
220 | | MOZ_IMPLICIT IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult::IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult(CopyableErrorResult&& aOther) |
221 | 0 | { |
222 | 0 | new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult(std::move(aOther)); |
223 | 0 | mType = TCopyableErrorResult; |
224 | 0 | } |
225 | | |
226 | | MOZ_IMPLICIT IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult::IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult(const IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult& aOther) |
227 | 0 | { |
228 | 0 | (aOther).AssertSanity(); |
229 | 0 | switch ((aOther).type()) { |
230 | 0 | case TIPCServiceWorkerRegistrationDescriptor: |
231 | 0 | { |
232 | 0 | new (mozilla::KnownNotNull, ptr_IPCServiceWorkerRegistrationDescriptor()) IPCServiceWorkerRegistrationDescriptor((aOther).get_IPCServiceWorkerRegistrationDescriptor()); |
233 | 0 | break; |
234 | 0 | } |
235 | 0 | case TCopyableErrorResult: |
236 | 0 | { |
237 | 0 | new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult((aOther).get_CopyableErrorResult()); |
238 | 0 | break; |
239 | 0 | } |
240 | 0 | case T__None: |
241 | 0 | { |
242 | 0 | break; |
243 | 0 | } |
244 | 0 | default: |
245 | 0 | { |
246 | 0 | mozilla::ipc::LogicError("unreached"); |
247 | 0 | return; |
248 | 0 | } |
249 | 0 | } |
250 | 0 | mType = (aOther).type(); |
251 | 0 | } |
252 | | |
253 | | MOZ_IMPLICIT IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult::IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult(IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult&& aOther) |
254 | 0 | { |
255 | 0 | (aOther).AssertSanity(); |
256 | 0 | Type t = (aOther).type(); |
257 | 0 | switch (t) { |
258 | 0 | case TIPCServiceWorkerRegistrationDescriptor: |
259 | 0 | { |
260 | 0 | new (mozilla::KnownNotNull, ptr_IPCServiceWorkerRegistrationDescriptor()) IPCServiceWorkerRegistrationDescriptor(std::move((aOther).get_IPCServiceWorkerRegistrationDescriptor())); |
261 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
262 | 0 | break; |
263 | 0 | } |
264 | 0 | case TCopyableErrorResult: |
265 | 0 | { |
266 | 0 | new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult(std::move((aOther).get_CopyableErrorResult())); |
267 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
268 | 0 | break; |
269 | 0 | } |
270 | 0 | case T__None: |
271 | 0 | { |
272 | 0 | break; |
273 | 0 | } |
274 | 0 | default: |
275 | 0 | { |
276 | 0 | mozilla::ipc::LogicError("unreached"); |
277 | 0 | return; |
278 | 0 | } |
279 | 0 | } |
280 | 0 | (aOther).mType = T__None; |
281 | 0 | mType = t; |
282 | 0 | } |
283 | | |
284 | | IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult::~IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult() |
285 | 0 | { |
286 | 0 | static_cast<void>(MaybeDestroy(T__None)); |
287 | 0 | } |
288 | | |
289 | | auto IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult::operator=(const IPCServiceWorkerRegistrationDescriptor& aRhs) -> IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult& |
290 | 0 | { |
291 | 0 | if (MaybeDestroy(TIPCServiceWorkerRegistrationDescriptor)) { |
292 | 0 | new (mozilla::KnownNotNull, ptr_IPCServiceWorkerRegistrationDescriptor()) IPCServiceWorkerRegistrationDescriptor; |
293 | 0 | } |
294 | 0 | (*(ptr_IPCServiceWorkerRegistrationDescriptor())) = aRhs; |
295 | 0 | mType = TIPCServiceWorkerRegistrationDescriptor; |
296 | 0 | return (*(this)); |
297 | 0 | } |
298 | | |
299 | | auto IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult::operator=(IPCServiceWorkerRegistrationDescriptor&& aRhs) -> IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult& |
300 | 0 | { |
301 | 0 | if (MaybeDestroy(TIPCServiceWorkerRegistrationDescriptor)) { |
302 | 0 | new (mozilla::KnownNotNull, ptr_IPCServiceWorkerRegistrationDescriptor()) IPCServiceWorkerRegistrationDescriptor; |
303 | 0 | } |
304 | 0 | (*(ptr_IPCServiceWorkerRegistrationDescriptor())) = std::move(aRhs); |
305 | 0 | mType = TIPCServiceWorkerRegistrationDescriptor; |
306 | 0 | return (*(this)); |
307 | 0 | } |
308 | | |
309 | | auto IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult::operator=(const CopyableErrorResult& aRhs) -> IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult& |
310 | 0 | { |
311 | 0 | if (MaybeDestroy(TCopyableErrorResult)) { |
312 | 0 | new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult; |
313 | 0 | } |
314 | 0 | (*(ptr_CopyableErrorResult())) = aRhs; |
315 | 0 | mType = TCopyableErrorResult; |
316 | 0 | return (*(this)); |
317 | 0 | } |
318 | | |
319 | | auto IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult::operator=(CopyableErrorResult&& aRhs) -> IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult& |
320 | 0 | { |
321 | 0 | if (MaybeDestroy(TCopyableErrorResult)) { |
322 | 0 | new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult; |
323 | 0 | } |
324 | 0 | (*(ptr_CopyableErrorResult())) = std::move(aRhs); |
325 | 0 | mType = TCopyableErrorResult; |
326 | 0 | return (*(this)); |
327 | 0 | } |
328 | | |
329 | | auto IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult::operator=(const IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult& aRhs) -> IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult& |
330 | 0 | { |
331 | 0 | (aRhs).AssertSanity(); |
332 | 0 | Type t = (aRhs).type(); |
333 | 0 | switch (t) { |
334 | 0 | case TIPCServiceWorkerRegistrationDescriptor: |
335 | 0 | { |
336 | 0 | if (MaybeDestroy(t)) { |
337 | 0 | new (mozilla::KnownNotNull, ptr_IPCServiceWorkerRegistrationDescriptor()) IPCServiceWorkerRegistrationDescriptor; |
338 | 0 | } |
339 | 0 | (*(ptr_IPCServiceWorkerRegistrationDescriptor())) = (aRhs).get_IPCServiceWorkerRegistrationDescriptor(); |
340 | 0 | break; |
341 | 0 | } |
342 | 0 | case TCopyableErrorResult: |
343 | 0 | { |
344 | 0 | if (MaybeDestroy(t)) { |
345 | 0 | new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult; |
346 | 0 | } |
347 | 0 | (*(ptr_CopyableErrorResult())) = (aRhs).get_CopyableErrorResult(); |
348 | 0 | break; |
349 | 0 | } |
350 | 0 | case T__None: |
351 | 0 | { |
352 | 0 | static_cast<void>(MaybeDestroy(t)); |
353 | 0 | break; |
354 | 0 | } |
355 | 0 | default: |
356 | 0 | { |
357 | 0 | mozilla::ipc::LogicError("unreached"); |
358 | 0 | break; |
359 | 0 | } |
360 | 0 | } |
361 | 0 | mType = t; |
362 | 0 | return (*(this)); |
363 | 0 | } |
364 | | |
365 | | auto IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult::operator=(IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult&& aRhs) -> IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult& |
366 | 0 | { |
367 | 0 | (aRhs).AssertSanity(); |
368 | 0 | Type t = (aRhs).type(); |
369 | 0 | switch (t) { |
370 | 0 | case TIPCServiceWorkerRegistrationDescriptor: |
371 | 0 | { |
372 | 0 | if (MaybeDestroy(t)) { |
373 | 0 | new (mozilla::KnownNotNull, ptr_IPCServiceWorkerRegistrationDescriptor()) IPCServiceWorkerRegistrationDescriptor; |
374 | 0 | } |
375 | 0 | (*(ptr_IPCServiceWorkerRegistrationDescriptor())) = std::move((aRhs).get_IPCServiceWorkerRegistrationDescriptor()); |
376 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
377 | 0 | break; |
378 | 0 | } |
379 | 0 | case TCopyableErrorResult: |
380 | 0 | { |
381 | 0 | if (MaybeDestroy(t)) { |
382 | 0 | new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult; |
383 | 0 | } |
384 | 0 | (*(ptr_CopyableErrorResult())) = std::move((aRhs).get_CopyableErrorResult()); |
385 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
386 | 0 | break; |
387 | 0 | } |
388 | 0 | case T__None: |
389 | 0 | { |
390 | 0 | static_cast<void>(MaybeDestroy(t)); |
391 | 0 | break; |
392 | 0 | } |
393 | 0 | default: |
394 | 0 | { |
395 | 0 | mozilla::ipc::LogicError("unreached"); |
396 | 0 | break; |
397 | 0 | } |
398 | 0 | } |
399 | 0 | (aRhs).mType = T__None; |
400 | 0 | mType = t; |
401 | 0 | return (*(this)); |
402 | 0 | } |
403 | | |
404 | | auto IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult::operator==(const IPCServiceWorkerRegistrationDescriptor& aRhs) const -> bool |
405 | 0 | { |
406 | 0 | return (get_IPCServiceWorkerRegistrationDescriptor()) == (aRhs); |
407 | 0 | } |
408 | | |
409 | | auto IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult::operator==(const CopyableErrorResult& aRhs) const -> bool |
410 | 0 | { |
411 | 0 | return (get_CopyableErrorResult()) == (aRhs); |
412 | 0 | } |
413 | | |
414 | | auto IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult::operator==(const IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult& aRhs) const -> bool |
415 | 0 | { |
416 | 0 | if ((type()) != ((aRhs).type())) { |
417 | 0 | return false; |
418 | 0 | } |
419 | 0 | |
420 | 0 | switch (type()) { |
421 | 0 | case TIPCServiceWorkerRegistrationDescriptor: |
422 | 0 | { |
423 | 0 | return (get_IPCServiceWorkerRegistrationDescriptor()) == ((aRhs).get_IPCServiceWorkerRegistrationDescriptor()); |
424 | 0 | } |
425 | 0 | case TCopyableErrorResult: |
426 | 0 | { |
427 | 0 | return (get_CopyableErrorResult()) == ((aRhs).get_CopyableErrorResult()); |
428 | 0 | } |
429 | 0 | default: |
430 | 0 | { |
431 | 0 | mozilla::ipc::LogicError("unreached"); |
432 | 0 | return false; |
433 | 0 | } |
434 | 0 | } |
435 | 0 | } |
436 | | |
437 | | auto IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult::get(IPCServiceWorkerRegistrationDescriptor* aOutValue) const -> void |
438 | 0 | { |
439 | 0 | (*(aOutValue)) = get_IPCServiceWorkerRegistrationDescriptor(); |
440 | 0 | } |
441 | | |
442 | | auto IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult::get(CopyableErrorResult* aOutValue) const -> void |
443 | 0 | { |
444 | 0 | (*(aOutValue)) = get_CopyableErrorResult(); |
445 | 0 | } |
446 | | |
447 | | } // namespace dom |
448 | | } // namespace mozilla |
449 | | |
450 | | namespace mozilla { |
451 | | namespace ipc { |
452 | | auto IPDLParamTraits<mozilla::dom::IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult>::Write( |
453 | | IPC::Message* aMsg, |
454 | | mozilla::ipc::IProtocol* aActor, |
455 | | const paramType& aVar) -> void |
456 | | { |
457 | | typedef mozilla::dom::IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult union__; |
458 | | int type; |
459 | | type = (aVar).type(); |
460 | | WriteIPDLParam(aMsg, aActor, type); |
461 | | // Sentinel = 'IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult' |
462 | | (aMsg)->WriteSentinel(2808465729); |
463 | | |
464 | | switch (type) { |
465 | | case union__::TIPCServiceWorkerRegistrationDescriptor: |
466 | | { |
467 | | WriteIPDLParam(aMsg, aActor, (aVar).get_IPCServiceWorkerRegistrationDescriptor()); |
468 | | // Sentinel = 'TIPCServiceWorkerRegistrationDescriptor' |
469 | | (aMsg)->WriteSentinel(212029166); |
470 | | return; |
471 | | } |
472 | | case union__::TCopyableErrorResult: |
473 | | { |
474 | | WriteIPDLParam(aMsg, aActor, (aVar).get_CopyableErrorResult()); |
475 | | // Sentinel = 'TCopyableErrorResult' |
476 | | (aMsg)->WriteSentinel(1942409608); |
477 | | return; |
478 | | } |
479 | | default: |
480 | | { |
481 | | (aActor)->FatalError("unknown union type"); |
482 | | return; |
483 | | } |
484 | | } |
485 | | } |
486 | | |
487 | | auto IPDLParamTraits<mozilla::dom::IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult>::Read( |
488 | | const IPC::Message* aMsg, |
489 | | PickleIterator* aIter, |
490 | | mozilla::ipc::IProtocol* aActor, |
491 | | paramType* aVar) -> bool |
492 | 0 | { |
493 | 0 | typedef mozilla::dom::IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult union__; |
494 | 0 | int type; |
495 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&(type)))))) { |
496 | 0 | (aActor)->FatalError("Error deserializing type of union IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult"); |
497 | 0 | return false; |
498 | 0 | } |
499 | 0 | // Sentinel = 'IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult' |
500 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2808465729)))) { |
501 | 0 | mozilla::ipc::SentinelReadError("Error deserializing type of union IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult"); |
502 | 0 | return false; |
503 | 0 | } |
504 | 0 | |
505 | 0 | switch (type) { |
506 | 0 | case union__::TIPCServiceWorkerRegistrationDescriptor: |
507 | 0 | { |
508 | 0 | mozilla::dom::IPCServiceWorkerRegistrationDescriptor tmp = mozilla::dom::IPCServiceWorkerRegistrationDescriptor(); |
509 | 0 | (*(aVar)) = tmp; |
510 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_IPCServiceWorkerRegistrationDescriptor())))))) { |
511 | 0 | (aActor)->FatalError("Error deserializing variant TIPCServiceWorkerRegistrationDescriptor of union IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult"); |
512 | 0 | return false; |
513 | 0 | } |
514 | 0 | // Sentinel = 'TIPCServiceWorkerRegistrationDescriptor' |
515 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 212029166)))) { |
516 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TIPCServiceWorkerRegistrationDescriptor of union IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult"); |
517 | 0 | return false; |
518 | 0 | } |
519 | 0 | return true; |
520 | 0 | } |
521 | 0 | case union__::TCopyableErrorResult: |
522 | 0 | { |
523 | 0 | mozilla::CopyableErrorResult tmp = mozilla::CopyableErrorResult(); |
524 | 0 | (*(aVar)) = tmp; |
525 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_CopyableErrorResult())))))) { |
526 | 0 | (aActor)->FatalError("Error deserializing variant TCopyableErrorResult of union IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult"); |
527 | 0 | return false; |
528 | 0 | } |
529 | 0 | // Sentinel = 'TCopyableErrorResult' |
530 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1942409608)))) { |
531 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TCopyableErrorResult of union IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult"); |
532 | 0 | return false; |
533 | 0 | } |
534 | 0 | return true; |
535 | 0 | } |
536 | 0 | default: |
537 | 0 | { |
538 | 0 | (aActor)->FatalError("unknown union type"); |
539 | 0 | return false; |
540 | 0 | } |
541 | 0 | } |
542 | 0 | } |
543 | | |
544 | | } // namespace ipc |
545 | | } // namespace mozilla |
546 | | |
547 | | //----------------------------------------------------------------------------- |
548 | | // Method definitions for the IPDL type |struct IPCServiceWorkerRegistrationDescriptorList| |
549 | | // |
550 | | namespace mozilla { |
551 | | namespace dom { |
552 | | auto IPCServiceWorkerRegistrationDescriptorList::operator==(const IPCServiceWorkerRegistrationDescriptorList& _o) const -> bool |
553 | 0 | { |
554 | 0 | if ((!((values()) == ((_o).values())))) { |
555 | 0 | return false; |
556 | 0 | } |
557 | 0 | return true; |
558 | 0 | } |
559 | | |
560 | | auto IPCServiceWorkerRegistrationDescriptorList::operator!=(const IPCServiceWorkerRegistrationDescriptorList& _o) const -> bool |
561 | 0 | { |
562 | 0 | return (!(operator==(_o))); |
563 | 0 | } |
564 | | |
565 | | } // namespace dom |
566 | | } // namespace mozilla |
567 | | |
568 | | namespace mozilla { |
569 | | namespace ipc { |
570 | | auto IPDLParamTraits<mozilla::dom::IPCServiceWorkerRegistrationDescriptorList>::Write( |
571 | | IPC::Message* aMsg, |
572 | | mozilla::ipc::IProtocol* aActor, |
573 | | const paramType& aVar) -> void |
574 | 0 | { |
575 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).values()); |
576 | 0 | // Sentinel = 'values' |
577 | 0 | (aMsg)->WriteSentinel(3006433652); |
578 | 0 | } |
579 | | |
580 | | auto IPDLParamTraits<mozilla::dom::IPCServiceWorkerRegistrationDescriptorList>::Read( |
581 | | const IPC::Message* aMsg, |
582 | | PickleIterator* aIter, |
583 | | mozilla::ipc::IProtocol* aActor, |
584 | | paramType* aVar) -> bool |
585 | 0 | { |
586 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->values())))))) { |
587 | 0 | (aActor)->FatalError("Error deserializing 'values' (IPCServiceWorkerRegistrationDescriptor[]) member of 'IPCServiceWorkerRegistrationDescriptorList'"); |
588 | 0 | return false; |
589 | 0 | } |
590 | 0 | // Sentinel = 'values' |
591 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3006433652)))) { |
592 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'values' (IPCServiceWorkerRegistrationDescriptor[]) member of 'IPCServiceWorkerRegistrationDescriptorList'"); |
593 | 0 | return false; |
594 | 0 | } |
595 | 0 | return true; |
596 | 0 | } |
597 | | |
598 | | } // namespace ipc |
599 | | } // namespace mozilla |
600 | | |
601 | | //----------------------------------------------------------------------------- |
602 | | // Method definitions for the IPDL type |union IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult| |
603 | | // |
604 | | namespace mozilla { |
605 | | namespace dom { |
606 | | auto IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult::MaybeDestroy(Type aNewType) -> bool |
607 | 0 | { |
608 | 0 | if ((mType) == (T__None)) { |
609 | 0 | return true; |
610 | 0 | } |
611 | 0 | if ((mType) == (aNewType)) { |
612 | 0 | return false; |
613 | 0 | } |
614 | 0 | switch (mType) { |
615 | 0 | case TIPCServiceWorkerRegistrationDescriptorList: |
616 | 0 | { |
617 | 0 | (ptr_IPCServiceWorkerRegistrationDescriptorList())->~IPCServiceWorkerRegistrationDescriptorList__tdef(); |
618 | 0 | break; |
619 | 0 | } |
620 | 0 | case TCopyableErrorResult: |
621 | 0 | { |
622 | 0 | (ptr_CopyableErrorResult())->~CopyableErrorResult__tdef(); |
623 | 0 | break; |
624 | 0 | } |
625 | 0 | default: |
626 | 0 | { |
627 | 0 | mozilla::ipc::LogicError("not reached"); |
628 | 0 | break; |
629 | 0 | } |
630 | 0 | } |
631 | 0 | return true; |
632 | 0 | } |
633 | | |
634 | | MOZ_IMPLICIT IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult::IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult(const IPCServiceWorkerRegistrationDescriptorList& aOther) |
635 | 0 | { |
636 | 0 | new (mozilla::KnownNotNull, ptr_IPCServiceWorkerRegistrationDescriptorList()) IPCServiceWorkerRegistrationDescriptorList(aOther); |
637 | 0 | mType = TIPCServiceWorkerRegistrationDescriptorList; |
638 | 0 | } |
639 | | |
640 | | MOZ_IMPLICIT IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult::IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult(IPCServiceWorkerRegistrationDescriptorList&& aOther) |
641 | 0 | { |
642 | 0 | new (mozilla::KnownNotNull, ptr_IPCServiceWorkerRegistrationDescriptorList()) IPCServiceWorkerRegistrationDescriptorList(std::move(aOther)); |
643 | 0 | mType = TIPCServiceWorkerRegistrationDescriptorList; |
644 | 0 | } |
645 | | |
646 | | MOZ_IMPLICIT IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult::IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult(const CopyableErrorResult& aOther) |
647 | 0 | { |
648 | 0 | new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult(aOther); |
649 | 0 | mType = TCopyableErrorResult; |
650 | 0 | } |
651 | | |
652 | | MOZ_IMPLICIT IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult::IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult(CopyableErrorResult&& aOther) |
653 | 0 | { |
654 | 0 | new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult(std::move(aOther)); |
655 | 0 | mType = TCopyableErrorResult; |
656 | 0 | } |
657 | | |
658 | | MOZ_IMPLICIT IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult::IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult(const IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult& aOther) |
659 | 0 | { |
660 | 0 | (aOther).AssertSanity(); |
661 | 0 | switch ((aOther).type()) { |
662 | 0 | case TIPCServiceWorkerRegistrationDescriptorList: |
663 | 0 | { |
664 | 0 | new (mozilla::KnownNotNull, ptr_IPCServiceWorkerRegistrationDescriptorList()) IPCServiceWorkerRegistrationDescriptorList((aOther).get_IPCServiceWorkerRegistrationDescriptorList()); |
665 | 0 | break; |
666 | 0 | } |
667 | 0 | case TCopyableErrorResult: |
668 | 0 | { |
669 | 0 | new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult((aOther).get_CopyableErrorResult()); |
670 | 0 | break; |
671 | 0 | } |
672 | 0 | case T__None: |
673 | 0 | { |
674 | 0 | break; |
675 | 0 | } |
676 | 0 | default: |
677 | 0 | { |
678 | 0 | mozilla::ipc::LogicError("unreached"); |
679 | 0 | return; |
680 | 0 | } |
681 | 0 | } |
682 | 0 | mType = (aOther).type(); |
683 | 0 | } |
684 | | |
685 | | MOZ_IMPLICIT IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult::IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult(IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult&& aOther) |
686 | 0 | { |
687 | 0 | (aOther).AssertSanity(); |
688 | 0 | Type t = (aOther).type(); |
689 | 0 | switch (t) { |
690 | 0 | case TIPCServiceWorkerRegistrationDescriptorList: |
691 | 0 | { |
692 | 0 | new (mozilla::KnownNotNull, ptr_IPCServiceWorkerRegistrationDescriptorList()) IPCServiceWorkerRegistrationDescriptorList(std::move((aOther).get_IPCServiceWorkerRegistrationDescriptorList())); |
693 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
694 | 0 | break; |
695 | 0 | } |
696 | 0 | case TCopyableErrorResult: |
697 | 0 | { |
698 | 0 | new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult(std::move((aOther).get_CopyableErrorResult())); |
699 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
700 | 0 | break; |
701 | 0 | } |
702 | 0 | case T__None: |
703 | 0 | { |
704 | 0 | break; |
705 | 0 | } |
706 | 0 | default: |
707 | 0 | { |
708 | 0 | mozilla::ipc::LogicError("unreached"); |
709 | 0 | return; |
710 | 0 | } |
711 | 0 | } |
712 | 0 | (aOther).mType = T__None; |
713 | 0 | mType = t; |
714 | 0 | } |
715 | | |
716 | | IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult::~IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult() |
717 | 0 | { |
718 | 0 | static_cast<void>(MaybeDestroy(T__None)); |
719 | 0 | } |
720 | | |
721 | | auto IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult::operator=(const IPCServiceWorkerRegistrationDescriptorList& aRhs) -> IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult& |
722 | 0 | { |
723 | 0 | if (MaybeDestroy(TIPCServiceWorkerRegistrationDescriptorList)) { |
724 | 0 | new (mozilla::KnownNotNull, ptr_IPCServiceWorkerRegistrationDescriptorList()) IPCServiceWorkerRegistrationDescriptorList; |
725 | 0 | } |
726 | 0 | (*(ptr_IPCServiceWorkerRegistrationDescriptorList())) = aRhs; |
727 | 0 | mType = TIPCServiceWorkerRegistrationDescriptorList; |
728 | 0 | return (*(this)); |
729 | 0 | } |
730 | | |
731 | | auto IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult::operator=(IPCServiceWorkerRegistrationDescriptorList&& aRhs) -> IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult& |
732 | 0 | { |
733 | 0 | if (MaybeDestroy(TIPCServiceWorkerRegistrationDescriptorList)) { |
734 | 0 | new (mozilla::KnownNotNull, ptr_IPCServiceWorkerRegistrationDescriptorList()) IPCServiceWorkerRegistrationDescriptorList; |
735 | 0 | } |
736 | 0 | (*(ptr_IPCServiceWorkerRegistrationDescriptorList())) = std::move(aRhs); |
737 | 0 | mType = TIPCServiceWorkerRegistrationDescriptorList; |
738 | 0 | return (*(this)); |
739 | 0 | } |
740 | | |
741 | | auto IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult::operator=(const CopyableErrorResult& aRhs) -> IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult& |
742 | 0 | { |
743 | 0 | if (MaybeDestroy(TCopyableErrorResult)) { |
744 | 0 | new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult; |
745 | 0 | } |
746 | 0 | (*(ptr_CopyableErrorResult())) = aRhs; |
747 | 0 | mType = TCopyableErrorResult; |
748 | 0 | return (*(this)); |
749 | 0 | } |
750 | | |
751 | | auto IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult::operator=(CopyableErrorResult&& aRhs) -> IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult& |
752 | 0 | { |
753 | 0 | if (MaybeDestroy(TCopyableErrorResult)) { |
754 | 0 | new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult; |
755 | 0 | } |
756 | 0 | (*(ptr_CopyableErrorResult())) = std::move(aRhs); |
757 | 0 | mType = TCopyableErrorResult; |
758 | 0 | return (*(this)); |
759 | 0 | } |
760 | | |
761 | | auto IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult::operator=(const IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult& aRhs) -> IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult& |
762 | 0 | { |
763 | 0 | (aRhs).AssertSanity(); |
764 | 0 | Type t = (aRhs).type(); |
765 | 0 | switch (t) { |
766 | 0 | case TIPCServiceWorkerRegistrationDescriptorList: |
767 | 0 | { |
768 | 0 | if (MaybeDestroy(t)) { |
769 | 0 | new (mozilla::KnownNotNull, ptr_IPCServiceWorkerRegistrationDescriptorList()) IPCServiceWorkerRegistrationDescriptorList; |
770 | 0 | } |
771 | 0 | (*(ptr_IPCServiceWorkerRegistrationDescriptorList())) = (aRhs).get_IPCServiceWorkerRegistrationDescriptorList(); |
772 | 0 | break; |
773 | 0 | } |
774 | 0 | case TCopyableErrorResult: |
775 | 0 | { |
776 | 0 | if (MaybeDestroy(t)) { |
777 | 0 | new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult; |
778 | 0 | } |
779 | 0 | (*(ptr_CopyableErrorResult())) = (aRhs).get_CopyableErrorResult(); |
780 | 0 | break; |
781 | 0 | } |
782 | 0 | case T__None: |
783 | 0 | { |
784 | 0 | static_cast<void>(MaybeDestroy(t)); |
785 | 0 | break; |
786 | 0 | } |
787 | 0 | default: |
788 | 0 | { |
789 | 0 | mozilla::ipc::LogicError("unreached"); |
790 | 0 | break; |
791 | 0 | } |
792 | 0 | } |
793 | 0 | mType = t; |
794 | 0 | return (*(this)); |
795 | 0 | } |
796 | | |
797 | | auto IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult::operator=(IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult&& aRhs) -> IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult& |
798 | 0 | { |
799 | 0 | (aRhs).AssertSanity(); |
800 | 0 | Type t = (aRhs).type(); |
801 | 0 | switch (t) { |
802 | 0 | case TIPCServiceWorkerRegistrationDescriptorList: |
803 | 0 | { |
804 | 0 | if (MaybeDestroy(t)) { |
805 | 0 | new (mozilla::KnownNotNull, ptr_IPCServiceWorkerRegistrationDescriptorList()) IPCServiceWorkerRegistrationDescriptorList; |
806 | 0 | } |
807 | 0 | (*(ptr_IPCServiceWorkerRegistrationDescriptorList())) = std::move((aRhs).get_IPCServiceWorkerRegistrationDescriptorList()); |
808 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
809 | 0 | break; |
810 | 0 | } |
811 | 0 | case TCopyableErrorResult: |
812 | 0 | { |
813 | 0 | if (MaybeDestroy(t)) { |
814 | 0 | new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult; |
815 | 0 | } |
816 | 0 | (*(ptr_CopyableErrorResult())) = std::move((aRhs).get_CopyableErrorResult()); |
817 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
818 | 0 | break; |
819 | 0 | } |
820 | 0 | case T__None: |
821 | 0 | { |
822 | 0 | static_cast<void>(MaybeDestroy(t)); |
823 | 0 | break; |
824 | 0 | } |
825 | 0 | default: |
826 | 0 | { |
827 | 0 | mozilla::ipc::LogicError("unreached"); |
828 | 0 | break; |
829 | 0 | } |
830 | 0 | } |
831 | 0 | (aRhs).mType = T__None; |
832 | 0 | mType = t; |
833 | 0 | return (*(this)); |
834 | 0 | } |
835 | | |
836 | | auto IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult::operator==(const IPCServiceWorkerRegistrationDescriptorList& aRhs) const -> bool |
837 | 0 | { |
838 | 0 | return (get_IPCServiceWorkerRegistrationDescriptorList()) == (aRhs); |
839 | 0 | } |
840 | | |
841 | | auto IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult::operator==(const CopyableErrorResult& aRhs) const -> bool |
842 | 0 | { |
843 | 0 | return (get_CopyableErrorResult()) == (aRhs); |
844 | 0 | } |
845 | | |
846 | | auto IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult::operator==(const IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult& aRhs) const -> bool |
847 | 0 | { |
848 | 0 | if ((type()) != ((aRhs).type())) { |
849 | 0 | return false; |
850 | 0 | } |
851 | 0 | |
852 | 0 | switch (type()) { |
853 | 0 | case TIPCServiceWorkerRegistrationDescriptorList: |
854 | 0 | { |
855 | 0 | return (get_IPCServiceWorkerRegistrationDescriptorList()) == ((aRhs).get_IPCServiceWorkerRegistrationDescriptorList()); |
856 | 0 | } |
857 | 0 | case TCopyableErrorResult: |
858 | 0 | { |
859 | 0 | return (get_CopyableErrorResult()) == ((aRhs).get_CopyableErrorResult()); |
860 | 0 | } |
861 | 0 | default: |
862 | 0 | { |
863 | 0 | mozilla::ipc::LogicError("unreached"); |
864 | 0 | return false; |
865 | 0 | } |
866 | 0 | } |
867 | 0 | } |
868 | | |
869 | | auto IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult::get(IPCServiceWorkerRegistrationDescriptorList* aOutValue) const -> void |
870 | 0 | { |
871 | 0 | (*(aOutValue)) = get_IPCServiceWorkerRegistrationDescriptorList(); |
872 | 0 | } |
873 | | |
874 | | auto IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult::get(CopyableErrorResult* aOutValue) const -> void |
875 | 0 | { |
876 | 0 | (*(aOutValue)) = get_CopyableErrorResult(); |
877 | 0 | } |
878 | | |
879 | | } // namespace dom |
880 | | } // namespace mozilla |
881 | | |
882 | | namespace mozilla { |
883 | | namespace ipc { |
884 | | auto IPDLParamTraits<mozilla::dom::IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult>::Write( |
885 | | IPC::Message* aMsg, |
886 | | mozilla::ipc::IProtocol* aActor, |
887 | | const paramType& aVar) -> void |
888 | | { |
889 | | typedef mozilla::dom::IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult union__; |
890 | | int type; |
891 | | type = (aVar).type(); |
892 | | WriteIPDLParam(aMsg, aActor, type); |
893 | | // Sentinel = 'IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult' |
894 | | (aMsg)->WriteSentinel(4293376557); |
895 | | |
896 | | switch (type) { |
897 | | case union__::TIPCServiceWorkerRegistrationDescriptorList: |
898 | | { |
899 | | WriteIPDLParam(aMsg, aActor, (aVar).get_IPCServiceWorkerRegistrationDescriptorList()); |
900 | | // Sentinel = 'TIPCServiceWorkerRegistrationDescriptorList' |
901 | | (aMsg)->WriteSentinel(694713850); |
902 | | return; |
903 | | } |
904 | | case union__::TCopyableErrorResult: |
905 | | { |
906 | | WriteIPDLParam(aMsg, aActor, (aVar).get_CopyableErrorResult()); |
907 | | // Sentinel = 'TCopyableErrorResult' |
908 | | (aMsg)->WriteSentinel(1942409608); |
909 | | return; |
910 | | } |
911 | | default: |
912 | | { |
913 | | (aActor)->FatalError("unknown union type"); |
914 | | return; |
915 | | } |
916 | | } |
917 | | } |
918 | | |
919 | | auto IPDLParamTraits<mozilla::dom::IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult>::Read( |
920 | | const IPC::Message* aMsg, |
921 | | PickleIterator* aIter, |
922 | | mozilla::ipc::IProtocol* aActor, |
923 | | paramType* aVar) -> bool |
924 | 0 | { |
925 | 0 | typedef mozilla::dom::IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult union__; |
926 | 0 | int type; |
927 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&(type)))))) { |
928 | 0 | (aActor)->FatalError("Error deserializing type of union IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult"); |
929 | 0 | return false; |
930 | 0 | } |
931 | 0 | // Sentinel = 'IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult' |
932 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 4293376557)))) { |
933 | 0 | mozilla::ipc::SentinelReadError("Error deserializing type of union IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult"); |
934 | 0 | return false; |
935 | 0 | } |
936 | 0 | |
937 | 0 | switch (type) { |
938 | 0 | case union__::TIPCServiceWorkerRegistrationDescriptorList: |
939 | 0 | { |
940 | 0 | mozilla::dom::IPCServiceWorkerRegistrationDescriptorList tmp = mozilla::dom::IPCServiceWorkerRegistrationDescriptorList(); |
941 | 0 | (*(aVar)) = tmp; |
942 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_IPCServiceWorkerRegistrationDescriptorList())))))) { |
943 | 0 | (aActor)->FatalError("Error deserializing variant TIPCServiceWorkerRegistrationDescriptorList of union IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult"); |
944 | 0 | return false; |
945 | 0 | } |
946 | 0 | // Sentinel = 'TIPCServiceWorkerRegistrationDescriptorList' |
947 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 694713850)))) { |
948 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TIPCServiceWorkerRegistrationDescriptorList of union IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult"); |
949 | 0 | return false; |
950 | 0 | } |
951 | 0 | return true; |
952 | 0 | } |
953 | 0 | case union__::TCopyableErrorResult: |
954 | 0 | { |
955 | 0 | mozilla::CopyableErrorResult tmp = mozilla::CopyableErrorResult(); |
956 | 0 | (*(aVar)) = tmp; |
957 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_CopyableErrorResult())))))) { |
958 | 0 | (aActor)->FatalError("Error deserializing variant TCopyableErrorResult of union IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult"); |
959 | 0 | return false; |
960 | 0 | } |
961 | 0 | // Sentinel = 'TCopyableErrorResult' |
962 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1942409608)))) { |
963 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TCopyableErrorResult of union IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult"); |
964 | 0 | return false; |
965 | 0 | } |
966 | 0 | return true; |
967 | 0 | } |
968 | 0 | default: |
969 | 0 | { |
970 | 0 | (aActor)->FatalError("unknown union type"); |
971 | 0 | return false; |
972 | 0 | } |
973 | 0 | } |
974 | 0 | } |
975 | | |
976 | | } // namespace ipc |
977 | | } // namespace mozilla |