/work/obj-fuzz/ipc/ipdl/URIParams.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/ipc/URIParams.h" |
8 | | |
9 | | |
10 | | //----------------------------------------------------------------------------- |
11 | | // Method definitions for the IPDL type |struct SimpleURIParams| |
12 | | // |
13 | | namespace mozilla { |
14 | | namespace ipc { |
15 | | auto SimpleURIParams::operator==(const SimpleURIParams& _o) const -> bool |
16 | 0 | { |
17 | 0 | if ((!((scheme()) == ((_o).scheme())))) { |
18 | 0 | return false; |
19 | 0 | } |
20 | 0 | if ((!((path()) == ((_o).path())))) { |
21 | 0 | return false; |
22 | 0 | } |
23 | 0 | if ((!((ref()) == ((_o).ref())))) { |
24 | 0 | return false; |
25 | 0 | } |
26 | 0 | if ((!((query()) == ((_o).query())))) { |
27 | 0 | return false; |
28 | 0 | } |
29 | 0 | return true; |
30 | 0 | } |
31 | | |
32 | | auto SimpleURIParams::operator!=(const SimpleURIParams& _o) const -> bool |
33 | 0 | { |
34 | 0 | return (!(operator==(_o))); |
35 | 0 | } |
36 | | |
37 | | } // namespace ipc |
38 | | } // namespace mozilla |
39 | | |
40 | | namespace mozilla { |
41 | | namespace ipc { |
42 | | auto IPDLParamTraits<mozilla::ipc::SimpleURIParams>::Write( |
43 | | IPC::Message* aMsg, |
44 | | mozilla::ipc::IProtocol* aActor, |
45 | | const paramType& aVar) -> void |
46 | 0 | { |
47 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).scheme()); |
48 | 0 | // Sentinel = 'scheme' |
49 | 0 | (aMsg)->WriteSentinel(3619238715); |
50 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).path()); |
51 | 0 | // Sentinel = 'path' |
52 | 0 | (aMsg)->WriteSentinel(913629401); |
53 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).ref()); |
54 | 0 | // Sentinel = 'ref' |
55 | 0 | (aMsg)->WriteSentinel(2626476732); |
56 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).query()); |
57 | 0 | // Sentinel = 'query' |
58 | 0 | (aMsg)->WriteSentinel(4249802777); |
59 | 0 | } |
60 | | |
61 | | auto IPDLParamTraits<mozilla::ipc::SimpleURIParams>::Read( |
62 | | const IPC::Message* aMsg, |
63 | | PickleIterator* aIter, |
64 | | mozilla::ipc::IProtocol* aActor, |
65 | | paramType* aVar) -> bool |
66 | 0 | { |
67 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->scheme())))))) { |
68 | 0 | (aActor)->FatalError("Error deserializing 'scheme' (nsCString) member of 'SimpleURIParams'"); |
69 | 0 | return false; |
70 | 0 | } |
71 | 0 | // Sentinel = 'scheme' |
72 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3619238715)))) { |
73 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'scheme' (nsCString) member of 'SimpleURIParams'"); |
74 | 0 | return false; |
75 | 0 | } |
76 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->path())))))) { |
77 | 0 | (aActor)->FatalError("Error deserializing 'path' (nsCString) member of 'SimpleURIParams'"); |
78 | 0 | return false; |
79 | 0 | } |
80 | 0 | // Sentinel = 'path' |
81 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 913629401)))) { |
82 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'path' (nsCString) member of 'SimpleURIParams'"); |
83 | 0 | return false; |
84 | 0 | } |
85 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->ref())))))) { |
86 | 0 | (aActor)->FatalError("Error deserializing 'ref' (nsCString) member of 'SimpleURIParams'"); |
87 | 0 | return false; |
88 | 0 | } |
89 | 0 | // Sentinel = 'ref' |
90 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2626476732)))) { |
91 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ref' (nsCString) member of 'SimpleURIParams'"); |
92 | 0 | return false; |
93 | 0 | } |
94 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->query())))))) { |
95 | 0 | (aActor)->FatalError("Error deserializing 'query' (nsCString) member of 'SimpleURIParams'"); |
96 | 0 | return false; |
97 | 0 | } |
98 | 0 | // Sentinel = 'query' |
99 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 4249802777)))) { |
100 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'query' (nsCString) member of 'SimpleURIParams'"); |
101 | 0 | return false; |
102 | 0 | } |
103 | 0 | return true; |
104 | 0 | } |
105 | | |
106 | | } // namespace ipc |
107 | | } // namespace mozilla |
108 | | |
109 | | //----------------------------------------------------------------------------- |
110 | | // Method definitions for the IPDL type |struct StandardURLSegment| |
111 | | // |
112 | | namespace mozilla { |
113 | | namespace ipc { |
114 | | auto StandardURLSegment::operator==(const StandardURLSegment& _o) const -> bool |
115 | 0 | { |
116 | 0 | if ((!((position()) == ((_o).position())))) { |
117 | 0 | return false; |
118 | 0 | } |
119 | 0 | if ((!((length()) == ((_o).length())))) { |
120 | 0 | return false; |
121 | 0 | } |
122 | 0 | return true; |
123 | 0 | } |
124 | | |
125 | | auto StandardURLSegment::operator!=(const StandardURLSegment& _o) const -> bool |
126 | 0 | { |
127 | 0 | return (!(operator==(_o))); |
128 | 0 | } |
129 | | |
130 | | } // namespace ipc |
131 | | } // namespace mozilla |
132 | | |
133 | | namespace mozilla { |
134 | | namespace ipc { |
135 | | auto IPDLParamTraits<mozilla::ipc::StandardURLSegment>::Write( |
136 | | IPC::Message* aMsg, |
137 | | mozilla::ipc::IProtocol* aActor, |
138 | | const paramType& aVar) -> void |
139 | 0 | { |
140 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).position()); |
141 | 0 | // Sentinel = 'position' |
142 | 0 | (aMsg)->WriteSentinel(50847225); |
143 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).length()); |
144 | 0 | // Sentinel = 'length' |
145 | 0 | (aMsg)->WriteSentinel(1726618354); |
146 | 0 | } |
147 | | |
148 | | auto IPDLParamTraits<mozilla::ipc::StandardURLSegment>::Read( |
149 | | const IPC::Message* aMsg, |
150 | | PickleIterator* aIter, |
151 | | mozilla::ipc::IProtocol* aActor, |
152 | | paramType* aVar) -> bool |
153 | 0 | { |
154 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->position())))))) { |
155 | 0 | (aActor)->FatalError("Error deserializing 'position' (uint32_t) member of 'StandardURLSegment'"); |
156 | 0 | return false; |
157 | 0 | } |
158 | 0 | // Sentinel = 'position' |
159 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 50847225)))) { |
160 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'position' (uint32_t) member of 'StandardURLSegment'"); |
161 | 0 | return false; |
162 | 0 | } |
163 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->length())))))) { |
164 | 0 | (aActor)->FatalError("Error deserializing 'length' (int32_t) member of 'StandardURLSegment'"); |
165 | 0 | return false; |
166 | 0 | } |
167 | 0 | // Sentinel = 'length' |
168 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1726618354)))) { |
169 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'length' (int32_t) member of 'StandardURLSegment'"); |
170 | 0 | return false; |
171 | 0 | } |
172 | 0 | return true; |
173 | 0 | } |
174 | | |
175 | | } // namespace ipc |
176 | | } // namespace mozilla |
177 | | |
178 | | //----------------------------------------------------------------------------- |
179 | | // Method definitions for the IPDL type |struct StandardURLParams| |
180 | | // |
181 | | namespace mozilla { |
182 | | namespace ipc { |
183 | | auto StandardURLParams::operator==(const StandardURLParams& _o) const -> bool |
184 | 0 | { |
185 | 0 | if ((!((urlType()) == ((_o).urlType())))) { |
186 | 0 | return false; |
187 | 0 | } |
188 | 0 | if ((!((port()) == ((_o).port())))) { |
189 | 0 | return false; |
190 | 0 | } |
191 | 0 | if ((!((defaultPort()) == ((_o).defaultPort())))) { |
192 | 0 | return false; |
193 | 0 | } |
194 | 0 | if ((!((spec()) == ((_o).spec())))) { |
195 | 0 | return false; |
196 | 0 | } |
197 | 0 | if ((!((scheme()) == ((_o).scheme())))) { |
198 | 0 | return false; |
199 | 0 | } |
200 | 0 | if ((!((authority()) == ((_o).authority())))) { |
201 | 0 | return false; |
202 | 0 | } |
203 | 0 | if ((!((username()) == ((_o).username())))) { |
204 | 0 | return false; |
205 | 0 | } |
206 | 0 | if ((!((password()) == ((_o).password())))) { |
207 | 0 | return false; |
208 | 0 | } |
209 | 0 | if ((!((host()) == ((_o).host())))) { |
210 | 0 | return false; |
211 | 0 | } |
212 | 0 | if ((!((path()) == ((_o).path())))) { |
213 | 0 | return false; |
214 | 0 | } |
215 | 0 | if ((!((filePath()) == ((_o).filePath())))) { |
216 | 0 | return false; |
217 | 0 | } |
218 | 0 | if ((!((directory()) == ((_o).directory())))) { |
219 | 0 | return false; |
220 | 0 | } |
221 | 0 | if ((!((baseName()) == ((_o).baseName())))) { |
222 | 0 | return false; |
223 | 0 | } |
224 | 0 | if ((!((extension()) == ((_o).extension())))) { |
225 | 0 | return false; |
226 | 0 | } |
227 | 0 | if ((!((query()) == ((_o).query())))) { |
228 | 0 | return false; |
229 | 0 | } |
230 | 0 | if ((!((ref()) == ((_o).ref())))) { |
231 | 0 | return false; |
232 | 0 | } |
233 | 0 | if ((!((supportsFileURL()) == ((_o).supportsFileURL())))) { |
234 | 0 | return false; |
235 | 0 | } |
236 | 0 | return true; |
237 | 0 | } |
238 | | |
239 | | auto StandardURLParams::operator!=(const StandardURLParams& _o) const -> bool |
240 | 0 | { |
241 | 0 | return (!(operator==(_o))); |
242 | 0 | } |
243 | | |
244 | | } // namespace ipc |
245 | | } // namespace mozilla |
246 | | |
247 | | namespace mozilla { |
248 | | namespace ipc { |
249 | | auto IPDLParamTraits<mozilla::ipc::StandardURLParams>::Write( |
250 | | IPC::Message* aMsg, |
251 | | mozilla::ipc::IProtocol* aActor, |
252 | | const paramType& aVar) -> void |
253 | 0 | { |
254 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).urlType()); |
255 | 0 | // Sentinel = 'urlType' |
256 | 0 | (aMsg)->WriteSentinel(4149428228); |
257 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).port()); |
258 | 0 | // Sentinel = 'port' |
259 | 0 | (aMsg)->WriteSentinel(3633211549); |
260 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).defaultPort()); |
261 | 0 | // Sentinel = 'defaultPort' |
262 | 0 | (aMsg)->WriteSentinel(599318897); |
263 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).spec()); |
264 | 0 | // Sentinel = 'spec' |
265 | 0 | (aMsg)->WriteSentinel(1630740541); |
266 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).scheme()); |
267 | 0 | // Sentinel = 'scheme' |
268 | 0 | (aMsg)->WriteSentinel(3619238715); |
269 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).authority()); |
270 | 0 | // Sentinel = 'authority' |
271 | 0 | (aMsg)->WriteSentinel(1669684878); |
272 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).username()); |
273 | 0 | // Sentinel = 'username' |
274 | 0 | (aMsg)->WriteSentinel(689225024); |
275 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).password()); |
276 | 0 | // Sentinel = 'password' |
277 | 0 | (aMsg)->WriteSentinel(2527534683); |
278 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).host()); |
279 | 0 | // Sentinel = 'host' |
280 | 0 | (aMsg)->WriteSentinel(4070301394); |
281 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).path()); |
282 | 0 | // Sentinel = 'path' |
283 | 0 | (aMsg)->WriteSentinel(913629401); |
284 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).filePath()); |
285 | 0 | // Sentinel = 'filePath' |
286 | 0 | (aMsg)->WriteSentinel(4122896455); |
287 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).directory()); |
288 | 0 | // Sentinel = 'directory' |
289 | 0 | (aMsg)->WriteSentinel(1201172472); |
290 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).baseName()); |
291 | 0 | // Sentinel = 'baseName' |
292 | 0 | (aMsg)->WriteSentinel(2448877418); |
293 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).extension()); |
294 | 0 | // Sentinel = 'extension' |
295 | 0 | (aMsg)->WriteSentinel(3211853542); |
296 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).query()); |
297 | 0 | // Sentinel = 'query' |
298 | 0 | (aMsg)->WriteSentinel(4249802777); |
299 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).ref()); |
300 | 0 | // Sentinel = 'ref' |
301 | 0 | (aMsg)->WriteSentinel(2626476732); |
302 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).supportsFileURL()); |
303 | 0 | // Sentinel = 'supportsFileURL' |
304 | 0 | (aMsg)->WriteSentinel(1871785710); |
305 | 0 | } |
306 | | |
307 | | auto IPDLParamTraits<mozilla::ipc::StandardURLParams>::Read( |
308 | | const IPC::Message* aMsg, |
309 | | PickleIterator* aIter, |
310 | | mozilla::ipc::IProtocol* aActor, |
311 | | paramType* aVar) -> bool |
312 | 0 | { |
313 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->urlType())))))) { |
314 | 0 | (aActor)->FatalError("Error deserializing 'urlType' (uint32_t) member of 'StandardURLParams'"); |
315 | 0 | return false; |
316 | 0 | } |
317 | 0 | // Sentinel = 'urlType' |
318 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 4149428228)))) { |
319 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'urlType' (uint32_t) member of 'StandardURLParams'"); |
320 | 0 | return false; |
321 | 0 | } |
322 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->port())))))) { |
323 | 0 | (aActor)->FatalError("Error deserializing 'port' (int32_t) member of 'StandardURLParams'"); |
324 | 0 | return false; |
325 | 0 | } |
326 | 0 | // Sentinel = 'port' |
327 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3633211549)))) { |
328 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'port' (int32_t) member of 'StandardURLParams'"); |
329 | 0 | return false; |
330 | 0 | } |
331 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->defaultPort())))))) { |
332 | 0 | (aActor)->FatalError("Error deserializing 'defaultPort' (int32_t) member of 'StandardURLParams'"); |
333 | 0 | return false; |
334 | 0 | } |
335 | 0 | // Sentinel = 'defaultPort' |
336 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 599318897)))) { |
337 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'defaultPort' (int32_t) member of 'StandardURLParams'"); |
338 | 0 | return false; |
339 | 0 | } |
340 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->spec())))))) { |
341 | 0 | (aActor)->FatalError("Error deserializing 'spec' (nsCString) member of 'StandardURLParams'"); |
342 | 0 | return false; |
343 | 0 | } |
344 | 0 | // Sentinel = 'spec' |
345 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1630740541)))) { |
346 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'spec' (nsCString) member of 'StandardURLParams'"); |
347 | 0 | return false; |
348 | 0 | } |
349 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->scheme())))))) { |
350 | 0 | (aActor)->FatalError("Error deserializing 'scheme' (StandardURLSegment) member of 'StandardURLParams'"); |
351 | 0 | return false; |
352 | 0 | } |
353 | 0 | // Sentinel = 'scheme' |
354 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3619238715)))) { |
355 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'scheme' (StandardURLSegment) member of 'StandardURLParams'"); |
356 | 0 | return false; |
357 | 0 | } |
358 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->authority())))))) { |
359 | 0 | (aActor)->FatalError("Error deserializing 'authority' (StandardURLSegment) member of 'StandardURLParams'"); |
360 | 0 | return false; |
361 | 0 | } |
362 | 0 | // Sentinel = 'authority' |
363 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1669684878)))) { |
364 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'authority' (StandardURLSegment) member of 'StandardURLParams'"); |
365 | 0 | return false; |
366 | 0 | } |
367 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->username())))))) { |
368 | 0 | (aActor)->FatalError("Error deserializing 'username' (StandardURLSegment) member of 'StandardURLParams'"); |
369 | 0 | return false; |
370 | 0 | } |
371 | 0 | // Sentinel = 'username' |
372 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 689225024)))) { |
373 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'username' (StandardURLSegment) member of 'StandardURLParams'"); |
374 | 0 | return false; |
375 | 0 | } |
376 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->password())))))) { |
377 | 0 | (aActor)->FatalError("Error deserializing 'password' (StandardURLSegment) member of 'StandardURLParams'"); |
378 | 0 | return false; |
379 | 0 | } |
380 | 0 | // Sentinel = 'password' |
381 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2527534683)))) { |
382 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'password' (StandardURLSegment) member of 'StandardURLParams'"); |
383 | 0 | return false; |
384 | 0 | } |
385 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->host())))))) { |
386 | 0 | (aActor)->FatalError("Error deserializing 'host' (StandardURLSegment) member of 'StandardURLParams'"); |
387 | 0 | return false; |
388 | 0 | } |
389 | 0 | // Sentinel = 'host' |
390 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 4070301394)))) { |
391 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'host' (StandardURLSegment) member of 'StandardURLParams'"); |
392 | 0 | return false; |
393 | 0 | } |
394 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->path())))))) { |
395 | 0 | (aActor)->FatalError("Error deserializing 'path' (StandardURLSegment) member of 'StandardURLParams'"); |
396 | 0 | return false; |
397 | 0 | } |
398 | 0 | // Sentinel = 'path' |
399 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 913629401)))) { |
400 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'path' (StandardURLSegment) member of 'StandardURLParams'"); |
401 | 0 | return false; |
402 | 0 | } |
403 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->filePath())))))) { |
404 | 0 | (aActor)->FatalError("Error deserializing 'filePath' (StandardURLSegment) member of 'StandardURLParams'"); |
405 | 0 | return false; |
406 | 0 | } |
407 | 0 | // Sentinel = 'filePath' |
408 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 4122896455)))) { |
409 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'filePath' (StandardURLSegment) member of 'StandardURLParams'"); |
410 | 0 | return false; |
411 | 0 | } |
412 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->directory())))))) { |
413 | 0 | (aActor)->FatalError("Error deserializing 'directory' (StandardURLSegment) member of 'StandardURLParams'"); |
414 | 0 | return false; |
415 | 0 | } |
416 | 0 | // Sentinel = 'directory' |
417 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1201172472)))) { |
418 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'directory' (StandardURLSegment) member of 'StandardURLParams'"); |
419 | 0 | return false; |
420 | 0 | } |
421 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->baseName())))))) { |
422 | 0 | (aActor)->FatalError("Error deserializing 'baseName' (StandardURLSegment) member of 'StandardURLParams'"); |
423 | 0 | return false; |
424 | 0 | } |
425 | 0 | // Sentinel = 'baseName' |
426 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2448877418)))) { |
427 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'baseName' (StandardURLSegment) member of 'StandardURLParams'"); |
428 | 0 | return false; |
429 | 0 | } |
430 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->extension())))))) { |
431 | 0 | (aActor)->FatalError("Error deserializing 'extension' (StandardURLSegment) member of 'StandardURLParams'"); |
432 | 0 | return false; |
433 | 0 | } |
434 | 0 | // Sentinel = 'extension' |
435 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3211853542)))) { |
436 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'extension' (StandardURLSegment) member of 'StandardURLParams'"); |
437 | 0 | return false; |
438 | 0 | } |
439 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->query())))))) { |
440 | 0 | (aActor)->FatalError("Error deserializing 'query' (StandardURLSegment) member of 'StandardURLParams'"); |
441 | 0 | return false; |
442 | 0 | } |
443 | 0 | // Sentinel = 'query' |
444 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 4249802777)))) { |
445 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'query' (StandardURLSegment) member of 'StandardURLParams'"); |
446 | 0 | return false; |
447 | 0 | } |
448 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->ref())))))) { |
449 | 0 | (aActor)->FatalError("Error deserializing 'ref' (StandardURLSegment) member of 'StandardURLParams'"); |
450 | 0 | return false; |
451 | 0 | } |
452 | 0 | // Sentinel = 'ref' |
453 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2626476732)))) { |
454 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ref' (StandardURLSegment) member of 'StandardURLParams'"); |
455 | 0 | return false; |
456 | 0 | } |
457 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->supportsFileURL())))))) { |
458 | 0 | (aActor)->FatalError("Error deserializing 'supportsFileURL' (bool) member of 'StandardURLParams'"); |
459 | 0 | return false; |
460 | 0 | } |
461 | 0 | // Sentinel = 'supportsFileURL' |
462 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1871785710)))) { |
463 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'supportsFileURL' (bool) member of 'StandardURLParams'"); |
464 | 0 | return false; |
465 | 0 | } |
466 | 0 | return true; |
467 | 0 | } |
468 | | |
469 | | } // namespace ipc |
470 | | } // namespace mozilla |
471 | | |
472 | | //----------------------------------------------------------------------------- |
473 | | // Method definitions for the IPDL type |struct JARURIParams| |
474 | | // |
475 | | namespace mozilla { |
476 | | namespace ipc { |
477 | | auto JARURIParams::operator==(const JARURIParams& _o) const -> bool |
478 | 0 | { |
479 | 0 | if ((!((jarFile()) == ((_o).jarFile())))) { |
480 | 0 | return false; |
481 | 0 | } |
482 | 0 | if ((!((jarEntry()) == ((_o).jarEntry())))) { |
483 | 0 | return false; |
484 | 0 | } |
485 | 0 | if ((!((charset()) == ((_o).charset())))) { |
486 | 0 | return false; |
487 | 0 | } |
488 | 0 | return true; |
489 | 0 | } |
490 | | |
491 | | auto JARURIParams::operator!=(const JARURIParams& _o) const -> bool |
492 | 0 | { |
493 | 0 | return (!(operator==(_o))); |
494 | 0 | } |
495 | | |
496 | | } // namespace ipc |
497 | | } // namespace mozilla |
498 | | |
499 | | namespace mozilla { |
500 | | namespace ipc { |
501 | | auto IPDLParamTraits<mozilla::ipc::JARURIParams>::Write( |
502 | | IPC::Message* aMsg, |
503 | | mozilla::ipc::IProtocol* aActor, |
504 | | const paramType& aVar) -> void |
505 | 0 | { |
506 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).jarFile()); |
507 | 0 | // Sentinel = 'jarFile' |
508 | 0 | (aMsg)->WriteSentinel(1572070078); |
509 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).jarEntry()); |
510 | 0 | // Sentinel = 'jarEntry' |
511 | 0 | (aMsg)->WriteSentinel(941016033); |
512 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).charset()); |
513 | 0 | // Sentinel = 'charset' |
514 | 0 | (aMsg)->WriteSentinel(1551550891); |
515 | 0 | } |
516 | | |
517 | | auto IPDLParamTraits<mozilla::ipc::JARURIParams>::Read( |
518 | | const IPC::Message* aMsg, |
519 | | PickleIterator* aIter, |
520 | | mozilla::ipc::IProtocol* aActor, |
521 | | paramType* aVar) -> bool |
522 | 0 | { |
523 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->jarFile())))))) { |
524 | 0 | (aActor)->FatalError("Error deserializing 'jarFile' (URIParams) member of 'JARURIParams'"); |
525 | 0 | return false; |
526 | 0 | } |
527 | 0 | // Sentinel = 'jarFile' |
528 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1572070078)))) { |
529 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'jarFile' (URIParams) member of 'JARURIParams'"); |
530 | 0 | return false; |
531 | 0 | } |
532 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->jarEntry())))))) { |
533 | 0 | (aActor)->FatalError("Error deserializing 'jarEntry' (URIParams) member of 'JARURIParams'"); |
534 | 0 | return false; |
535 | 0 | } |
536 | 0 | // Sentinel = 'jarEntry' |
537 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 941016033)))) { |
538 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'jarEntry' (URIParams) member of 'JARURIParams'"); |
539 | 0 | return false; |
540 | 0 | } |
541 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->charset())))))) { |
542 | 0 | (aActor)->FatalError("Error deserializing 'charset' (nsCString) member of 'JARURIParams'"); |
543 | 0 | return false; |
544 | 0 | } |
545 | 0 | // Sentinel = 'charset' |
546 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1551550891)))) { |
547 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'charset' (nsCString) member of 'JARURIParams'"); |
548 | 0 | return false; |
549 | 0 | } |
550 | 0 | return true; |
551 | 0 | } |
552 | | |
553 | | } // namespace ipc |
554 | | } // namespace mozilla |
555 | | |
556 | | //----------------------------------------------------------------------------- |
557 | | // Method definitions for the IPDL type |struct IconURIParams| |
558 | | // |
559 | | namespace mozilla { |
560 | | namespace ipc { |
561 | | auto IconURIParams::operator==(const IconURIParams& _o) const -> bool |
562 | 0 | { |
563 | 0 | if ((!((uri()) == ((_o).uri())))) { |
564 | 0 | return false; |
565 | 0 | } |
566 | 0 | if ((!((size()) == ((_o).size())))) { |
567 | 0 | return false; |
568 | 0 | } |
569 | 0 | if ((!((contentType()) == ((_o).contentType())))) { |
570 | 0 | return false; |
571 | 0 | } |
572 | 0 | if ((!((fileName()) == ((_o).fileName())))) { |
573 | 0 | return false; |
574 | 0 | } |
575 | 0 | if ((!((stockIcon()) == ((_o).stockIcon())))) { |
576 | 0 | return false; |
577 | 0 | } |
578 | 0 | if ((!((iconSize()) == ((_o).iconSize())))) { |
579 | 0 | return false; |
580 | 0 | } |
581 | 0 | if ((!((iconState()) == ((_o).iconState())))) { |
582 | 0 | return false; |
583 | 0 | } |
584 | 0 | return true; |
585 | 0 | } |
586 | | |
587 | | auto IconURIParams::operator!=(const IconURIParams& _o) const -> bool |
588 | 0 | { |
589 | 0 | return (!(operator==(_o))); |
590 | 0 | } |
591 | | |
592 | | } // namespace ipc |
593 | | } // namespace mozilla |
594 | | |
595 | | namespace mozilla { |
596 | | namespace ipc { |
597 | | auto IPDLParamTraits<mozilla::ipc::IconURIParams>::Write( |
598 | | IPC::Message* aMsg, |
599 | | mozilla::ipc::IProtocol* aActor, |
600 | | const paramType& aVar) -> void |
601 | 0 | { |
602 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).uri()); |
603 | 0 | // Sentinel = 'uri' |
604 | 0 | (aMsg)->WriteSentinel(1453210605); |
605 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).size()); |
606 | 0 | // Sentinel = 'size' |
607 | 0 | (aMsg)->WriteSentinel(931048223); |
608 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).contentType()); |
609 | 0 | // Sentinel = 'contentType' |
610 | 0 | (aMsg)->WriteSentinel(2092571716); |
611 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).fileName()); |
612 | 0 | // Sentinel = 'fileName' |
613 | 0 | (aMsg)->WriteSentinel(3833449039); |
614 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).stockIcon()); |
615 | 0 | // Sentinel = 'stockIcon' |
616 | 0 | (aMsg)->WriteSentinel(3601770784); |
617 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).iconSize()); |
618 | 0 | // Sentinel = 'iconSize' |
619 | 0 | (aMsg)->WriteSentinel(2585310920); |
620 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).iconState()); |
621 | 0 | // Sentinel = 'iconState' |
622 | 0 | (aMsg)->WriteSentinel(3444306207); |
623 | 0 | } |
624 | | |
625 | | auto IPDLParamTraits<mozilla::ipc::IconURIParams>::Read( |
626 | | const IPC::Message* aMsg, |
627 | | PickleIterator* aIter, |
628 | | mozilla::ipc::IProtocol* aActor, |
629 | | paramType* aVar) -> bool |
630 | 0 | { |
631 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->uri())))))) { |
632 | 0 | (aActor)->FatalError("Error deserializing 'uri' (OptionalURIParams) member of 'IconURIParams'"); |
633 | 0 | return false; |
634 | 0 | } |
635 | 0 | // Sentinel = 'uri' |
636 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1453210605)))) { |
637 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uri' (OptionalURIParams) member of 'IconURIParams'"); |
638 | 0 | return false; |
639 | 0 | } |
640 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->size())))))) { |
641 | 0 | (aActor)->FatalError("Error deserializing 'size' (uint32_t) member of 'IconURIParams'"); |
642 | 0 | return false; |
643 | 0 | } |
644 | 0 | // Sentinel = 'size' |
645 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 931048223)))) { |
646 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'size' (uint32_t) member of 'IconURIParams'"); |
647 | 0 | return false; |
648 | 0 | } |
649 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->contentType())))))) { |
650 | 0 | (aActor)->FatalError("Error deserializing 'contentType' (nsCString) member of 'IconURIParams'"); |
651 | 0 | return false; |
652 | 0 | } |
653 | 0 | // Sentinel = 'contentType' |
654 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2092571716)))) { |
655 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'contentType' (nsCString) member of 'IconURIParams'"); |
656 | 0 | return false; |
657 | 0 | } |
658 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->fileName())))))) { |
659 | 0 | (aActor)->FatalError("Error deserializing 'fileName' (nsCString) member of 'IconURIParams'"); |
660 | 0 | return false; |
661 | 0 | } |
662 | 0 | // Sentinel = 'fileName' |
663 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3833449039)))) { |
664 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'fileName' (nsCString) member of 'IconURIParams'"); |
665 | 0 | return false; |
666 | 0 | } |
667 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->stockIcon())))))) { |
668 | 0 | (aActor)->FatalError("Error deserializing 'stockIcon' (nsCString) member of 'IconURIParams'"); |
669 | 0 | return false; |
670 | 0 | } |
671 | 0 | // Sentinel = 'stockIcon' |
672 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3601770784)))) { |
673 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'stockIcon' (nsCString) member of 'IconURIParams'"); |
674 | 0 | return false; |
675 | 0 | } |
676 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->iconSize())))))) { |
677 | 0 | (aActor)->FatalError("Error deserializing 'iconSize' (int32_t) member of 'IconURIParams'"); |
678 | 0 | return false; |
679 | 0 | } |
680 | 0 | // Sentinel = 'iconSize' |
681 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2585310920)))) { |
682 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'iconSize' (int32_t) member of 'IconURIParams'"); |
683 | 0 | return false; |
684 | 0 | } |
685 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->iconState())))))) { |
686 | 0 | (aActor)->FatalError("Error deserializing 'iconState' (int32_t) member of 'IconURIParams'"); |
687 | 0 | return false; |
688 | 0 | } |
689 | 0 | // Sentinel = 'iconState' |
690 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3444306207)))) { |
691 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'iconState' (int32_t) member of 'IconURIParams'"); |
692 | 0 | return false; |
693 | 0 | } |
694 | 0 | return true; |
695 | 0 | } |
696 | | |
697 | | } // namespace ipc |
698 | | } // namespace mozilla |
699 | | |
700 | | //----------------------------------------------------------------------------- |
701 | | // Method definitions for the IPDL type |struct NullPrincipalURIParams| |
702 | | // |
703 | | namespace mozilla { |
704 | | namespace ipc { |
705 | | auto NullPrincipalURIParams::operator==(const NullPrincipalURIParams& _o) const -> bool |
706 | 0 | { |
707 | 0 | return true; |
708 | 0 | } |
709 | | |
710 | | auto NullPrincipalURIParams::operator!=(const NullPrincipalURIParams& _o) const -> bool |
711 | 0 | { |
712 | 0 | return (!(operator==(_o))); |
713 | 0 | } |
714 | | |
715 | | } // namespace ipc |
716 | | } // namespace mozilla |
717 | | |
718 | | namespace mozilla { |
719 | | namespace ipc { |
720 | | auto IPDLParamTraits<mozilla::ipc::NullPrincipalURIParams>::Write( |
721 | | IPC::Message* aMsg, |
722 | | mozilla::ipc::IProtocol* aActor, |
723 | | const paramType& aVar) -> void |
724 | 0 | { |
725 | 0 | } |
726 | | |
727 | | auto IPDLParamTraits<mozilla::ipc::NullPrincipalURIParams>::Read( |
728 | | const IPC::Message* aMsg, |
729 | | PickleIterator* aIter, |
730 | | mozilla::ipc::IProtocol* aActor, |
731 | | paramType* aVar) -> bool |
732 | 0 | { |
733 | 0 | return true; |
734 | 0 | } |
735 | | |
736 | | } // namespace ipc |
737 | | } // namespace mozilla |
738 | | |
739 | | //----------------------------------------------------------------------------- |
740 | | // Method definitions for the IPDL type |struct HostObjectURIParams| |
741 | | // |
742 | | namespace mozilla { |
743 | | namespace ipc { |
744 | | auto HostObjectURIParams::operator==(const HostObjectURIParams& _o) const -> bool |
745 | 0 | { |
746 | 0 | if ((!((simpleParams()) == ((_o).simpleParams())))) { |
747 | 0 | return false; |
748 | 0 | } |
749 | 0 | if ((!((revoked()) == ((_o).revoked())))) { |
750 | 0 | return false; |
751 | 0 | } |
752 | 0 | return true; |
753 | 0 | } |
754 | | |
755 | | auto HostObjectURIParams::operator!=(const HostObjectURIParams& _o) const -> bool |
756 | 0 | { |
757 | 0 | return (!(operator==(_o))); |
758 | 0 | } |
759 | | |
760 | | } // namespace ipc |
761 | | } // namespace mozilla |
762 | | |
763 | | namespace mozilla { |
764 | | namespace ipc { |
765 | | auto IPDLParamTraits<mozilla::ipc::HostObjectURIParams>::Write( |
766 | | IPC::Message* aMsg, |
767 | | mozilla::ipc::IProtocol* aActor, |
768 | | const paramType& aVar) -> void |
769 | 0 | { |
770 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).simpleParams()); |
771 | 0 | // Sentinel = 'simpleParams' |
772 | 0 | (aMsg)->WriteSentinel(3404291700); |
773 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).revoked()); |
774 | 0 | // Sentinel = 'revoked' |
775 | 0 | (aMsg)->WriteSentinel(2893307109); |
776 | 0 | } |
777 | | |
778 | | auto IPDLParamTraits<mozilla::ipc::HostObjectURIParams>::Read( |
779 | | const IPC::Message* aMsg, |
780 | | PickleIterator* aIter, |
781 | | mozilla::ipc::IProtocol* aActor, |
782 | | paramType* aVar) -> bool |
783 | 0 | { |
784 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->simpleParams())))))) { |
785 | 0 | (aActor)->FatalError("Error deserializing 'simpleParams' (SimpleURIParams) member of 'HostObjectURIParams'"); |
786 | 0 | return false; |
787 | 0 | } |
788 | 0 | // Sentinel = 'simpleParams' |
789 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3404291700)))) { |
790 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'simpleParams' (SimpleURIParams) member of 'HostObjectURIParams'"); |
791 | 0 | return false; |
792 | 0 | } |
793 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->revoked())))))) { |
794 | 0 | (aActor)->FatalError("Error deserializing 'revoked' (bool) member of 'HostObjectURIParams'"); |
795 | 0 | return false; |
796 | 0 | } |
797 | 0 | // Sentinel = 'revoked' |
798 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2893307109)))) { |
799 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'revoked' (bool) member of 'HostObjectURIParams'"); |
800 | 0 | return false; |
801 | 0 | } |
802 | 0 | return true; |
803 | 0 | } |
804 | | |
805 | | } // namespace ipc |
806 | | } // namespace mozilla |
807 | | |
808 | | //----------------------------------------------------------------------------- |
809 | | // Method definitions for the IPDL type |union URIParams| |
810 | | // |
811 | | namespace mozilla { |
812 | | namespace ipc { |
813 | | auto URIParams::MaybeDestroy(Type aNewType) -> bool |
814 | 0 | { |
815 | 0 | if ((mType) == (T__None)) { |
816 | 0 | return true; |
817 | 0 | } |
818 | 0 | if ((mType) == (aNewType)) { |
819 | 0 | return false; |
820 | 0 | } |
821 | 0 | switch (mType) { |
822 | 0 | case TSimpleURIParams: |
823 | 0 | { |
824 | 0 | (ptr_SimpleURIParams())->~SimpleURIParams__tdef(); |
825 | 0 | break; |
826 | 0 | } |
827 | 0 | case TStandardURLParams: |
828 | 0 | { |
829 | 0 | (ptr_StandardURLParams())->~StandardURLParams__tdef(); |
830 | 0 | break; |
831 | 0 | } |
832 | 0 | case TJARURIParams: |
833 | 0 | { |
834 | 0 | delete ptr_JARURIParams(); |
835 | 0 | break; |
836 | 0 | } |
837 | 0 | case TIconURIParams: |
838 | 0 | { |
839 | 0 | delete ptr_IconURIParams(); |
840 | 0 | break; |
841 | 0 | } |
842 | 0 | case TNullPrincipalURIParams: |
843 | 0 | { |
844 | 0 | (ptr_NullPrincipalURIParams())->~NullPrincipalURIParams__tdef(); |
845 | 0 | break; |
846 | 0 | } |
847 | 0 | case TJSURIParams: |
848 | 0 | { |
849 | 0 | delete ptr_JSURIParams(); |
850 | 0 | break; |
851 | 0 | } |
852 | 0 | case TSimpleNestedURIParams: |
853 | 0 | { |
854 | 0 | delete ptr_SimpleNestedURIParams(); |
855 | 0 | break; |
856 | 0 | } |
857 | 0 | case THostObjectURIParams: |
858 | 0 | { |
859 | 0 | (ptr_HostObjectURIParams())->~HostObjectURIParams__tdef(); |
860 | 0 | break; |
861 | 0 | } |
862 | 0 | default: |
863 | 0 | { |
864 | 0 | mozilla::ipc::LogicError("not reached"); |
865 | 0 | break; |
866 | 0 | } |
867 | 0 | } |
868 | 0 | return true; |
869 | 0 | } |
870 | | |
871 | | MOZ_IMPLICIT URIParams::URIParams(const SimpleURIParams& aOther) |
872 | 0 | { |
873 | 0 | new (mozilla::KnownNotNull, ptr_SimpleURIParams()) SimpleURIParams(aOther); |
874 | 0 | mType = TSimpleURIParams; |
875 | 0 | } |
876 | | |
877 | | MOZ_IMPLICIT URIParams::URIParams(SimpleURIParams&& aOther) |
878 | 0 | { |
879 | 0 | new (mozilla::KnownNotNull, ptr_SimpleURIParams()) SimpleURIParams(std::move(aOther)); |
880 | 0 | mType = TSimpleURIParams; |
881 | 0 | } |
882 | | |
883 | | MOZ_IMPLICIT URIParams::URIParams(const StandardURLParams& aOther) |
884 | 0 | { |
885 | 0 | new (mozilla::KnownNotNull, ptr_StandardURLParams()) StandardURLParams(aOther); |
886 | 0 | mType = TStandardURLParams; |
887 | 0 | } |
888 | | |
889 | | MOZ_IMPLICIT URIParams::URIParams(StandardURLParams&& aOther) |
890 | 0 | { |
891 | 0 | new (mozilla::KnownNotNull, ptr_StandardURLParams()) StandardURLParams(std::move(aOther)); |
892 | 0 | mType = TStandardURLParams; |
893 | 0 | } |
894 | | |
895 | | MOZ_IMPLICIT URIParams::URIParams(const JARURIParams& aOther) |
896 | 0 | { |
897 | 0 | ptr_JARURIParams() = new JARURIParams(aOther); |
898 | 0 | mType = TJARURIParams; |
899 | 0 | } |
900 | | |
901 | | MOZ_IMPLICIT URIParams::URIParams(JARURIParams&& aOther) |
902 | 0 | { |
903 | 0 | ptr_JARURIParams() = new JARURIParams(std::move(aOther)); |
904 | 0 | mType = TJARURIParams; |
905 | 0 | } |
906 | | |
907 | | MOZ_IMPLICIT URIParams::URIParams(const IconURIParams& aOther) |
908 | 0 | { |
909 | 0 | ptr_IconURIParams() = new IconURIParams(aOther); |
910 | 0 | mType = TIconURIParams; |
911 | 0 | } |
912 | | |
913 | | MOZ_IMPLICIT URIParams::URIParams(IconURIParams&& aOther) |
914 | 0 | { |
915 | 0 | ptr_IconURIParams() = new IconURIParams(std::move(aOther)); |
916 | 0 | mType = TIconURIParams; |
917 | 0 | } |
918 | | |
919 | | MOZ_IMPLICIT URIParams::URIParams(const NullPrincipalURIParams& aOther) |
920 | 0 | { |
921 | 0 | new (mozilla::KnownNotNull, ptr_NullPrincipalURIParams()) NullPrincipalURIParams(aOther); |
922 | 0 | mType = TNullPrincipalURIParams; |
923 | 0 | } |
924 | | |
925 | | MOZ_IMPLICIT URIParams::URIParams(NullPrincipalURIParams&& aOther) |
926 | 0 | { |
927 | 0 | new (mozilla::KnownNotNull, ptr_NullPrincipalURIParams()) NullPrincipalURIParams(std::move(aOther)); |
928 | 0 | mType = TNullPrincipalURIParams; |
929 | 0 | } |
930 | | |
931 | | MOZ_IMPLICIT URIParams::URIParams(const JSURIParams& aOther) |
932 | 0 | { |
933 | 0 | ptr_JSURIParams() = new JSURIParams(aOther); |
934 | 0 | mType = TJSURIParams; |
935 | 0 | } |
936 | | |
937 | | MOZ_IMPLICIT URIParams::URIParams(JSURIParams&& aOther) |
938 | 0 | { |
939 | 0 | ptr_JSURIParams() = new JSURIParams(std::move(aOther)); |
940 | 0 | mType = TJSURIParams; |
941 | 0 | } |
942 | | |
943 | | MOZ_IMPLICIT URIParams::URIParams(const SimpleNestedURIParams& aOther) |
944 | 0 | { |
945 | 0 | ptr_SimpleNestedURIParams() = new SimpleNestedURIParams(aOther); |
946 | 0 | mType = TSimpleNestedURIParams; |
947 | 0 | } |
948 | | |
949 | | MOZ_IMPLICIT URIParams::URIParams(SimpleNestedURIParams&& aOther) |
950 | 0 | { |
951 | 0 | ptr_SimpleNestedURIParams() = new SimpleNestedURIParams(std::move(aOther)); |
952 | 0 | mType = TSimpleNestedURIParams; |
953 | 0 | } |
954 | | |
955 | | MOZ_IMPLICIT URIParams::URIParams(const HostObjectURIParams& aOther) |
956 | 0 | { |
957 | 0 | new (mozilla::KnownNotNull, ptr_HostObjectURIParams()) HostObjectURIParams(aOther); |
958 | 0 | mType = THostObjectURIParams; |
959 | 0 | } |
960 | | |
961 | | MOZ_IMPLICIT URIParams::URIParams(HostObjectURIParams&& aOther) |
962 | 0 | { |
963 | 0 | new (mozilla::KnownNotNull, ptr_HostObjectURIParams()) HostObjectURIParams(std::move(aOther)); |
964 | 0 | mType = THostObjectURIParams; |
965 | 0 | } |
966 | | |
967 | | MOZ_IMPLICIT URIParams::URIParams(const URIParams& aOther) |
968 | 0 | { |
969 | 0 | (aOther).AssertSanity(); |
970 | 0 | switch ((aOther).type()) { |
971 | 0 | case TSimpleURIParams: |
972 | 0 | { |
973 | 0 | new (mozilla::KnownNotNull, ptr_SimpleURIParams()) SimpleURIParams((aOther).get_SimpleURIParams()); |
974 | 0 | break; |
975 | 0 | } |
976 | 0 | case TStandardURLParams: |
977 | 0 | { |
978 | 0 | new (mozilla::KnownNotNull, ptr_StandardURLParams()) StandardURLParams((aOther).get_StandardURLParams()); |
979 | 0 | break; |
980 | 0 | } |
981 | 0 | case TJARURIParams: |
982 | 0 | { |
983 | 0 | ptr_JARURIParams() = new JARURIParams((aOther).get_JARURIParams()); |
984 | 0 | break; |
985 | 0 | } |
986 | 0 | case TIconURIParams: |
987 | 0 | { |
988 | 0 | ptr_IconURIParams() = new IconURIParams((aOther).get_IconURIParams()); |
989 | 0 | break; |
990 | 0 | } |
991 | 0 | case TNullPrincipalURIParams: |
992 | 0 | { |
993 | 0 | new (mozilla::KnownNotNull, ptr_NullPrincipalURIParams()) NullPrincipalURIParams((aOther).get_NullPrincipalURIParams()); |
994 | 0 | break; |
995 | 0 | } |
996 | 0 | case TJSURIParams: |
997 | 0 | { |
998 | 0 | ptr_JSURIParams() = new JSURIParams((aOther).get_JSURIParams()); |
999 | 0 | break; |
1000 | 0 | } |
1001 | 0 | case TSimpleNestedURIParams: |
1002 | 0 | { |
1003 | 0 | ptr_SimpleNestedURIParams() = new SimpleNestedURIParams((aOther).get_SimpleNestedURIParams()); |
1004 | 0 | break; |
1005 | 0 | } |
1006 | 0 | case THostObjectURIParams: |
1007 | 0 | { |
1008 | 0 | new (mozilla::KnownNotNull, ptr_HostObjectURIParams()) HostObjectURIParams((aOther).get_HostObjectURIParams()); |
1009 | 0 | break; |
1010 | 0 | } |
1011 | 0 | case T__None: |
1012 | 0 | { |
1013 | 0 | break; |
1014 | 0 | } |
1015 | 0 | default: |
1016 | 0 | { |
1017 | 0 | mozilla::ipc::LogicError("unreached"); |
1018 | 0 | return; |
1019 | 0 | } |
1020 | 0 | } |
1021 | 0 | mType = (aOther).type(); |
1022 | 0 | } |
1023 | | |
1024 | | MOZ_IMPLICIT URIParams::URIParams(URIParams&& aOther) |
1025 | 0 | { |
1026 | 0 | (aOther).AssertSanity(); |
1027 | 0 | Type t = (aOther).type(); |
1028 | 0 | switch (t) { |
1029 | 0 | case TSimpleURIParams: |
1030 | 0 | { |
1031 | 0 | new (mozilla::KnownNotNull, ptr_SimpleURIParams()) SimpleURIParams(std::move((aOther).get_SimpleURIParams())); |
1032 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
1033 | 0 | break; |
1034 | 0 | } |
1035 | 0 | case TStandardURLParams: |
1036 | 0 | { |
1037 | 0 | new (mozilla::KnownNotNull, ptr_StandardURLParams()) StandardURLParams(std::move((aOther).get_StandardURLParams())); |
1038 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
1039 | 0 | break; |
1040 | 0 | } |
1041 | 0 | case TJARURIParams: |
1042 | 0 | { |
1043 | 0 | ptr_JARURIParams() = (aOther).ptr_JARURIParams(); |
1044 | 0 | break; |
1045 | 0 | } |
1046 | 0 | case TIconURIParams: |
1047 | 0 | { |
1048 | 0 | ptr_IconURIParams() = (aOther).ptr_IconURIParams(); |
1049 | 0 | break; |
1050 | 0 | } |
1051 | 0 | case TNullPrincipalURIParams: |
1052 | 0 | { |
1053 | 0 | new (mozilla::KnownNotNull, ptr_NullPrincipalURIParams()) NullPrincipalURIParams(std::move((aOther).get_NullPrincipalURIParams())); |
1054 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
1055 | 0 | break; |
1056 | 0 | } |
1057 | 0 | case TJSURIParams: |
1058 | 0 | { |
1059 | 0 | ptr_JSURIParams() = (aOther).ptr_JSURIParams(); |
1060 | 0 | break; |
1061 | 0 | } |
1062 | 0 | case TSimpleNestedURIParams: |
1063 | 0 | { |
1064 | 0 | ptr_SimpleNestedURIParams() = (aOther).ptr_SimpleNestedURIParams(); |
1065 | 0 | break; |
1066 | 0 | } |
1067 | 0 | case THostObjectURIParams: |
1068 | 0 | { |
1069 | 0 | new (mozilla::KnownNotNull, ptr_HostObjectURIParams()) HostObjectURIParams(std::move((aOther).get_HostObjectURIParams())); |
1070 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
1071 | 0 | break; |
1072 | 0 | } |
1073 | 0 | case T__None: |
1074 | 0 | { |
1075 | 0 | break; |
1076 | 0 | } |
1077 | 0 | default: |
1078 | 0 | { |
1079 | 0 | mozilla::ipc::LogicError("unreached"); |
1080 | 0 | return; |
1081 | 0 | } |
1082 | 0 | } |
1083 | 0 | (aOther).mType = T__None; |
1084 | 0 | mType = t; |
1085 | 0 | } |
1086 | | |
1087 | | URIParams::~URIParams() |
1088 | 0 | { |
1089 | 0 | static_cast<void>(MaybeDestroy(T__None)); |
1090 | 0 | } |
1091 | | |
1092 | | auto URIParams::operator=(const SimpleURIParams& aRhs) -> URIParams& |
1093 | 0 | { |
1094 | 0 | if (MaybeDestroy(TSimpleURIParams)) { |
1095 | 0 | new (mozilla::KnownNotNull, ptr_SimpleURIParams()) SimpleURIParams; |
1096 | 0 | } |
1097 | 0 | (*(ptr_SimpleURIParams())) = aRhs; |
1098 | 0 | mType = TSimpleURIParams; |
1099 | 0 | return (*(this)); |
1100 | 0 | } |
1101 | | |
1102 | | auto URIParams::operator=(SimpleURIParams&& aRhs) -> URIParams& |
1103 | 0 | { |
1104 | 0 | if (MaybeDestroy(TSimpleURIParams)) { |
1105 | 0 | new (mozilla::KnownNotNull, ptr_SimpleURIParams()) SimpleURIParams; |
1106 | 0 | } |
1107 | 0 | (*(ptr_SimpleURIParams())) = std::move(aRhs); |
1108 | 0 | mType = TSimpleURIParams; |
1109 | 0 | return (*(this)); |
1110 | 0 | } |
1111 | | |
1112 | | auto URIParams::operator=(const StandardURLParams& aRhs) -> URIParams& |
1113 | 0 | { |
1114 | 0 | if (MaybeDestroy(TStandardURLParams)) { |
1115 | 0 | new (mozilla::KnownNotNull, ptr_StandardURLParams()) StandardURLParams; |
1116 | 0 | } |
1117 | 0 | (*(ptr_StandardURLParams())) = aRhs; |
1118 | 0 | mType = TStandardURLParams; |
1119 | 0 | return (*(this)); |
1120 | 0 | } |
1121 | | |
1122 | | auto URIParams::operator=(StandardURLParams&& aRhs) -> URIParams& |
1123 | 0 | { |
1124 | 0 | if (MaybeDestroy(TStandardURLParams)) { |
1125 | 0 | new (mozilla::KnownNotNull, ptr_StandardURLParams()) StandardURLParams; |
1126 | 0 | } |
1127 | 0 | (*(ptr_StandardURLParams())) = std::move(aRhs); |
1128 | 0 | mType = TStandardURLParams; |
1129 | 0 | return (*(this)); |
1130 | 0 | } |
1131 | | |
1132 | | auto URIParams::operator=(const JARURIParams& aRhs) -> URIParams& |
1133 | 0 | { |
1134 | 0 | if (MaybeDestroy(TJARURIParams)) { |
1135 | 0 | ptr_JARURIParams() = new JARURIParams; |
1136 | 0 | } |
1137 | 0 | (*(ptr_JARURIParams())) = aRhs; |
1138 | 0 | mType = TJARURIParams; |
1139 | 0 | return (*(this)); |
1140 | 0 | } |
1141 | | |
1142 | | auto URIParams::operator=(JARURIParams&& aRhs) -> URIParams& |
1143 | 0 | { |
1144 | 0 | if (MaybeDestroy(TJARURIParams)) { |
1145 | 0 | ptr_JARURIParams() = new JARURIParams; |
1146 | 0 | } |
1147 | 0 | (*(ptr_JARURIParams())) = std::move(aRhs); |
1148 | 0 | mType = TJARURIParams; |
1149 | 0 | return (*(this)); |
1150 | 0 | } |
1151 | | |
1152 | | auto URIParams::operator=(const IconURIParams& aRhs) -> URIParams& |
1153 | 0 | { |
1154 | 0 | if (MaybeDestroy(TIconURIParams)) { |
1155 | 0 | ptr_IconURIParams() = new IconURIParams; |
1156 | 0 | } |
1157 | 0 | (*(ptr_IconURIParams())) = aRhs; |
1158 | 0 | mType = TIconURIParams; |
1159 | 0 | return (*(this)); |
1160 | 0 | } |
1161 | | |
1162 | | auto URIParams::operator=(IconURIParams&& aRhs) -> URIParams& |
1163 | 0 | { |
1164 | 0 | if (MaybeDestroy(TIconURIParams)) { |
1165 | 0 | ptr_IconURIParams() = new IconURIParams; |
1166 | 0 | } |
1167 | 0 | (*(ptr_IconURIParams())) = std::move(aRhs); |
1168 | 0 | mType = TIconURIParams; |
1169 | 0 | return (*(this)); |
1170 | 0 | } |
1171 | | |
1172 | | auto URIParams::operator=(const NullPrincipalURIParams& aRhs) -> URIParams& |
1173 | 0 | { |
1174 | 0 | if (MaybeDestroy(TNullPrincipalURIParams)) { |
1175 | 0 | new (mozilla::KnownNotNull, ptr_NullPrincipalURIParams()) NullPrincipalURIParams; |
1176 | 0 | } |
1177 | 0 | (*(ptr_NullPrincipalURIParams())) = aRhs; |
1178 | 0 | mType = TNullPrincipalURIParams; |
1179 | 0 | return (*(this)); |
1180 | 0 | } |
1181 | | |
1182 | | auto URIParams::operator=(NullPrincipalURIParams&& aRhs) -> URIParams& |
1183 | 0 | { |
1184 | 0 | if (MaybeDestroy(TNullPrincipalURIParams)) { |
1185 | 0 | new (mozilla::KnownNotNull, ptr_NullPrincipalURIParams()) NullPrincipalURIParams; |
1186 | 0 | } |
1187 | 0 | (*(ptr_NullPrincipalURIParams())) = std::move(aRhs); |
1188 | 0 | mType = TNullPrincipalURIParams; |
1189 | 0 | return (*(this)); |
1190 | 0 | } |
1191 | | |
1192 | | auto URIParams::operator=(const JSURIParams& aRhs) -> URIParams& |
1193 | 0 | { |
1194 | 0 | if (MaybeDestroy(TJSURIParams)) { |
1195 | 0 | ptr_JSURIParams() = new JSURIParams; |
1196 | 0 | } |
1197 | 0 | (*(ptr_JSURIParams())) = aRhs; |
1198 | 0 | mType = TJSURIParams; |
1199 | 0 | return (*(this)); |
1200 | 0 | } |
1201 | | |
1202 | | auto URIParams::operator=(JSURIParams&& aRhs) -> URIParams& |
1203 | 0 | { |
1204 | 0 | if (MaybeDestroy(TJSURIParams)) { |
1205 | 0 | ptr_JSURIParams() = new JSURIParams; |
1206 | 0 | } |
1207 | 0 | (*(ptr_JSURIParams())) = std::move(aRhs); |
1208 | 0 | mType = TJSURIParams; |
1209 | 0 | return (*(this)); |
1210 | 0 | } |
1211 | | |
1212 | | auto URIParams::operator=(const SimpleNestedURIParams& aRhs) -> URIParams& |
1213 | 0 | { |
1214 | 0 | if (MaybeDestroy(TSimpleNestedURIParams)) { |
1215 | 0 | ptr_SimpleNestedURIParams() = new SimpleNestedURIParams; |
1216 | 0 | } |
1217 | 0 | (*(ptr_SimpleNestedURIParams())) = aRhs; |
1218 | 0 | mType = TSimpleNestedURIParams; |
1219 | 0 | return (*(this)); |
1220 | 0 | } |
1221 | | |
1222 | | auto URIParams::operator=(SimpleNestedURIParams&& aRhs) -> URIParams& |
1223 | 0 | { |
1224 | 0 | if (MaybeDestroy(TSimpleNestedURIParams)) { |
1225 | 0 | ptr_SimpleNestedURIParams() = new SimpleNestedURIParams; |
1226 | 0 | } |
1227 | 0 | (*(ptr_SimpleNestedURIParams())) = std::move(aRhs); |
1228 | 0 | mType = TSimpleNestedURIParams; |
1229 | 0 | return (*(this)); |
1230 | 0 | } |
1231 | | |
1232 | | auto URIParams::operator=(const HostObjectURIParams& aRhs) -> URIParams& |
1233 | 0 | { |
1234 | 0 | if (MaybeDestroy(THostObjectURIParams)) { |
1235 | 0 | new (mozilla::KnownNotNull, ptr_HostObjectURIParams()) HostObjectURIParams; |
1236 | 0 | } |
1237 | 0 | (*(ptr_HostObjectURIParams())) = aRhs; |
1238 | 0 | mType = THostObjectURIParams; |
1239 | 0 | return (*(this)); |
1240 | 0 | } |
1241 | | |
1242 | | auto URIParams::operator=(HostObjectURIParams&& aRhs) -> URIParams& |
1243 | 0 | { |
1244 | 0 | if (MaybeDestroy(THostObjectURIParams)) { |
1245 | 0 | new (mozilla::KnownNotNull, ptr_HostObjectURIParams()) HostObjectURIParams; |
1246 | 0 | } |
1247 | 0 | (*(ptr_HostObjectURIParams())) = std::move(aRhs); |
1248 | 0 | mType = THostObjectURIParams; |
1249 | 0 | return (*(this)); |
1250 | 0 | } |
1251 | | |
1252 | | auto URIParams::operator=(const URIParams& aRhs) -> URIParams& |
1253 | 0 | { |
1254 | 0 | (aRhs).AssertSanity(); |
1255 | 0 | Type t = (aRhs).type(); |
1256 | 0 | switch (t) { |
1257 | 0 | case TSimpleURIParams: |
1258 | 0 | { |
1259 | 0 | if (MaybeDestroy(t)) { |
1260 | 0 | new (mozilla::KnownNotNull, ptr_SimpleURIParams()) SimpleURIParams; |
1261 | 0 | } |
1262 | 0 | (*(ptr_SimpleURIParams())) = (aRhs).get_SimpleURIParams(); |
1263 | 0 | break; |
1264 | 0 | } |
1265 | 0 | case TStandardURLParams: |
1266 | 0 | { |
1267 | 0 | if (MaybeDestroy(t)) { |
1268 | 0 | new (mozilla::KnownNotNull, ptr_StandardURLParams()) StandardURLParams; |
1269 | 0 | } |
1270 | 0 | (*(ptr_StandardURLParams())) = (aRhs).get_StandardURLParams(); |
1271 | 0 | break; |
1272 | 0 | } |
1273 | 0 | case TJARURIParams: |
1274 | 0 | { |
1275 | 0 | if (MaybeDestroy(t)) { |
1276 | 0 | ptr_JARURIParams() = new JARURIParams; |
1277 | 0 | } |
1278 | 0 | (*(ptr_JARURIParams())) = (aRhs).get_JARURIParams(); |
1279 | 0 | break; |
1280 | 0 | } |
1281 | 0 | case TIconURIParams: |
1282 | 0 | { |
1283 | 0 | if (MaybeDestroy(t)) { |
1284 | 0 | ptr_IconURIParams() = new IconURIParams; |
1285 | 0 | } |
1286 | 0 | (*(ptr_IconURIParams())) = (aRhs).get_IconURIParams(); |
1287 | 0 | break; |
1288 | 0 | } |
1289 | 0 | case TNullPrincipalURIParams: |
1290 | 0 | { |
1291 | 0 | if (MaybeDestroy(t)) { |
1292 | 0 | new (mozilla::KnownNotNull, ptr_NullPrincipalURIParams()) NullPrincipalURIParams; |
1293 | 0 | } |
1294 | 0 | (*(ptr_NullPrincipalURIParams())) = (aRhs).get_NullPrincipalURIParams(); |
1295 | 0 | break; |
1296 | 0 | } |
1297 | 0 | case TJSURIParams: |
1298 | 0 | { |
1299 | 0 | if (MaybeDestroy(t)) { |
1300 | 0 | ptr_JSURIParams() = new JSURIParams; |
1301 | 0 | } |
1302 | 0 | (*(ptr_JSURIParams())) = (aRhs).get_JSURIParams(); |
1303 | 0 | break; |
1304 | 0 | } |
1305 | 0 | case TSimpleNestedURIParams: |
1306 | 0 | { |
1307 | 0 | if (MaybeDestroy(t)) { |
1308 | 0 | ptr_SimpleNestedURIParams() = new SimpleNestedURIParams; |
1309 | 0 | } |
1310 | 0 | (*(ptr_SimpleNestedURIParams())) = (aRhs).get_SimpleNestedURIParams(); |
1311 | 0 | break; |
1312 | 0 | } |
1313 | 0 | case THostObjectURIParams: |
1314 | 0 | { |
1315 | 0 | if (MaybeDestroy(t)) { |
1316 | 0 | new (mozilla::KnownNotNull, ptr_HostObjectURIParams()) HostObjectURIParams; |
1317 | 0 | } |
1318 | 0 | (*(ptr_HostObjectURIParams())) = (aRhs).get_HostObjectURIParams(); |
1319 | 0 | break; |
1320 | 0 | } |
1321 | 0 | case T__None: |
1322 | 0 | { |
1323 | 0 | static_cast<void>(MaybeDestroy(t)); |
1324 | 0 | break; |
1325 | 0 | } |
1326 | 0 | default: |
1327 | 0 | { |
1328 | 0 | mozilla::ipc::LogicError("unreached"); |
1329 | 0 | break; |
1330 | 0 | } |
1331 | 0 | } |
1332 | 0 | mType = t; |
1333 | 0 | return (*(this)); |
1334 | 0 | } |
1335 | | |
1336 | | auto URIParams::operator=(URIParams&& aRhs) -> URIParams& |
1337 | 0 | { |
1338 | 0 | (aRhs).AssertSanity(); |
1339 | 0 | Type t = (aRhs).type(); |
1340 | 0 | switch (t) { |
1341 | 0 | case TSimpleURIParams: |
1342 | 0 | { |
1343 | 0 | if (MaybeDestroy(t)) { |
1344 | 0 | new (mozilla::KnownNotNull, ptr_SimpleURIParams()) SimpleURIParams; |
1345 | 0 | } |
1346 | 0 | (*(ptr_SimpleURIParams())) = std::move((aRhs).get_SimpleURIParams()); |
1347 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
1348 | 0 | break; |
1349 | 0 | } |
1350 | 0 | case TStandardURLParams: |
1351 | 0 | { |
1352 | 0 | if (MaybeDestroy(t)) { |
1353 | 0 | new (mozilla::KnownNotNull, ptr_StandardURLParams()) StandardURLParams; |
1354 | 0 | } |
1355 | 0 | (*(ptr_StandardURLParams())) = std::move((aRhs).get_StandardURLParams()); |
1356 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
1357 | 0 | break; |
1358 | 0 | } |
1359 | 0 | case TJARURIParams: |
1360 | 0 | { |
1361 | 0 | static_cast<void>(MaybeDestroy(T__None)); |
1362 | 0 | ptr_JARURIParams() = (aRhs).ptr_JARURIParams(); |
1363 | 0 | break; |
1364 | 0 | } |
1365 | 0 | case TIconURIParams: |
1366 | 0 | { |
1367 | 0 | static_cast<void>(MaybeDestroy(T__None)); |
1368 | 0 | ptr_IconURIParams() = (aRhs).ptr_IconURIParams(); |
1369 | 0 | break; |
1370 | 0 | } |
1371 | 0 | case TNullPrincipalURIParams: |
1372 | 0 | { |
1373 | 0 | if (MaybeDestroy(t)) { |
1374 | 0 | new (mozilla::KnownNotNull, ptr_NullPrincipalURIParams()) NullPrincipalURIParams; |
1375 | 0 | } |
1376 | 0 | (*(ptr_NullPrincipalURIParams())) = std::move((aRhs).get_NullPrincipalURIParams()); |
1377 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
1378 | 0 | break; |
1379 | 0 | } |
1380 | 0 | case TJSURIParams: |
1381 | 0 | { |
1382 | 0 | static_cast<void>(MaybeDestroy(T__None)); |
1383 | 0 | ptr_JSURIParams() = (aRhs).ptr_JSURIParams(); |
1384 | 0 | break; |
1385 | 0 | } |
1386 | 0 | case TSimpleNestedURIParams: |
1387 | 0 | { |
1388 | 0 | static_cast<void>(MaybeDestroy(T__None)); |
1389 | 0 | ptr_SimpleNestedURIParams() = (aRhs).ptr_SimpleNestedURIParams(); |
1390 | 0 | break; |
1391 | 0 | } |
1392 | 0 | case THostObjectURIParams: |
1393 | 0 | { |
1394 | 0 | if (MaybeDestroy(t)) { |
1395 | 0 | new (mozilla::KnownNotNull, ptr_HostObjectURIParams()) HostObjectURIParams; |
1396 | 0 | } |
1397 | 0 | (*(ptr_HostObjectURIParams())) = std::move((aRhs).get_HostObjectURIParams()); |
1398 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
1399 | 0 | break; |
1400 | 0 | } |
1401 | 0 | case T__None: |
1402 | 0 | { |
1403 | 0 | static_cast<void>(MaybeDestroy(t)); |
1404 | 0 | break; |
1405 | 0 | } |
1406 | 0 | default: |
1407 | 0 | { |
1408 | 0 | mozilla::ipc::LogicError("unreached"); |
1409 | 0 | break; |
1410 | 0 | } |
1411 | 0 | } |
1412 | 0 | (aRhs).mType = T__None; |
1413 | 0 | mType = t; |
1414 | 0 | return (*(this)); |
1415 | 0 | } |
1416 | | |
1417 | | auto URIParams::operator==(const SimpleURIParams& aRhs) const -> bool |
1418 | 0 | { |
1419 | 0 | return (get_SimpleURIParams()) == (aRhs); |
1420 | 0 | } |
1421 | | |
1422 | | auto URIParams::operator==(const StandardURLParams& aRhs) const -> bool |
1423 | 0 | { |
1424 | 0 | return (get_StandardURLParams()) == (aRhs); |
1425 | 0 | } |
1426 | | |
1427 | | auto URIParams::operator==(const JARURIParams& aRhs) const -> bool |
1428 | 0 | { |
1429 | 0 | return (get_JARURIParams()) == (aRhs); |
1430 | 0 | } |
1431 | | |
1432 | | auto URIParams::operator==(const IconURIParams& aRhs) const -> bool |
1433 | 0 | { |
1434 | 0 | return (get_IconURIParams()) == (aRhs); |
1435 | 0 | } |
1436 | | |
1437 | | auto URIParams::operator==(const NullPrincipalURIParams& aRhs) const -> bool |
1438 | 0 | { |
1439 | 0 | return (get_NullPrincipalURIParams()) == (aRhs); |
1440 | 0 | } |
1441 | | |
1442 | | auto URIParams::operator==(const JSURIParams& aRhs) const -> bool |
1443 | 0 | { |
1444 | 0 | return (get_JSURIParams()) == (aRhs); |
1445 | 0 | } |
1446 | | |
1447 | | auto URIParams::operator==(const SimpleNestedURIParams& aRhs) const -> bool |
1448 | 0 | { |
1449 | 0 | return (get_SimpleNestedURIParams()) == (aRhs); |
1450 | 0 | } |
1451 | | |
1452 | | auto URIParams::operator==(const HostObjectURIParams& aRhs) const -> bool |
1453 | 0 | { |
1454 | 0 | return (get_HostObjectURIParams()) == (aRhs); |
1455 | 0 | } |
1456 | | |
1457 | | auto URIParams::operator==(const URIParams& aRhs) const -> bool |
1458 | 0 | { |
1459 | 0 | if ((type()) != ((aRhs).type())) { |
1460 | 0 | return false; |
1461 | 0 | } |
1462 | 0 | |
1463 | 0 | switch (type()) { |
1464 | 0 | case TSimpleURIParams: |
1465 | 0 | { |
1466 | 0 | return (get_SimpleURIParams()) == ((aRhs).get_SimpleURIParams()); |
1467 | 0 | } |
1468 | 0 | case TStandardURLParams: |
1469 | 0 | { |
1470 | 0 | return (get_StandardURLParams()) == ((aRhs).get_StandardURLParams()); |
1471 | 0 | } |
1472 | 0 | case TJARURIParams: |
1473 | 0 | { |
1474 | 0 | return (get_JARURIParams()) == ((aRhs).get_JARURIParams()); |
1475 | 0 | } |
1476 | 0 | case TIconURIParams: |
1477 | 0 | { |
1478 | 0 | return (get_IconURIParams()) == ((aRhs).get_IconURIParams()); |
1479 | 0 | } |
1480 | 0 | case TNullPrincipalURIParams: |
1481 | 0 | { |
1482 | 0 | return (get_NullPrincipalURIParams()) == ((aRhs).get_NullPrincipalURIParams()); |
1483 | 0 | } |
1484 | 0 | case TJSURIParams: |
1485 | 0 | { |
1486 | 0 | return (get_JSURIParams()) == ((aRhs).get_JSURIParams()); |
1487 | 0 | } |
1488 | 0 | case TSimpleNestedURIParams: |
1489 | 0 | { |
1490 | 0 | return (get_SimpleNestedURIParams()) == ((aRhs).get_SimpleNestedURIParams()); |
1491 | 0 | } |
1492 | 0 | case THostObjectURIParams: |
1493 | 0 | { |
1494 | 0 | return (get_HostObjectURIParams()) == ((aRhs).get_HostObjectURIParams()); |
1495 | 0 | } |
1496 | 0 | default: |
1497 | 0 | { |
1498 | 0 | mozilla::ipc::LogicError("unreached"); |
1499 | 0 | return false; |
1500 | 0 | } |
1501 | 0 | } |
1502 | 0 | } |
1503 | | |
1504 | | auto URIParams::get(SimpleURIParams* aOutValue) const -> void |
1505 | 0 | { |
1506 | 0 | (*(aOutValue)) = get_SimpleURIParams(); |
1507 | 0 | } |
1508 | | |
1509 | | auto URIParams::get(StandardURLParams* aOutValue) const -> void |
1510 | 0 | { |
1511 | 0 | (*(aOutValue)) = get_StandardURLParams(); |
1512 | 0 | } |
1513 | | |
1514 | | auto URIParams::get(JARURIParams* aOutValue) const -> void |
1515 | 0 | { |
1516 | 0 | (*(aOutValue)) = get_JARURIParams(); |
1517 | 0 | } |
1518 | | |
1519 | | auto URIParams::get(IconURIParams* aOutValue) const -> void |
1520 | 0 | { |
1521 | 0 | (*(aOutValue)) = get_IconURIParams(); |
1522 | 0 | } |
1523 | | |
1524 | | auto URIParams::get(NullPrincipalURIParams* aOutValue) const -> void |
1525 | 0 | { |
1526 | 0 | (*(aOutValue)) = get_NullPrincipalURIParams(); |
1527 | 0 | } |
1528 | | |
1529 | | auto URIParams::get(JSURIParams* aOutValue) const -> void |
1530 | 0 | { |
1531 | 0 | (*(aOutValue)) = get_JSURIParams(); |
1532 | 0 | } |
1533 | | |
1534 | | auto URIParams::get(SimpleNestedURIParams* aOutValue) const -> void |
1535 | 0 | { |
1536 | 0 | (*(aOutValue)) = get_SimpleNestedURIParams(); |
1537 | 0 | } |
1538 | | |
1539 | | auto URIParams::get(HostObjectURIParams* aOutValue) const -> void |
1540 | 0 | { |
1541 | 0 | (*(aOutValue)) = get_HostObjectURIParams(); |
1542 | 0 | } |
1543 | | |
1544 | | } // namespace ipc |
1545 | | } // namespace mozilla |
1546 | | |
1547 | | namespace mozilla { |
1548 | | namespace ipc { |
1549 | | auto IPDLParamTraits<mozilla::ipc::URIParams>::Write( |
1550 | | IPC::Message* aMsg, |
1551 | | mozilla::ipc::IProtocol* aActor, |
1552 | | const paramType& aVar) -> void |
1553 | | { |
1554 | | typedef mozilla::ipc::URIParams union__; |
1555 | | int type; |
1556 | | type = (aVar).type(); |
1557 | | WriteIPDLParam(aMsg, aActor, type); |
1558 | | // Sentinel = 'URIParams' |
1559 | | (aMsg)->WriteSentinel(1039516337); |
1560 | | |
1561 | | switch (type) { |
1562 | | case union__::TSimpleURIParams: |
1563 | | { |
1564 | | WriteIPDLParam(aMsg, aActor, (aVar).get_SimpleURIParams()); |
1565 | | // Sentinel = 'TSimpleURIParams' |
1566 | | (aMsg)->WriteSentinel(4028607586); |
1567 | | return; |
1568 | | } |
1569 | | case union__::TStandardURLParams: |
1570 | | { |
1571 | | WriteIPDLParam(aMsg, aActor, (aVar).get_StandardURLParams()); |
1572 | | // Sentinel = 'TStandardURLParams' |
1573 | | (aMsg)->WriteSentinel(248174578); |
1574 | | return; |
1575 | | } |
1576 | | case union__::TJARURIParams: |
1577 | | { |
1578 | | WriteIPDLParam(aMsg, aActor, (aVar).get_JARURIParams()); |
1579 | | // Sentinel = 'TJARURIParams' |
1580 | | (aMsg)->WriteSentinel(3404434792); |
1581 | | return; |
1582 | | } |
1583 | | case union__::TIconURIParams: |
1584 | | { |
1585 | | WriteIPDLParam(aMsg, aActor, (aVar).get_IconURIParams()); |
1586 | | // Sentinel = 'TIconURIParams' |
1587 | | (aMsg)->WriteSentinel(1824279023); |
1588 | | return; |
1589 | | } |
1590 | | case union__::TNullPrincipalURIParams: |
1591 | | { |
1592 | | WriteIPDLParam(aMsg, aActor, (aVar).get_NullPrincipalURIParams()); |
1593 | | // Sentinel = 'TNullPrincipalURIParams' |
1594 | | (aMsg)->WriteSentinel(216801182); |
1595 | | return; |
1596 | | } |
1597 | | case union__::TJSURIParams: |
1598 | | { |
1599 | | WriteIPDLParam(aMsg, aActor, (aVar).get_JSURIParams()); |
1600 | | // Sentinel = 'TJSURIParams' |
1601 | | (aMsg)->WriteSentinel(32222119); |
1602 | | return; |
1603 | | } |
1604 | | case union__::TSimpleNestedURIParams: |
1605 | | { |
1606 | | WriteIPDLParam(aMsg, aActor, (aVar).get_SimpleNestedURIParams()); |
1607 | | // Sentinel = 'TSimpleNestedURIParams' |
1608 | | (aMsg)->WriteSentinel(3192238307); |
1609 | | return; |
1610 | | } |
1611 | | case union__::THostObjectURIParams: |
1612 | | { |
1613 | | WriteIPDLParam(aMsg, aActor, (aVar).get_HostObjectURIParams()); |
1614 | | // Sentinel = 'THostObjectURIParams' |
1615 | | (aMsg)->WriteSentinel(1307971301); |
1616 | | return; |
1617 | | } |
1618 | | default: |
1619 | | { |
1620 | | (aActor)->FatalError("unknown union type"); |
1621 | | return; |
1622 | | } |
1623 | | } |
1624 | | } |
1625 | | |
1626 | | auto IPDLParamTraits<mozilla::ipc::URIParams>::Read( |
1627 | | const IPC::Message* aMsg, |
1628 | | PickleIterator* aIter, |
1629 | | mozilla::ipc::IProtocol* aActor, |
1630 | | paramType* aVar) -> bool |
1631 | 0 | { |
1632 | 0 | typedef mozilla::ipc::URIParams union__; |
1633 | 0 | int type; |
1634 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&(type)))))) { |
1635 | 0 | (aActor)->FatalError("Error deserializing type of union URIParams"); |
1636 | 0 | return false; |
1637 | 0 | } |
1638 | 0 | // Sentinel = 'URIParams' |
1639 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1039516337)))) { |
1640 | 0 | mozilla::ipc::SentinelReadError("Error deserializing type of union URIParams"); |
1641 | 0 | return false; |
1642 | 0 | } |
1643 | 0 | |
1644 | 0 | switch (type) { |
1645 | 0 | case union__::TSimpleURIParams: |
1646 | 0 | { |
1647 | 0 | mozilla::ipc::SimpleURIParams tmp = mozilla::ipc::SimpleURIParams(); |
1648 | 0 | (*(aVar)) = tmp; |
1649 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SimpleURIParams())))))) { |
1650 | 0 | (aActor)->FatalError("Error deserializing variant TSimpleURIParams of union URIParams"); |
1651 | 0 | return false; |
1652 | 0 | } |
1653 | 0 | // Sentinel = 'TSimpleURIParams' |
1654 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 4028607586)))) { |
1655 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TSimpleURIParams of union URIParams"); |
1656 | 0 | return false; |
1657 | 0 | } |
1658 | 0 | return true; |
1659 | 0 | } |
1660 | 0 | case union__::TStandardURLParams: |
1661 | 0 | { |
1662 | 0 | mozilla::ipc::StandardURLParams tmp = mozilla::ipc::StandardURLParams(); |
1663 | 0 | (*(aVar)) = tmp; |
1664 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_StandardURLParams())))))) { |
1665 | 0 | (aActor)->FatalError("Error deserializing variant TStandardURLParams of union URIParams"); |
1666 | 0 | return false; |
1667 | 0 | } |
1668 | 0 | // Sentinel = 'TStandardURLParams' |
1669 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 248174578)))) { |
1670 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TStandardURLParams of union URIParams"); |
1671 | 0 | return false; |
1672 | 0 | } |
1673 | 0 | return true; |
1674 | 0 | } |
1675 | 0 | case union__::TJARURIParams: |
1676 | 0 | { |
1677 | 0 | mozilla::ipc::JARURIParams tmp = mozilla::ipc::JARURIParams(); |
1678 | 0 | (*(aVar)) = tmp; |
1679 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_JARURIParams())))))) { |
1680 | 0 | (aActor)->FatalError("Error deserializing variant TJARURIParams of union URIParams"); |
1681 | 0 | return false; |
1682 | 0 | } |
1683 | 0 | // Sentinel = 'TJARURIParams' |
1684 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3404434792)))) { |
1685 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TJARURIParams of union URIParams"); |
1686 | 0 | return false; |
1687 | 0 | } |
1688 | 0 | return true; |
1689 | 0 | } |
1690 | 0 | case union__::TIconURIParams: |
1691 | 0 | { |
1692 | 0 | mozilla::ipc::IconURIParams tmp = mozilla::ipc::IconURIParams(); |
1693 | 0 | (*(aVar)) = tmp; |
1694 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_IconURIParams())))))) { |
1695 | 0 | (aActor)->FatalError("Error deserializing variant TIconURIParams of union URIParams"); |
1696 | 0 | return false; |
1697 | 0 | } |
1698 | 0 | // Sentinel = 'TIconURIParams' |
1699 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1824279023)))) { |
1700 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TIconURIParams of union URIParams"); |
1701 | 0 | return false; |
1702 | 0 | } |
1703 | 0 | return true; |
1704 | 0 | } |
1705 | 0 | case union__::TNullPrincipalURIParams: |
1706 | 0 | { |
1707 | 0 | mozilla::ipc::NullPrincipalURIParams tmp = mozilla::ipc::NullPrincipalURIParams(); |
1708 | 0 | (*(aVar)) = tmp; |
1709 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_NullPrincipalURIParams())))))) { |
1710 | 0 | (aActor)->FatalError("Error deserializing variant TNullPrincipalURIParams of union URIParams"); |
1711 | 0 | return false; |
1712 | 0 | } |
1713 | 0 | // Sentinel = 'TNullPrincipalURIParams' |
1714 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 216801182)))) { |
1715 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TNullPrincipalURIParams of union URIParams"); |
1716 | 0 | return false; |
1717 | 0 | } |
1718 | 0 | return true; |
1719 | 0 | } |
1720 | 0 | case union__::TJSURIParams: |
1721 | 0 | { |
1722 | 0 | mozilla::ipc::JSURIParams tmp = mozilla::ipc::JSURIParams(); |
1723 | 0 | (*(aVar)) = tmp; |
1724 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_JSURIParams())))))) { |
1725 | 0 | (aActor)->FatalError("Error deserializing variant TJSURIParams of union URIParams"); |
1726 | 0 | return false; |
1727 | 0 | } |
1728 | 0 | // Sentinel = 'TJSURIParams' |
1729 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 32222119)))) { |
1730 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TJSURIParams of union URIParams"); |
1731 | 0 | return false; |
1732 | 0 | } |
1733 | 0 | return true; |
1734 | 0 | } |
1735 | 0 | case union__::TSimpleNestedURIParams: |
1736 | 0 | { |
1737 | 0 | mozilla::ipc::SimpleNestedURIParams tmp = mozilla::ipc::SimpleNestedURIParams(); |
1738 | 0 | (*(aVar)) = tmp; |
1739 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SimpleNestedURIParams())))))) { |
1740 | 0 | (aActor)->FatalError("Error deserializing variant TSimpleNestedURIParams of union URIParams"); |
1741 | 0 | return false; |
1742 | 0 | } |
1743 | 0 | // Sentinel = 'TSimpleNestedURIParams' |
1744 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3192238307)))) { |
1745 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TSimpleNestedURIParams of union URIParams"); |
1746 | 0 | return false; |
1747 | 0 | } |
1748 | 0 | return true; |
1749 | 0 | } |
1750 | 0 | case union__::THostObjectURIParams: |
1751 | 0 | { |
1752 | 0 | mozilla::ipc::HostObjectURIParams tmp = mozilla::ipc::HostObjectURIParams(); |
1753 | 0 | (*(aVar)) = tmp; |
1754 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_HostObjectURIParams())))))) { |
1755 | 0 | (aActor)->FatalError("Error deserializing variant THostObjectURIParams of union URIParams"); |
1756 | 0 | return false; |
1757 | 0 | } |
1758 | 0 | // Sentinel = 'THostObjectURIParams' |
1759 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1307971301)))) { |
1760 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant THostObjectURIParams of union URIParams"); |
1761 | 0 | return false; |
1762 | 0 | } |
1763 | 0 | return true; |
1764 | 0 | } |
1765 | 0 | default: |
1766 | 0 | { |
1767 | 0 | (aActor)->FatalError("unknown union type"); |
1768 | 0 | return false; |
1769 | 0 | } |
1770 | 0 | } |
1771 | 0 | } |
1772 | | |
1773 | | } // namespace ipc |
1774 | | } // namespace mozilla |
1775 | | |
1776 | | //----------------------------------------------------------------------------- |
1777 | | // Method definitions for the IPDL type |union OptionalURIParams| |
1778 | | // |
1779 | | namespace mozilla { |
1780 | | namespace ipc { |
1781 | | auto OptionalURIParams::MaybeDestroy(Type aNewType) -> bool |
1782 | 0 | { |
1783 | 0 | if ((mType) == (T__None)) { |
1784 | 0 | return true; |
1785 | 0 | } |
1786 | 0 | if ((mType) == (aNewType)) { |
1787 | 0 | return false; |
1788 | 0 | } |
1789 | 0 | switch (mType) { |
1790 | 0 | case Tvoid_t: |
1791 | 0 | { |
1792 | 0 | (ptr_void_t())->~void_t__tdef(); |
1793 | 0 | break; |
1794 | 0 | } |
1795 | 0 | case TURIParams: |
1796 | 0 | { |
1797 | 0 | delete ptr_URIParams(); |
1798 | 0 | break; |
1799 | 0 | } |
1800 | 0 | default: |
1801 | 0 | { |
1802 | 0 | mozilla::ipc::LogicError("not reached"); |
1803 | 0 | break; |
1804 | 0 | } |
1805 | 0 | } |
1806 | 0 | return true; |
1807 | 0 | } |
1808 | | |
1809 | | MOZ_IMPLICIT OptionalURIParams::OptionalURIParams(const void_t& aOther) |
1810 | 0 | { |
1811 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t(aOther); |
1812 | 0 | mType = Tvoid_t; |
1813 | 0 | } |
1814 | | |
1815 | | MOZ_IMPLICIT OptionalURIParams::OptionalURIParams(void_t&& aOther) |
1816 | 0 | { |
1817 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t(std::move(aOther)); |
1818 | 0 | mType = Tvoid_t; |
1819 | 0 | } |
1820 | | |
1821 | | MOZ_IMPLICIT OptionalURIParams::OptionalURIParams(const URIParams& aOther) |
1822 | 0 | { |
1823 | 0 | ptr_URIParams() = new URIParams(aOther); |
1824 | 0 | mType = TURIParams; |
1825 | 0 | } |
1826 | | |
1827 | | MOZ_IMPLICIT OptionalURIParams::OptionalURIParams(URIParams&& aOther) |
1828 | 0 | { |
1829 | 0 | ptr_URIParams() = new URIParams(std::move(aOther)); |
1830 | 0 | mType = TURIParams; |
1831 | 0 | } |
1832 | | |
1833 | | MOZ_IMPLICIT OptionalURIParams::OptionalURIParams(const OptionalURIParams& aOther) |
1834 | 0 | { |
1835 | 0 | (aOther).AssertSanity(); |
1836 | 0 | switch ((aOther).type()) { |
1837 | 0 | case Tvoid_t: |
1838 | 0 | { |
1839 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t((aOther).get_void_t()); |
1840 | 0 | break; |
1841 | 0 | } |
1842 | 0 | case TURIParams: |
1843 | 0 | { |
1844 | 0 | ptr_URIParams() = new URIParams((aOther).get_URIParams()); |
1845 | 0 | break; |
1846 | 0 | } |
1847 | 0 | case T__None: |
1848 | 0 | { |
1849 | 0 | break; |
1850 | 0 | } |
1851 | 0 | default: |
1852 | 0 | { |
1853 | 0 | mozilla::ipc::LogicError("unreached"); |
1854 | 0 | return; |
1855 | 0 | } |
1856 | 0 | } |
1857 | 0 | mType = (aOther).type(); |
1858 | 0 | } |
1859 | | |
1860 | | MOZ_IMPLICIT OptionalURIParams::OptionalURIParams(OptionalURIParams&& aOther) |
1861 | 0 | { |
1862 | 0 | (aOther).AssertSanity(); |
1863 | 0 | Type t = (aOther).type(); |
1864 | 0 | switch (t) { |
1865 | 0 | case Tvoid_t: |
1866 | 0 | { |
1867 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t(std::move((aOther).get_void_t())); |
1868 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
1869 | 0 | break; |
1870 | 0 | } |
1871 | 0 | case TURIParams: |
1872 | 0 | { |
1873 | 0 | ptr_URIParams() = (aOther).ptr_URIParams(); |
1874 | 0 | break; |
1875 | 0 | } |
1876 | 0 | case T__None: |
1877 | 0 | { |
1878 | 0 | break; |
1879 | 0 | } |
1880 | 0 | default: |
1881 | 0 | { |
1882 | 0 | mozilla::ipc::LogicError("unreached"); |
1883 | 0 | return; |
1884 | 0 | } |
1885 | 0 | } |
1886 | 0 | (aOther).mType = T__None; |
1887 | 0 | mType = t; |
1888 | 0 | } |
1889 | | |
1890 | | OptionalURIParams::~OptionalURIParams() |
1891 | 0 | { |
1892 | 0 | static_cast<void>(MaybeDestroy(T__None)); |
1893 | 0 | } |
1894 | | |
1895 | | auto OptionalURIParams::operator=(const void_t& aRhs) -> OptionalURIParams& |
1896 | 0 | { |
1897 | 0 | if (MaybeDestroy(Tvoid_t)) { |
1898 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t; |
1899 | 0 | } |
1900 | 0 | (*(ptr_void_t())) = aRhs; |
1901 | 0 | mType = Tvoid_t; |
1902 | 0 | return (*(this)); |
1903 | 0 | } |
1904 | | |
1905 | | auto OptionalURIParams::operator=(void_t&& aRhs) -> OptionalURIParams& |
1906 | 0 | { |
1907 | 0 | if (MaybeDestroy(Tvoid_t)) { |
1908 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t; |
1909 | 0 | } |
1910 | 0 | (*(ptr_void_t())) = std::move(aRhs); |
1911 | 0 | mType = Tvoid_t; |
1912 | 0 | return (*(this)); |
1913 | 0 | } |
1914 | | |
1915 | | auto OptionalURIParams::operator=(const URIParams& aRhs) -> OptionalURIParams& |
1916 | 0 | { |
1917 | 0 | if (MaybeDestroy(TURIParams)) { |
1918 | 0 | ptr_URIParams() = new URIParams; |
1919 | 0 | } |
1920 | 0 | (*(ptr_URIParams())) = aRhs; |
1921 | 0 | mType = TURIParams; |
1922 | 0 | return (*(this)); |
1923 | 0 | } |
1924 | | |
1925 | | auto OptionalURIParams::operator=(URIParams&& aRhs) -> OptionalURIParams& |
1926 | 0 | { |
1927 | 0 | if (MaybeDestroy(TURIParams)) { |
1928 | 0 | ptr_URIParams() = new URIParams; |
1929 | 0 | } |
1930 | 0 | (*(ptr_URIParams())) = std::move(aRhs); |
1931 | 0 | mType = TURIParams; |
1932 | 0 | return (*(this)); |
1933 | 0 | } |
1934 | | |
1935 | | auto OptionalURIParams::operator=(const OptionalURIParams& aRhs) -> OptionalURIParams& |
1936 | 0 | { |
1937 | 0 | (aRhs).AssertSanity(); |
1938 | 0 | Type t = (aRhs).type(); |
1939 | 0 | switch (t) { |
1940 | 0 | case Tvoid_t: |
1941 | 0 | { |
1942 | 0 | if (MaybeDestroy(t)) { |
1943 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t; |
1944 | 0 | } |
1945 | 0 | (*(ptr_void_t())) = (aRhs).get_void_t(); |
1946 | 0 | break; |
1947 | 0 | } |
1948 | 0 | case TURIParams: |
1949 | 0 | { |
1950 | 0 | if (MaybeDestroy(t)) { |
1951 | 0 | ptr_URIParams() = new URIParams; |
1952 | 0 | } |
1953 | 0 | (*(ptr_URIParams())) = (aRhs).get_URIParams(); |
1954 | 0 | break; |
1955 | 0 | } |
1956 | 0 | case T__None: |
1957 | 0 | { |
1958 | 0 | static_cast<void>(MaybeDestroy(t)); |
1959 | 0 | break; |
1960 | 0 | } |
1961 | 0 | default: |
1962 | 0 | { |
1963 | 0 | mozilla::ipc::LogicError("unreached"); |
1964 | 0 | break; |
1965 | 0 | } |
1966 | 0 | } |
1967 | 0 | mType = t; |
1968 | 0 | return (*(this)); |
1969 | 0 | } |
1970 | | |
1971 | | auto OptionalURIParams::operator=(OptionalURIParams&& aRhs) -> OptionalURIParams& |
1972 | 0 | { |
1973 | 0 | (aRhs).AssertSanity(); |
1974 | 0 | Type t = (aRhs).type(); |
1975 | 0 | switch (t) { |
1976 | 0 | case Tvoid_t: |
1977 | 0 | { |
1978 | 0 | if (MaybeDestroy(t)) { |
1979 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t; |
1980 | 0 | } |
1981 | 0 | (*(ptr_void_t())) = std::move((aRhs).get_void_t()); |
1982 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
1983 | 0 | break; |
1984 | 0 | } |
1985 | 0 | case TURIParams: |
1986 | 0 | { |
1987 | 0 | static_cast<void>(MaybeDestroy(T__None)); |
1988 | 0 | ptr_URIParams() = (aRhs).ptr_URIParams(); |
1989 | 0 | break; |
1990 | 0 | } |
1991 | 0 | case T__None: |
1992 | 0 | { |
1993 | 0 | static_cast<void>(MaybeDestroy(t)); |
1994 | 0 | break; |
1995 | 0 | } |
1996 | 0 | default: |
1997 | 0 | { |
1998 | 0 | mozilla::ipc::LogicError("unreached"); |
1999 | 0 | break; |
2000 | 0 | } |
2001 | 0 | } |
2002 | 0 | (aRhs).mType = T__None; |
2003 | 0 | mType = t; |
2004 | 0 | return (*(this)); |
2005 | 0 | } |
2006 | | |
2007 | | auto OptionalURIParams::operator==(const void_t& aRhs) const -> bool |
2008 | 0 | { |
2009 | 0 | return (get_void_t()) == (aRhs); |
2010 | 0 | } |
2011 | | |
2012 | | auto OptionalURIParams::operator==(const URIParams& aRhs) const -> bool |
2013 | 0 | { |
2014 | 0 | return (get_URIParams()) == (aRhs); |
2015 | 0 | } |
2016 | | |
2017 | | auto OptionalURIParams::operator==(const OptionalURIParams& aRhs) const -> bool |
2018 | 0 | { |
2019 | 0 | if ((type()) != ((aRhs).type())) { |
2020 | 0 | return false; |
2021 | 0 | } |
2022 | 0 | |
2023 | 0 | switch (type()) { |
2024 | 0 | case Tvoid_t: |
2025 | 0 | { |
2026 | 0 | return (get_void_t()) == ((aRhs).get_void_t()); |
2027 | 0 | } |
2028 | 0 | case TURIParams: |
2029 | 0 | { |
2030 | 0 | return (get_URIParams()) == ((aRhs).get_URIParams()); |
2031 | 0 | } |
2032 | 0 | default: |
2033 | 0 | { |
2034 | 0 | mozilla::ipc::LogicError("unreached"); |
2035 | 0 | return false; |
2036 | 0 | } |
2037 | 0 | } |
2038 | 0 | } |
2039 | | |
2040 | | auto OptionalURIParams::get(void_t* aOutValue) const -> void |
2041 | 0 | { |
2042 | 0 | (*(aOutValue)) = get_void_t(); |
2043 | 0 | } |
2044 | | |
2045 | | auto OptionalURIParams::get(URIParams* aOutValue) const -> void |
2046 | 0 | { |
2047 | 0 | (*(aOutValue)) = get_URIParams(); |
2048 | 0 | } |
2049 | | |
2050 | | } // namespace ipc |
2051 | | } // namespace mozilla |
2052 | | |
2053 | | namespace mozilla { |
2054 | | namespace ipc { |
2055 | | auto IPDLParamTraits<mozilla::ipc::OptionalURIParams>::Write( |
2056 | | IPC::Message* aMsg, |
2057 | | mozilla::ipc::IProtocol* aActor, |
2058 | | const paramType& aVar) -> void |
2059 | | { |
2060 | | typedef mozilla::ipc::OptionalURIParams union__; |
2061 | | int type; |
2062 | | type = (aVar).type(); |
2063 | | WriteIPDLParam(aMsg, aActor, type); |
2064 | | // Sentinel = 'OptionalURIParams' |
2065 | | (aMsg)->WriteSentinel(1977079525); |
2066 | | |
2067 | | switch (type) { |
2068 | | case union__::Tvoid_t: |
2069 | | { |
2070 | | WriteIPDLParam(aMsg, aActor, (aVar).get_void_t()); |
2071 | | // Sentinel = 'Tvoid_t' |
2072 | | (aMsg)->WriteSentinel(3041273328); |
2073 | | return; |
2074 | | } |
2075 | | case union__::TURIParams: |
2076 | | { |
2077 | | WriteIPDLParam(aMsg, aActor, (aVar).get_URIParams()); |
2078 | | // Sentinel = 'TURIParams' |
2079 | | (aMsg)->WriteSentinel(1132652062); |
2080 | | return; |
2081 | | } |
2082 | | default: |
2083 | | { |
2084 | | (aActor)->FatalError("unknown union type"); |
2085 | | return; |
2086 | | } |
2087 | | } |
2088 | | } |
2089 | | |
2090 | | auto IPDLParamTraits<mozilla::ipc::OptionalURIParams>::Read( |
2091 | | const IPC::Message* aMsg, |
2092 | | PickleIterator* aIter, |
2093 | | mozilla::ipc::IProtocol* aActor, |
2094 | | paramType* aVar) -> bool |
2095 | 0 | { |
2096 | 0 | typedef mozilla::ipc::OptionalURIParams union__; |
2097 | 0 | int type; |
2098 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&(type)))))) { |
2099 | 0 | (aActor)->FatalError("Error deserializing type of union OptionalURIParams"); |
2100 | 0 | return false; |
2101 | 0 | } |
2102 | 0 | // Sentinel = 'OptionalURIParams' |
2103 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1977079525)))) { |
2104 | 0 | mozilla::ipc::SentinelReadError("Error deserializing type of union OptionalURIParams"); |
2105 | 0 | return false; |
2106 | 0 | } |
2107 | 0 | |
2108 | 0 | switch (type) { |
2109 | 0 | case union__::Tvoid_t: |
2110 | 0 | { |
2111 | 0 | mozilla::void_t tmp = mozilla::void_t(); |
2112 | 0 | (*(aVar)) = tmp; |
2113 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_void_t())))))) { |
2114 | 0 | (aActor)->FatalError("Error deserializing variant Tvoid_t of union OptionalURIParams"); |
2115 | 0 | return false; |
2116 | 0 | } |
2117 | 0 | // Sentinel = 'Tvoid_t' |
2118 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3041273328)))) { |
2119 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant Tvoid_t of union OptionalURIParams"); |
2120 | 0 | return false; |
2121 | 0 | } |
2122 | 0 | return true; |
2123 | 0 | } |
2124 | 0 | case union__::TURIParams: |
2125 | 0 | { |
2126 | 0 | mozilla::ipc::URIParams tmp = mozilla::ipc::URIParams(); |
2127 | 0 | (*(aVar)) = tmp; |
2128 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_URIParams())))))) { |
2129 | 0 | (aActor)->FatalError("Error deserializing variant TURIParams of union OptionalURIParams"); |
2130 | 0 | return false; |
2131 | 0 | } |
2132 | 0 | // Sentinel = 'TURIParams' |
2133 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1132652062)))) { |
2134 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TURIParams of union OptionalURIParams"); |
2135 | 0 | return false; |
2136 | 0 | } |
2137 | 0 | return true; |
2138 | 0 | } |
2139 | 0 | default: |
2140 | 0 | { |
2141 | 0 | (aActor)->FatalError("unknown union type"); |
2142 | 0 | return false; |
2143 | 0 | } |
2144 | 0 | } |
2145 | 0 | } |
2146 | | |
2147 | | } // namespace ipc |
2148 | | } // namespace mozilla |
2149 | | |
2150 | | //----------------------------------------------------------------------------- |
2151 | | // Method definitions for the IPDL type |struct JSURIParams| |
2152 | | // |
2153 | | namespace mozilla { |
2154 | | namespace ipc { |
2155 | | auto JSURIParams::operator==(const JSURIParams& _o) const -> bool |
2156 | 0 | { |
2157 | 0 | if ((!((simpleParams()) == ((_o).simpleParams())))) { |
2158 | 0 | return false; |
2159 | 0 | } |
2160 | 0 | if ((!((baseURI()) == ((_o).baseURI())))) { |
2161 | 0 | return false; |
2162 | 0 | } |
2163 | 0 | return true; |
2164 | 0 | } |
2165 | | |
2166 | | auto JSURIParams::operator!=(const JSURIParams& _o) const -> bool |
2167 | 0 | { |
2168 | 0 | return (!(operator==(_o))); |
2169 | 0 | } |
2170 | | |
2171 | | } // namespace ipc |
2172 | | } // namespace mozilla |
2173 | | |
2174 | | namespace mozilla { |
2175 | | namespace ipc { |
2176 | | auto IPDLParamTraits<mozilla::ipc::JSURIParams>::Write( |
2177 | | IPC::Message* aMsg, |
2178 | | mozilla::ipc::IProtocol* aActor, |
2179 | | const paramType& aVar) -> void |
2180 | 0 | { |
2181 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).simpleParams()); |
2182 | 0 | // Sentinel = 'simpleParams' |
2183 | 0 | (aMsg)->WriteSentinel(3404291700); |
2184 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).baseURI()); |
2185 | 0 | // Sentinel = 'baseURI' |
2186 | 0 | (aMsg)->WriteSentinel(1836705256); |
2187 | 0 | } |
2188 | | |
2189 | | auto IPDLParamTraits<mozilla::ipc::JSURIParams>::Read( |
2190 | | const IPC::Message* aMsg, |
2191 | | PickleIterator* aIter, |
2192 | | mozilla::ipc::IProtocol* aActor, |
2193 | | paramType* aVar) -> bool |
2194 | 0 | { |
2195 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->simpleParams())))))) { |
2196 | 0 | (aActor)->FatalError("Error deserializing 'simpleParams' (SimpleURIParams) member of 'JSURIParams'"); |
2197 | 0 | return false; |
2198 | 0 | } |
2199 | 0 | // Sentinel = 'simpleParams' |
2200 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3404291700)))) { |
2201 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'simpleParams' (SimpleURIParams) member of 'JSURIParams'"); |
2202 | 0 | return false; |
2203 | 0 | } |
2204 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->baseURI())))))) { |
2205 | 0 | (aActor)->FatalError("Error deserializing 'baseURI' (OptionalURIParams) member of 'JSURIParams'"); |
2206 | 0 | return false; |
2207 | 0 | } |
2208 | 0 | // Sentinel = 'baseURI' |
2209 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1836705256)))) { |
2210 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'baseURI' (OptionalURIParams) member of 'JSURIParams'"); |
2211 | 0 | return false; |
2212 | 0 | } |
2213 | 0 | return true; |
2214 | 0 | } |
2215 | | |
2216 | | } // namespace ipc |
2217 | | } // namespace mozilla |
2218 | | |
2219 | | //----------------------------------------------------------------------------- |
2220 | | // Method definitions for the IPDL type |struct SimpleNestedURIParams| |
2221 | | // |
2222 | | namespace mozilla { |
2223 | | namespace ipc { |
2224 | | auto SimpleNestedURIParams::operator==(const SimpleNestedURIParams& _o) const -> bool |
2225 | 0 | { |
2226 | 0 | if ((!((simpleParams()) == ((_o).simpleParams())))) { |
2227 | 0 | return false; |
2228 | 0 | } |
2229 | 0 | if ((!((innerURI()) == ((_o).innerURI())))) { |
2230 | 0 | return false; |
2231 | 0 | } |
2232 | 0 | return true; |
2233 | 0 | } |
2234 | | |
2235 | | auto SimpleNestedURIParams::operator!=(const SimpleNestedURIParams& _o) const -> bool |
2236 | 0 | { |
2237 | 0 | return (!(operator==(_o))); |
2238 | 0 | } |
2239 | | |
2240 | | } // namespace ipc |
2241 | | } // namespace mozilla |
2242 | | |
2243 | | namespace mozilla { |
2244 | | namespace ipc { |
2245 | | auto IPDLParamTraits<mozilla::ipc::SimpleNestedURIParams>::Write( |
2246 | | IPC::Message* aMsg, |
2247 | | mozilla::ipc::IProtocol* aActor, |
2248 | | const paramType& aVar) -> void |
2249 | 0 | { |
2250 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).simpleParams()); |
2251 | 0 | // Sentinel = 'simpleParams' |
2252 | 0 | (aMsg)->WriteSentinel(3404291700); |
2253 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).innerURI()); |
2254 | 0 | // Sentinel = 'innerURI' |
2255 | 0 | (aMsg)->WriteSentinel(2573245334); |
2256 | 0 | } |
2257 | | |
2258 | | auto IPDLParamTraits<mozilla::ipc::SimpleNestedURIParams>::Read( |
2259 | | const IPC::Message* aMsg, |
2260 | | PickleIterator* aIter, |
2261 | | mozilla::ipc::IProtocol* aActor, |
2262 | | paramType* aVar) -> bool |
2263 | 0 | { |
2264 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->simpleParams())))))) { |
2265 | 0 | (aActor)->FatalError("Error deserializing 'simpleParams' (SimpleURIParams) member of 'SimpleNestedURIParams'"); |
2266 | 0 | return false; |
2267 | 0 | } |
2268 | 0 | // Sentinel = 'simpleParams' |
2269 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3404291700)))) { |
2270 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'simpleParams' (SimpleURIParams) member of 'SimpleNestedURIParams'"); |
2271 | 0 | return false; |
2272 | 0 | } |
2273 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->innerURI())))))) { |
2274 | 0 | (aActor)->FatalError("Error deserializing 'innerURI' (URIParams) member of 'SimpleNestedURIParams'"); |
2275 | 0 | return false; |
2276 | 0 | } |
2277 | 0 | // Sentinel = 'innerURI' |
2278 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2573245334)))) { |
2279 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'innerURI' (URIParams) member of 'SimpleNestedURIParams'"); |
2280 | 0 | return false; |
2281 | 0 | } |
2282 | 0 | return true; |
2283 | 0 | } |
2284 | | |
2285 | | } // namespace ipc |
2286 | | } // namespace mozilla |