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