Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/ipc/PBackgroundTestParent.h"
8 :
9 : #include "mozilla/ipc/PBackgroundParent.h"
10 :
11 : #include "nsIFile.h"
12 : #include "GeckoProfiler.h"
13 :
14 : namespace mozilla {
15 : namespace ipc {
16 :
17 :
18 :
19 0 : MOZ_IMPLICIT PBackgroundTestParent::PBackgroundTestParent() :
20 : mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
21 0 : mState(PBackgroundTest::__Dead)
22 : {
23 0 : MOZ_COUNT_CTOR(PBackgroundTestParent);
24 0 : }
25 :
26 0 : PBackgroundTestParent::~PBackgroundTestParent()
27 : {
28 0 : MOZ_COUNT_DTOR(PBackgroundTestParent);
29 0 : }
30 :
31 0 : auto PBackgroundTestParent::Manager() const -> PBackgroundParent*
32 : {
33 0 : return static_cast<PBackgroundParent*>(IProtocol::Manager());
34 : }
35 :
36 0 : auto PBackgroundTestParent::Send__delete__(
37 : PBackgroundTestParent* actor,
38 : const nsCString& testArg) -> bool
39 : {
40 0 : if ((!(actor))) {
41 0 : return false;
42 : }
43 :
44 0 : IPC::Message* msg__ = PBackgroundTest::Msg___delete__((actor)->Id());
45 :
46 0 : (actor)->Write(actor, msg__, false);
47 : // Sentinel = 'actor'
48 0 : (msg__)->WriteSentinel(875202478);
49 0 : (actor)->Write(testArg, msg__);
50 : // Sentinel = 'testArg'
51 0 : (msg__)->WriteSentinel(2144009831);
52 :
53 :
54 :
55 0 : if (mozilla::ipc::LoggingEnabledFor("PBackgroundTestParent")) {
56 0 : mozilla::ipc::LogMessageForProtocol("PBackgroundTestParent", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
57 : }
58 0 : AUTO_PROFILER_LABEL("PBackgroundTest::Msg___delete__", OTHER);
59 0 : PBackgroundTest::Transition(PBackgroundTest::Msg___delete____ID, (&((actor)->mState)));
60 :
61 0 : bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
62 :
63 0 : IProtocol* mgr = (actor)->Manager();
64 0 : (actor)->DestroySubtree(Deletion);
65 0 : (actor)->DeallocSubtree();
66 0 : (mgr)->RemoveManagee(PBackgroundTestMsgStart, actor);
67 0 : return sendok__;
68 : }
69 :
70 0 : auto PBackgroundTestParent::RemoveManagee(
71 : int32_t aProtocolId,
72 : ProtocolBase* aListener) -> void
73 : {
74 0 : FatalError("unreached");
75 0 : return;
76 : }
77 :
78 0 : auto PBackgroundTestParent::OnMessageReceived(const Message& msg__) -> PBackgroundTestParent::Result
79 : {
80 0 : switch ((msg__).type()) {
81 : case PBackgroundTest::Reply___delete____ID:
82 : {
83 0 : return MsgProcessed;
84 : }
85 : default:
86 : {
87 0 : return MsgNotKnown;
88 : }
89 : }
90 : }
91 :
92 0 : auto PBackgroundTestParent::OnMessageReceived(
93 : const Message& msg__,
94 : Message*& reply__) -> PBackgroundTestParent::Result
95 : {
96 0 : return MsgNotKnown;
97 : }
98 :
99 0 : auto PBackgroundTestParent::OnCallReceived(
100 : const Message& msg__,
101 : Message*& reply__) -> PBackgroundTestParent::Result
102 : {
103 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
104 : return MsgNotKnown;
105 : }
106 :
107 0 : auto PBackgroundTestParent::GetProtocolTypeId() -> int32_t
108 : {
109 0 : return PBackgroundTestMsgStart;
110 : }
111 :
112 0 : auto PBackgroundTestParent::ProtocolName() const -> const char*
113 : {
114 0 : return "PBackgroundTestParent";
115 : }
116 :
117 0 : auto PBackgroundTestParent::DestroySubtree(ActorDestroyReason why) -> void
118 : {
119 : // Unregister from our manager.
120 0 : Unregister(Id());
121 :
122 : // Reject owning pending promises.
123 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
124 :
125 : // Finally, destroy "us".
126 0 : ActorDestroy(why);
127 0 : }
128 :
129 0 : auto PBackgroundTestParent::DeallocSubtree() -> void
130 : {
131 0 : }
132 :
133 0 : auto PBackgroundTestParent::Write(
134 : const PBackgroundTestParent* v__,
135 : Message* msg__,
136 : bool nullable__) -> void
137 : {
138 : int32_t id;
139 0 : if ((!(v__))) {
140 0 : if ((!(nullable__))) {
141 0 : FatalError("NULL actor value passed to non-nullable param");
142 : }
143 0 : id = 0;
144 : }
145 : else {
146 0 : id = (v__)->Id();
147 0 : if ((1) == (id)) {
148 0 : FatalError("actor has been |delete|d");
149 : }
150 : }
151 :
152 0 : Write(id, msg__);
153 0 : }
154 :
155 0 : auto PBackgroundTestParent::Read(
156 : PBackgroundTestParent** v__,
157 : const Message* msg__,
158 : PickleIterator* iter__,
159 : bool nullable__) -> bool
160 : {
161 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PBackgroundTest", PBackgroundTestMsgStart);
162 0 : if ((actor).isNothing()) {
163 0 : return false;
164 : }
165 :
166 0 : (*(v__)) = static_cast<PBackgroundTestParent*>((actor).value());
167 0 : return true;
168 : }
169 :
170 :
171 :
172 : } // namespace ipc
173 : } // namespace mozilla
|