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