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