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