Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/PWebBrowserPersistResourcesParent.h"
8 :
9 : #include "mozilla/PWebBrowserPersistDocumentParent.h"
10 :
11 : #include "nsIFile.h"
12 : #include "GeckoProfiler.h"
13 :
14 : namespace mozilla {
15 :
16 :
17 0 : auto PWebBrowserPersistResourcesParent::Recv__delete__(const nsresult& aStatus) -> mozilla::ipc::IPCResult
18 : {
19 0 : return IPC_OK();
20 : }
21 :
22 :
23 0 : MOZ_IMPLICIT PWebBrowserPersistResourcesParent::PWebBrowserPersistResourcesParent() :
24 : mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
25 0 : mState(PWebBrowserPersistResources::__Dead)
26 : {
27 0 : MOZ_COUNT_CTOR(PWebBrowserPersistResourcesParent);
28 0 : }
29 :
30 0 : PWebBrowserPersistResourcesParent::~PWebBrowserPersistResourcesParent()
31 : {
32 0 : MOZ_COUNT_DTOR(PWebBrowserPersistResourcesParent);
33 0 : }
34 :
35 0 : auto PWebBrowserPersistResourcesParent::Manager() const -> PWebBrowserPersistDocumentParent*
36 : {
37 0 : return static_cast<PWebBrowserPersistDocumentParent*>(IProtocol::Manager());
38 : }
39 :
40 0 : auto PWebBrowserPersistResourcesParent::RemoveManagee(
41 : int32_t aProtocolId,
42 : ProtocolBase* aListener) -> void
43 : {
44 0 : FatalError("unreached");
45 0 : return;
46 : }
47 :
48 0 : auto PWebBrowserPersistResourcesParent::OnMessageReceived(const Message& msg__) -> PWebBrowserPersistResourcesParent::Result
49 : {
50 0 : switch ((msg__).type()) {
51 : case PWebBrowserPersistResources::Msg_VisitResource__ID:
52 : {
53 0 : if (mozilla::ipc::LoggingEnabledFor("PWebBrowserPersistResourcesParent")) {
54 0 : mozilla::ipc::LogMessageForProtocol("PWebBrowserPersistResourcesParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
55 : }
56 0 : AUTO_PROFILER_LABEL("PWebBrowserPersistResources::Msg_VisitResource", OTHER);
57 :
58 0 : PickleIterator iter__(msg__);
59 0 : nsCString aURI;
60 :
61 0 : if ((!(Read((&(aURI)), (&(msg__)), (&(iter__)))))) {
62 0 : FatalError("Error deserializing 'nsCString'");
63 0 : return MsgValueError;
64 : }
65 : // Sentinel = 'aURI'
66 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2075506333)))) {
67 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
68 0 : return MsgValueError;
69 : }
70 0 : (msg__).EndRead(iter__, (msg__).type());
71 0 : PWebBrowserPersistResources::Transition(PWebBrowserPersistResources::Msg_VisitResource__ID, (&(mState)));
72 0 : if ((!(RecvVisitResource(mozilla::Move(aURI))))) {
73 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
74 : // Error handled in mozilla::ipc::IPCResult
75 0 : return MsgProcessingError;
76 : }
77 :
78 0 : return MsgProcessed;
79 : }
80 : case PWebBrowserPersistResources::Msg_VisitDocument__ID:
81 : {
82 0 : if (mozilla::ipc::LoggingEnabledFor("PWebBrowserPersistResourcesParent")) {
83 0 : mozilla::ipc::LogMessageForProtocol("PWebBrowserPersistResourcesParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
84 : }
85 0 : AUTO_PROFILER_LABEL("PWebBrowserPersistResources::Msg_VisitDocument", OTHER);
86 :
87 0 : PickleIterator iter__(msg__);
88 : PWebBrowserPersistDocumentParent* aSubDocument;
89 :
90 0 : if ((!(Read((&(aSubDocument)), (&(msg__)), (&(iter__)), false)))) {
91 0 : FatalError("Error deserializing 'PWebBrowserPersistDocumentParent'");
92 0 : return MsgValueError;
93 : }
94 : // Sentinel = 'aSubDocument'
95 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 768241898)))) {
96 0 : mozilla::ipc::SentinelReadError("Error deserializing 'PWebBrowserPersistDocumentParent'");
97 0 : return MsgValueError;
98 : }
99 0 : (msg__).EndRead(iter__, (msg__).type());
100 0 : PWebBrowserPersistResources::Transition(PWebBrowserPersistResources::Msg_VisitDocument__ID, (&(mState)));
101 0 : if ((!(RecvVisitDocument(mozilla::Move(aSubDocument))))) {
102 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
103 : // Error handled in mozilla::ipc::IPCResult
104 0 : return MsgProcessingError;
105 : }
106 :
107 0 : return MsgProcessed;
108 : }
109 : case PWebBrowserPersistResources::Msg___delete____ID:
110 : {
111 0 : if (mozilla::ipc::LoggingEnabledFor("PWebBrowserPersistResourcesParent")) {
112 0 : mozilla::ipc::LogMessageForProtocol("PWebBrowserPersistResourcesParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
113 : }
114 0 : AUTO_PROFILER_LABEL("PWebBrowserPersistResources::Msg___delete__", OTHER);
115 :
116 0 : PickleIterator iter__(msg__);
117 : PWebBrowserPersistResourcesParent* actor;
118 : nsresult aStatus;
119 :
120 0 : if ((!(Read((&(actor)), (&(msg__)), (&(iter__)), false)))) {
121 0 : FatalError("Error deserializing 'PWebBrowserPersistResourcesParent'");
122 0 : return MsgValueError;
123 : }
124 : // Sentinel = 'actor'
125 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
126 0 : mozilla::ipc::SentinelReadError("Error deserializing 'PWebBrowserPersistResourcesParent'");
127 0 : return MsgValueError;
128 : }
129 0 : if ((!(Read((&(aStatus)), (&(msg__)), (&(iter__)))))) {
130 0 : FatalError("Error deserializing 'nsresult'");
131 0 : return MsgValueError;
132 : }
133 : // Sentinel = 'aStatus'
134 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 236002576)))) {
135 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
136 0 : return MsgValueError;
137 : }
138 0 : (msg__).EndRead(iter__, (msg__).type());
139 0 : PWebBrowserPersistResources::Transition(PWebBrowserPersistResources::Msg___delete____ID, (&(mState)));
140 0 : if ((!(Recv__delete__(mozilla::Move(aStatus))))) {
141 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
142 : // Error handled in mozilla::ipc::IPCResult
143 0 : return MsgProcessingError;
144 : }
145 :
146 :
147 0 : IProtocol* mgr = (actor)->Manager();
148 0 : (actor)->DestroySubtree(Deletion);
149 0 : (actor)->DeallocSubtree();
150 0 : (mgr)->RemoveManagee(PWebBrowserPersistResourcesMsgStart, actor);
151 :
152 0 : return MsgProcessed;
153 : }
154 : default:
155 : {
156 0 : return MsgNotKnown;
157 : }
158 : }
159 : }
160 :
161 0 : auto PWebBrowserPersistResourcesParent::OnMessageReceived(
162 : const Message& msg__,
163 : Message*& reply__) -> PWebBrowserPersistResourcesParent::Result
164 : {
165 0 : return MsgNotKnown;
166 : }
167 :
168 0 : auto PWebBrowserPersistResourcesParent::OnCallReceived(
169 : const Message& msg__,
170 : Message*& reply__) -> PWebBrowserPersistResourcesParent::Result
171 : {
172 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
173 : return MsgNotKnown;
174 : }
175 :
176 0 : auto PWebBrowserPersistResourcesParent::GetProtocolTypeId() -> int32_t
177 : {
178 0 : return PWebBrowserPersistResourcesMsgStart;
179 : }
180 :
181 0 : auto PWebBrowserPersistResourcesParent::ProtocolName() const -> const char*
182 : {
183 0 : return "PWebBrowserPersistResourcesParent";
184 : }
185 :
186 0 : auto PWebBrowserPersistResourcesParent::DestroySubtree(ActorDestroyReason why) -> void
187 : {
188 : // Unregister from our manager.
189 0 : Unregister(Id());
190 :
191 : // Reject owning pending promises.
192 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
193 :
194 : // Finally, destroy "us".
195 0 : ActorDestroy(why);
196 0 : }
197 :
198 0 : auto PWebBrowserPersistResourcesParent::DeallocSubtree() -> void
199 : {
200 0 : }
201 :
202 0 : auto PWebBrowserPersistResourcesParent::Write(
203 : const PWebBrowserPersistResourcesParent* v__,
204 : Message* msg__,
205 : bool nullable__) -> void
206 : {
207 : int32_t id;
208 0 : if ((!(v__))) {
209 0 : if ((!(nullable__))) {
210 0 : FatalError("NULL actor value passed to non-nullable param");
211 : }
212 0 : id = 0;
213 : }
214 : else {
215 0 : id = (v__)->Id();
216 0 : if ((1) == (id)) {
217 0 : FatalError("actor has been |delete|d");
218 : }
219 : }
220 :
221 0 : Write(id, msg__);
222 0 : }
223 :
224 0 : auto PWebBrowserPersistResourcesParent::Read(
225 : PWebBrowserPersistResourcesParent** v__,
226 : const Message* msg__,
227 : PickleIterator* iter__,
228 : bool nullable__) -> bool
229 : {
230 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PWebBrowserPersistResources", PWebBrowserPersistResourcesMsgStart);
231 0 : if ((actor).isNothing()) {
232 0 : return false;
233 : }
234 :
235 0 : (*(v__)) = static_cast<PWebBrowserPersistResourcesParent*>((actor).value());
236 0 : return true;
237 : }
238 :
239 0 : auto PWebBrowserPersistResourcesParent::Write(
240 : const PWebBrowserPersistDocumentParent* v__,
241 : Message* msg__,
242 : bool nullable__) -> void
243 : {
244 : int32_t id;
245 0 : if ((!(v__))) {
246 0 : if ((!(nullable__))) {
247 0 : FatalError("NULL actor value passed to non-nullable param");
248 : }
249 0 : id = 0;
250 : }
251 : else {
252 0 : id = (v__)->Id();
253 0 : if ((1) == (id)) {
254 0 : FatalError("actor has been |delete|d");
255 : }
256 : }
257 :
258 0 : Write(id, msg__);
259 0 : }
260 :
261 0 : auto PWebBrowserPersistResourcesParent::Read(
262 : PWebBrowserPersistDocumentParent** v__,
263 : const Message* msg__,
264 : PickleIterator* iter__,
265 : bool nullable__) -> bool
266 : {
267 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PWebBrowserPersistDocument", PWebBrowserPersistDocumentMsgStart);
268 0 : if ((actor).isNothing()) {
269 0 : return false;
270 : }
271 :
272 0 : (*(v__)) = static_cast<PWebBrowserPersistDocumentParent*>((actor).value());
273 0 : return true;
274 : }
275 :
276 :
277 :
278 : } // namespace mozilla
|