1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/net/PWyciwygChannelParent.h"
8 :
9 : #include "mozilla/net/PNeckoParent.h"
10 :
11 : typedef IPC::Message Message;
12 : typedef mozilla::ipc::RPCChannel Channel;
13 : typedef mozilla::ipc::RPCChannel::RPCListener ChannelListener;
14 : typedef base::ProcessHandle ProcessHandle;
15 : typedef mozilla::ipc::AsyncChannel AsyncChannel;
16 : typedef mozilla::ipc::SharedMemory SharedMemory;
17 : typedef mozilla::ipc::Trigger Trigger;
18 : typedef mozilla::ipc::ActorHandle ActorHandle;
19 : typedef mozilla::ipc::Shmem Shmem;
20 : typedef IPC::URI URI;
21 : using mozilla::net::PNeckoParent;
22 :
23 : namespace mozilla {
24 : namespace net {
25 :
26 :
27 : bool
28 0 : PWyciwygChannelParent::Recv__delete__()
29 : {
30 0 : return true;
31 : }
32 :
33 : void
34 0 : PWyciwygChannelParent::ActorDestroy(ActorDestroyReason why)
35 : {
36 0 : }
37 :
38 0 : PWyciwygChannelParent::PWyciwygChannelParent() :
39 : mId(0),
40 0 : mState(PWyciwygChannel::__Dead)
41 : {
42 0 : MOZ_COUNT_CTOR(PWyciwygChannelParent);
43 0 : }
44 :
45 0 : PWyciwygChannelParent::~PWyciwygChannelParent()
46 : {
47 0 : MOZ_COUNT_DTOR(PWyciwygChannelParent);
48 0 : }
49 :
50 : PNeckoParent*
51 0 : PWyciwygChannelParent::Manager()
52 : {
53 0 : return static_cast<PNeckoParent*>(mManager);
54 : }
55 :
56 : PWyciwygChannel::State
57 0 : PWyciwygChannelParent::state()
58 : {
59 0 : return mState;
60 : }
61 :
62 : bool
63 0 : PWyciwygChannelParent::SendOnStartRequest(
64 : const nsresult& statusCode,
65 : const PRInt32& contentLength,
66 : const PRInt32& source,
67 : const nsCString& charset,
68 : const nsCString& securityInfo)
69 : {
70 0 : PWyciwygChannel::Msg_OnStartRequest* __msg = new PWyciwygChannel::Msg_OnStartRequest();
71 :
72 0 : Write(statusCode, __msg);
73 0 : Write(contentLength, __msg);
74 0 : Write(source, __msg);
75 0 : Write(charset, __msg);
76 0 : Write(securityInfo, __msg);
77 :
78 0 : (__msg)->set_routing_id(mId);
79 :
80 :
81 :
82 0 : if (mozilla::ipc::LoggingEnabled()) {
83 0 : (__msg)->Log("[PWyciwygChannelParent] Sending ", stderr);
84 : }
85 0 : if ((!(PWyciwygChannel::Transition(mState, Trigger(Trigger::Send, PWyciwygChannel::Msg_OnStartRequest__ID), (&(mState)))))) {
86 0 : NS_WARNING("bad state transition!");
87 : }
88 :
89 0 : bool __sendok = (mChannel)->Send(__msg);
90 0 : return __sendok;
91 : }
92 :
93 : bool
94 0 : PWyciwygChannelParent::SendOnDataAvailable(
95 : const nsCString& data,
96 : const PRUint32& offset)
97 : {
98 0 : PWyciwygChannel::Msg_OnDataAvailable* __msg = new PWyciwygChannel::Msg_OnDataAvailable();
99 :
100 0 : Write(data, __msg);
101 0 : Write(offset, __msg);
102 :
103 0 : (__msg)->set_routing_id(mId);
104 :
105 :
106 :
107 0 : if (mozilla::ipc::LoggingEnabled()) {
108 0 : (__msg)->Log("[PWyciwygChannelParent] Sending ", stderr);
109 : }
110 0 : if ((!(PWyciwygChannel::Transition(mState, Trigger(Trigger::Send, PWyciwygChannel::Msg_OnDataAvailable__ID), (&(mState)))))) {
111 0 : NS_WARNING("bad state transition!");
112 : }
113 :
114 0 : bool __sendok = (mChannel)->Send(__msg);
115 0 : return __sendok;
116 : }
117 :
118 : bool
119 0 : PWyciwygChannelParent::SendOnStopRequest(const nsresult& statusCode)
120 : {
121 0 : PWyciwygChannel::Msg_OnStopRequest* __msg = new PWyciwygChannel::Msg_OnStopRequest();
122 :
123 0 : Write(statusCode, __msg);
124 :
125 0 : (__msg)->set_routing_id(mId);
126 :
127 :
128 :
129 0 : if (mozilla::ipc::LoggingEnabled()) {
130 0 : (__msg)->Log("[PWyciwygChannelParent] Sending ", stderr);
131 : }
132 0 : if ((!(PWyciwygChannel::Transition(mState, Trigger(Trigger::Send, PWyciwygChannel::Msg_OnStopRequest__ID), (&(mState)))))) {
133 0 : NS_WARNING("bad state transition!");
134 : }
135 :
136 0 : bool __sendok = (mChannel)->Send(__msg);
137 0 : return __sendok;
138 : }
139 :
140 : bool
141 0 : PWyciwygChannelParent::SendCancelEarly(const nsresult& statusCode)
142 : {
143 0 : PWyciwygChannel::Msg_CancelEarly* __msg = new PWyciwygChannel::Msg_CancelEarly();
144 :
145 0 : Write(statusCode, __msg);
146 :
147 0 : (__msg)->set_routing_id(mId);
148 :
149 :
150 :
151 0 : if (mozilla::ipc::LoggingEnabled()) {
152 0 : (__msg)->Log("[PWyciwygChannelParent] Sending ", stderr);
153 : }
154 0 : if ((!(PWyciwygChannel::Transition(mState, Trigger(Trigger::Send, PWyciwygChannel::Msg_CancelEarly__ID), (&(mState)))))) {
155 0 : NS_WARNING("bad state transition!");
156 : }
157 :
158 0 : bool __sendok = (mChannel)->Send(__msg);
159 0 : return __sendok;
160 : }
161 :
162 : int32
163 0 : PWyciwygChannelParent::Register(ChannelListener* aRouted)
164 : {
165 0 : return (mManager)->Register(aRouted);
166 : }
167 :
168 : int32
169 0 : PWyciwygChannelParent::RegisterID(
170 : ChannelListener* aRouted,
171 : int32 aId)
172 : {
173 0 : return (mManager)->RegisterID(aRouted, aId);
174 : }
175 :
176 : ChannelListener*
177 0 : PWyciwygChannelParent::Lookup(int32 aId)
178 : {
179 0 : return (mManager)->Lookup(aId);
180 : }
181 :
182 : void
183 0 : PWyciwygChannelParent::Unregister(int32 aId)
184 : {
185 0 : return (mManager)->Unregister(aId);
186 : }
187 :
188 : void
189 0 : PWyciwygChannelParent::RemoveManagee(
190 : int32 aProtocolId,
191 : ChannelListener* aListener)
192 : {
193 0 : NS_RUNTIMEABORT("unreached");
194 : return;
195 : }
196 :
197 : Shmem::SharedMemory*
198 0 : PWyciwygChannelParent::CreateSharedMemory(
199 : size_t aSize,
200 : Shmem::SharedMemory::SharedMemoryType type,
201 : bool unsafe,
202 : Shmem::id_t* aId)
203 : {
204 0 : return (mManager)->CreateSharedMemory(aSize, type, unsafe, aId);
205 : }
206 :
207 : bool
208 0 : PWyciwygChannelParent::AdoptSharedMemory(
209 : Shmem::SharedMemory* segment,
210 : Shmem::id_t* aId)
211 : {
212 0 : return (mManager)->AdoptSharedMemory(segment, aId);
213 : }
214 :
215 : Shmem::SharedMemory*
216 0 : PWyciwygChannelParent::LookupSharedMemory(Shmem::id_t aId)
217 : {
218 0 : return (mManager)->LookupSharedMemory(aId);
219 : }
220 :
221 : bool
222 0 : PWyciwygChannelParent::IsTrackingSharedMemory(Shmem::SharedMemory* segment)
223 : {
224 0 : return (mManager)->IsTrackingSharedMemory(segment);
225 : }
226 :
227 : bool
228 0 : PWyciwygChannelParent::DestroySharedMemory(Shmem& aShmem)
229 : {
230 0 : return (mManager)->DestroySharedMemory(aShmem);
231 : }
232 :
233 : ProcessHandle
234 0 : PWyciwygChannelParent::OtherProcess() const
235 : {
236 0 : return (mManager)->OtherProcess();
237 : }
238 :
239 : AsyncChannel*
240 0 : PWyciwygChannelParent::GetIPCChannel()
241 : {
242 0 : return mChannel;
243 : }
244 :
245 : PWyciwygChannelParent::Result
246 0 : PWyciwygChannelParent::OnMessageReceived(const Message& __msg)
247 : {
248 0 : switch ((__msg).type()) {
249 : case PWyciwygChannel::Msg___delete____ID:
250 : {
251 0 : (const_cast<Message&>(__msg)).set_name("PWyciwygChannel::Msg___delete__");
252 0 : if (mozilla::ipc::LoggingEnabled()) {
253 0 : (static_cast<const PWyciwygChannel::Msg___delete__*>((&(__msg))))->Log("[PWyciwygChannelParent] Received ", stderr);
254 : }
255 :
256 0 : void* __iter = 0;
257 : PWyciwygChannelParent* actor;
258 :
259 0 : if ((!(Read((&(actor)), (&(__msg)), (&(__iter)), false)))) {
260 0 : FatalError("error deserializing (better message TODO)");
261 0 : return MsgValueError;
262 : }
263 0 : (__msg).EndRead(__iter);
264 0 : if ((!(PWyciwygChannel::Transition(mState, Trigger(Trigger::Recv, PWyciwygChannel::Msg___delete____ID), (&(mState)))))) {
265 0 : NS_WARNING("bad state transition!");
266 : }
267 0 : if ((!(Recv__delete__()))) {
268 0 : return MsgProcessingError;
269 : }
270 :
271 0 : (actor)->DestroySubtree(Deletion);
272 0 : (actor)->DeallocSubtree();
273 0 : ((actor)->mManager)->RemoveManagee(PWyciwygChannelMsgStart, actor);
274 :
275 :
276 0 : return MsgProcessed;
277 : }
278 : case PWyciwygChannel::Msg_Init__ID:
279 : {
280 0 : (const_cast<Message&>(__msg)).set_name("PWyciwygChannel::Msg_Init");
281 0 : if (mozilla::ipc::LoggingEnabled()) {
282 0 : (static_cast<const PWyciwygChannel::Msg_Init*>((&(__msg))))->Log("[PWyciwygChannelParent] Received ", stderr);
283 : }
284 :
285 0 : void* __iter = 0;
286 0 : URI uri;
287 :
288 0 : if ((!(Read((&(uri)), (&(__msg)), (&(__iter)))))) {
289 0 : FatalError("error deserializing (better message TODO)");
290 0 : return MsgValueError;
291 : }
292 0 : (__msg).EndRead(__iter);
293 0 : if ((!(PWyciwygChannel::Transition(mState, Trigger(Trigger::Recv, PWyciwygChannel::Msg_Init__ID), (&(mState)))))) {
294 0 : NS_WARNING("bad state transition!");
295 : }
296 0 : if ((!(RecvInit(uri)))) {
297 0 : return MsgProcessingError;
298 : }
299 :
300 0 : return MsgProcessed;
301 : }
302 : case PWyciwygChannel::Msg_AsyncOpen__ID:
303 : {
304 0 : (const_cast<Message&>(__msg)).set_name("PWyciwygChannel::Msg_AsyncOpen");
305 0 : if (mozilla::ipc::LoggingEnabled()) {
306 0 : (static_cast<const PWyciwygChannel::Msg_AsyncOpen*>((&(__msg))))->Log("[PWyciwygChannelParent] Received ", stderr);
307 : }
308 :
309 0 : void* __iter = 0;
310 0 : URI originalURI;
311 : PRUint32 loadFlags;
312 :
313 0 : if ((!(Read((&(originalURI)), (&(__msg)), (&(__iter)))))) {
314 0 : FatalError("error deserializing (better message TODO)");
315 0 : return MsgValueError;
316 : }
317 0 : if ((!(Read((&(loadFlags)), (&(__msg)), (&(__iter)))))) {
318 0 : FatalError("error deserializing (better message TODO)");
319 0 : return MsgValueError;
320 : }
321 0 : (__msg).EndRead(__iter);
322 0 : if ((!(PWyciwygChannel::Transition(mState, Trigger(Trigger::Recv, PWyciwygChannel::Msg_AsyncOpen__ID), (&(mState)))))) {
323 0 : NS_WARNING("bad state transition!");
324 : }
325 0 : if ((!(RecvAsyncOpen(originalURI, loadFlags)))) {
326 0 : return MsgProcessingError;
327 : }
328 :
329 0 : return MsgProcessed;
330 : }
331 : case PWyciwygChannel::Msg_WriteToCacheEntry__ID:
332 : {
333 0 : (const_cast<Message&>(__msg)).set_name("PWyciwygChannel::Msg_WriteToCacheEntry");
334 0 : if (mozilla::ipc::LoggingEnabled()) {
335 0 : (static_cast<const PWyciwygChannel::Msg_WriteToCacheEntry*>((&(__msg))))->Log("[PWyciwygChannelParent] Received ", stderr);
336 : }
337 :
338 0 : void* __iter = 0;
339 0 : nsString data;
340 :
341 0 : if ((!(Read((&(data)), (&(__msg)), (&(__iter)))))) {
342 0 : FatalError("error deserializing (better message TODO)");
343 0 : return MsgValueError;
344 : }
345 0 : (__msg).EndRead(__iter);
346 0 : if ((!(PWyciwygChannel::Transition(mState, Trigger(Trigger::Recv, PWyciwygChannel::Msg_WriteToCacheEntry__ID), (&(mState)))))) {
347 0 : NS_WARNING("bad state transition!");
348 : }
349 0 : if ((!(RecvWriteToCacheEntry(data)))) {
350 0 : return MsgProcessingError;
351 : }
352 :
353 0 : return MsgProcessed;
354 : }
355 : case PWyciwygChannel::Msg_CloseCacheEntry__ID:
356 : {
357 0 : (const_cast<Message&>(__msg)).set_name("PWyciwygChannel::Msg_CloseCacheEntry");
358 0 : if (mozilla::ipc::LoggingEnabled()) {
359 0 : (static_cast<const PWyciwygChannel::Msg_CloseCacheEntry*>((&(__msg))))->Log("[PWyciwygChannelParent] Received ", stderr);
360 : }
361 :
362 0 : void* __iter = 0;
363 : nsresult reason;
364 :
365 0 : if ((!(Read((&(reason)), (&(__msg)), (&(__iter)))))) {
366 0 : FatalError("error deserializing (better message TODO)");
367 0 : return MsgValueError;
368 : }
369 0 : (__msg).EndRead(__iter);
370 0 : if ((!(PWyciwygChannel::Transition(mState, Trigger(Trigger::Recv, PWyciwygChannel::Msg_CloseCacheEntry__ID), (&(mState)))))) {
371 0 : NS_WARNING("bad state transition!");
372 : }
373 0 : if ((!(RecvCloseCacheEntry(reason)))) {
374 0 : return MsgProcessingError;
375 : }
376 :
377 0 : return MsgProcessed;
378 : }
379 : case PWyciwygChannel::Msg_SetCharsetAndSource__ID:
380 : {
381 0 : (const_cast<Message&>(__msg)).set_name("PWyciwygChannel::Msg_SetCharsetAndSource");
382 0 : if (mozilla::ipc::LoggingEnabled()) {
383 0 : (static_cast<const PWyciwygChannel::Msg_SetCharsetAndSource*>((&(__msg))))->Log("[PWyciwygChannelParent] Received ", stderr);
384 : }
385 :
386 0 : void* __iter = 0;
387 : PRInt32 source;
388 0 : nsCString charset;
389 :
390 0 : if ((!(Read((&(source)), (&(__msg)), (&(__iter)))))) {
391 0 : FatalError("error deserializing (better message TODO)");
392 0 : return MsgValueError;
393 : }
394 0 : if ((!(Read((&(charset)), (&(__msg)), (&(__iter)))))) {
395 0 : FatalError("error deserializing (better message TODO)");
396 0 : return MsgValueError;
397 : }
398 0 : (__msg).EndRead(__iter);
399 0 : if ((!(PWyciwygChannel::Transition(mState, Trigger(Trigger::Recv, PWyciwygChannel::Msg_SetCharsetAndSource__ID), (&(mState)))))) {
400 0 : NS_WARNING("bad state transition!");
401 : }
402 0 : if ((!(RecvSetCharsetAndSource(source, charset)))) {
403 0 : return MsgProcessingError;
404 : }
405 :
406 0 : return MsgProcessed;
407 : }
408 : case PWyciwygChannel::Msg_SetSecurityInfo__ID:
409 : {
410 0 : (const_cast<Message&>(__msg)).set_name("PWyciwygChannel::Msg_SetSecurityInfo");
411 0 : if (mozilla::ipc::LoggingEnabled()) {
412 0 : (static_cast<const PWyciwygChannel::Msg_SetSecurityInfo*>((&(__msg))))->Log("[PWyciwygChannelParent] Received ", stderr);
413 : }
414 :
415 0 : void* __iter = 0;
416 0 : nsCString securityInfo;
417 :
418 0 : if ((!(Read((&(securityInfo)), (&(__msg)), (&(__iter)))))) {
419 0 : FatalError("error deserializing (better message TODO)");
420 0 : return MsgValueError;
421 : }
422 0 : (__msg).EndRead(__iter);
423 0 : if ((!(PWyciwygChannel::Transition(mState, Trigger(Trigger::Recv, PWyciwygChannel::Msg_SetSecurityInfo__ID), (&(mState)))))) {
424 0 : NS_WARNING("bad state transition!");
425 : }
426 0 : if ((!(RecvSetSecurityInfo(securityInfo)))) {
427 0 : return MsgProcessingError;
428 : }
429 :
430 0 : return MsgProcessed;
431 : }
432 : case PWyciwygChannel::Msg_Cancel__ID:
433 : {
434 0 : (const_cast<Message&>(__msg)).set_name("PWyciwygChannel::Msg_Cancel");
435 0 : if (mozilla::ipc::LoggingEnabled()) {
436 0 : (static_cast<const PWyciwygChannel::Msg_Cancel*>((&(__msg))))->Log("[PWyciwygChannelParent] Received ", stderr);
437 : }
438 :
439 0 : void* __iter = 0;
440 : nsresult status;
441 :
442 0 : if ((!(Read((&(status)), (&(__msg)), (&(__iter)))))) {
443 0 : FatalError("error deserializing (better message TODO)");
444 0 : return MsgValueError;
445 : }
446 0 : (__msg).EndRead(__iter);
447 0 : if ((!(PWyciwygChannel::Transition(mState, Trigger(Trigger::Recv, PWyciwygChannel::Msg_Cancel__ID), (&(mState)))))) {
448 0 : NS_WARNING("bad state transition!");
449 : }
450 0 : if ((!(RecvCancel(status)))) {
451 0 : return MsgProcessingError;
452 : }
453 :
454 0 : return MsgProcessed;
455 : }
456 : default:
457 : {
458 0 : return MsgNotKnown;
459 : }
460 : }
461 : }
462 :
463 : PWyciwygChannelParent::Result
464 0 : PWyciwygChannelParent::OnMessageReceived(
465 : const Message& __msg,
466 : Message*& __reply)
467 : {
468 0 : return MsgNotKnown;
469 : }
470 :
471 : PWyciwygChannelParent::Result
472 0 : PWyciwygChannelParent::OnCallReceived(
473 : const Message& __msg,
474 : Message*& __reply)
475 : {
476 0 : return MsgNotKnown;
477 : }
478 :
479 : void
480 0 : PWyciwygChannelParent::OnProcessingError(Result code)
481 : {
482 0 : NS_RUNTIMEABORT("`OnProcessingError' called on non-toplevel actor");
483 0 : }
484 :
485 : bool
486 0 : PWyciwygChannelParent::OnReplyTimeout()
487 : {
488 0 : NS_RUNTIMEABORT("`OnReplyTimeout' called on non-toplevel actor");
489 0 : return false;
490 : }
491 :
492 : void
493 0 : PWyciwygChannelParent::OnChannelClose()
494 : {
495 0 : NS_RUNTIMEABORT("`OnClose' called on non-toplevel actor");
496 0 : }
497 :
498 : void
499 0 : PWyciwygChannelParent::OnChannelError()
500 : {
501 0 : NS_RUNTIMEABORT("`OnError' called on non-toplevel actor");
502 0 : }
503 :
504 : void
505 0 : PWyciwygChannelParent::OnChannelConnected(int32 pid)
506 : {
507 0 : NS_RUNTIMEABORT("'OnConnected' called on non-toplevel actor");
508 0 : }
509 :
510 : bool
511 0 : PWyciwygChannelParent::AllocShmem(
512 : size_t aSize,
513 : Shmem::SharedMemory::SharedMemoryType aType,
514 : Shmem* aMem)
515 : {
516 : Shmem::id_t aId;
517 0 : nsAutoPtr<Shmem::SharedMemory> rawmem(CreateSharedMemory(aSize, aType, false, (&(aId))));
518 0 : if ((!(rawmem))) {
519 0 : return false;
520 : }
521 :
522 0 : (*(aMem)) = Shmem(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), (rawmem).forget(), aId);
523 0 : return true;
524 : }
525 :
526 : bool
527 0 : PWyciwygChannelParent::AllocUnsafeShmem(
528 : size_t aSize,
529 : Shmem::SharedMemory::SharedMemoryType aType,
530 : Shmem* aMem)
531 : {
532 : Shmem::id_t aId;
533 0 : nsAutoPtr<Shmem::SharedMemory> rawmem(CreateSharedMemory(aSize, aType, true, (&(aId))));
534 0 : if ((!(rawmem))) {
535 0 : return false;
536 : }
537 :
538 0 : (*(aMem)) = Shmem(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), (rawmem).forget(), aId);
539 0 : return true;
540 : }
541 :
542 : bool
543 0 : PWyciwygChannelParent::AdoptShmem(
544 : Shmem& aMem,
545 : Shmem* aOutMem)
546 : {
547 0 : Shmem::SharedMemory* rawmem = (aMem).Segment(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead());
548 0 : if (((!(rawmem))) || (IsTrackingSharedMemory(rawmem))) {
549 0 : NS_RUNTIMEABORT("bad Shmem");
550 : }
551 :
552 : Shmem::id_t aId;
553 0 : if ((!(AdoptSharedMemory(rawmem, (&(aId)))))) {
554 0 : return false;
555 : }
556 :
557 0 : (*(aOutMem)) = Shmem(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), rawmem, aId);
558 0 : return true;
559 : }
560 :
561 : bool
562 0 : PWyciwygChannelParent::DeallocShmem(Shmem& aMem)
563 : {
564 0 : bool ok = DestroySharedMemory(aMem);
565 0 : (aMem).forget(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead());
566 0 : return ok;
567 : }
568 :
569 : void
570 0 : PWyciwygChannelParent::FatalError(const char* const msg) const
571 : {
572 : // Virtual method to prevent inlining.
573 : // This give us better error reporting.
574 : // See bug 589371
575 :
576 0 : NS_ERROR("IPDL error:");
577 0 : NS_ERROR(msg);
578 :
579 0 : NS_ERROR("[PWyciwygChannelParent] killing child side as a result");
580 :
581 0 : if ((!(base::KillProcess(OtherProcess(), base::PROCESS_END_KILLED_BY_USER, false)))) {
582 0 : NS_ERROR(" may have failed to kill child!");
583 : }
584 0 : }
585 :
586 : void
587 0 : PWyciwygChannelParent::DestroySubtree(ActorDestroyReason why)
588 : {
589 : // Unregister from our manager.
590 0 : Unregister(mId);
591 0 : mId = 1;
592 :
593 : // Finally, destroy "us".
594 0 : ActorDestroy(why);
595 0 : }
596 :
597 : void
598 0 : PWyciwygChannelParent::DeallocSubtree()
599 : {
600 0 : }
601 :
602 : void
603 0 : PWyciwygChannelParent::Write(
604 : PWyciwygChannelParent* __v,
605 : Message* __msg,
606 : bool __nullable)
607 : {
608 : int32 id;
609 0 : if ((!(__v))) {
610 0 : if ((!(__nullable))) {
611 0 : NS_RUNTIMEABORT("NULL actor value passed to non-nullable param");
612 : }
613 0 : id = 0;
614 : }
615 : else {
616 0 : id = (__v)->mId;
617 0 : if ((1) == (id)) {
618 0 : NS_RUNTIMEABORT("actor has been |delete|d");
619 : }
620 : }
621 :
622 0 : Write(id, __msg);
623 0 : }
624 :
625 : bool
626 0 : PWyciwygChannelParent::Read(
627 : PWyciwygChannelParent** __v,
628 : const Message* __msg,
629 : void** __iter,
630 : bool __nullable)
631 : {
632 : int32 id;
633 0 : if ((!(Read((&(id)), __msg, __iter)))) {
634 0 : return false;
635 : }
636 0 : if (((1) == (id)) || (((0) == (id)) && ((!(__nullable))))) {
637 0 : return false;
638 : }
639 :
640 0 : if ((0) == (id)) {
641 0 : (*(__v)) = 0;
642 : }
643 : else {
644 0 : (*(__v)) = static_cast<PWyciwygChannelParent*>(Lookup(id));
645 0 : if ((!((*(__v))))) {
646 0 : return false;
647 : }
648 : }
649 0 : return true;
650 : }
651 :
652 :
653 :
654 : } // namespace net
655 : } // namespace mozilla
|