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