/work/obj-fuzz/ipc/ipdl/POfflineCacheUpdateParent.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | // |
2 | | // Automatically generated by ipdlc. |
3 | | // Edit at your own risk |
4 | | // |
5 | | |
6 | | |
7 | | #include "mozilla/docshell/POfflineCacheUpdateParent.h" |
8 | | |
9 | | #include "mozilla/dom/PContentParent.h" |
10 | | |
11 | | #include "nsIFile.h" |
12 | | #include "GeckoProfiler.h" |
13 | | |
14 | | namespace mozilla { |
15 | | namespace docshell { |
16 | | |
17 | | |
18 | | auto POfflineCacheUpdateParent::Recv__delete__() -> mozilla::ipc::IPCResult |
19 | 0 | { |
20 | 0 | return IPC_OK(); |
21 | 0 | } |
22 | | |
23 | | auto POfflineCacheUpdateParent::ActorDestroy(ActorDestroyReason aWhy) -> void |
24 | 0 | { |
25 | 0 | } |
26 | | |
27 | | MOZ_IMPLICIT POfflineCacheUpdateParent::POfflineCacheUpdateParent() : |
28 | | mozilla::ipc::IProtocol(mozilla::ipc::ParentSide), |
29 | | mLivenessState(mozilla::ipc::LivenessState::Dead) |
30 | 0 | { |
31 | 0 | MOZ_COUNT_CTOR(POfflineCacheUpdateParent); |
32 | 0 | } |
33 | | |
34 | | POfflineCacheUpdateParent::~POfflineCacheUpdateParent() |
35 | 0 | { |
36 | 0 | MOZ_COUNT_DTOR(POfflineCacheUpdateParent); |
37 | 0 | } |
38 | | |
39 | | auto POfflineCacheUpdateParent::Manager() const -> PContentParent* |
40 | 0 | { |
41 | 0 | return static_cast<PContentParent*>(IProtocol::Manager()); |
42 | 0 | } |
43 | | |
44 | | auto POfflineCacheUpdateParent::SendNotifyStateEvent( |
45 | | const uint32_t& stateEvent, |
46 | | const uint64_t& byteProgress) -> bool |
47 | 0 | { |
48 | 0 | IPC::Message* msg__ = POfflineCacheUpdate::Msg_NotifyStateEvent(Id()); |
49 | 0 |
|
50 | 0 | WriteIPDLParam(msg__, this, stateEvent); |
51 | 0 | // Sentinel = 'stateEvent' |
52 | 0 | (msg__)->WriteSentinel(837383343); |
53 | 0 | WriteIPDLParam(msg__, this, byteProgress); |
54 | 0 | // Sentinel = 'byteProgress' |
55 | 0 | (msg__)->WriteSentinel(1834843755); |
56 | 0 |
|
57 | 0 |
|
58 | 0 |
|
59 | 0 |
|
60 | 0 | if (mozilla::ipc::LoggingEnabledFor("POfflineCacheUpdateParent")) { |
61 | 0 | mozilla::ipc::LogMessageForProtocol("POfflineCacheUpdateParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
62 | 0 | } |
63 | 0 | AUTO_PROFILER_LABEL("POfflineCacheUpdate::Msg_NotifyStateEvent", OTHER); |
64 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
65 | 0 | mozilla::ipc::LogicError("Transition error"); |
66 | 0 | } |
67 | 0 |
|
68 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
69 | 0 | return sendok__; |
70 | 0 | } |
71 | | |
72 | | auto POfflineCacheUpdateParent::SendAssociateDocuments( |
73 | | const nsCString& cacheGroupId, |
74 | | const nsCString& cacheClientId) -> bool |
75 | 0 | { |
76 | 0 | IPC::Message* msg__ = POfflineCacheUpdate::Msg_AssociateDocuments(Id()); |
77 | 0 |
|
78 | 0 | WriteIPDLParam(msg__, this, cacheGroupId); |
79 | 0 | // Sentinel = 'cacheGroupId' |
80 | 0 | (msg__)->WriteSentinel(2677625460); |
81 | 0 | WriteIPDLParam(msg__, this, cacheClientId); |
82 | 0 | // Sentinel = 'cacheClientId' |
83 | 0 | (msg__)->WriteSentinel(4020023385); |
84 | 0 |
|
85 | 0 |
|
86 | 0 |
|
87 | 0 |
|
88 | 0 | if (mozilla::ipc::LoggingEnabledFor("POfflineCacheUpdateParent")) { |
89 | 0 | mozilla::ipc::LogMessageForProtocol("POfflineCacheUpdateParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
90 | 0 | } |
91 | 0 | AUTO_PROFILER_LABEL("POfflineCacheUpdate::Msg_AssociateDocuments", OTHER); |
92 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
93 | 0 | mozilla::ipc::LogicError("Transition error"); |
94 | 0 | } |
95 | 0 |
|
96 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
97 | 0 | return sendok__; |
98 | 0 | } |
99 | | |
100 | | auto POfflineCacheUpdateParent::SendFinish( |
101 | | const bool& succeeded, |
102 | | const bool& isUpgrade) -> bool |
103 | 0 | { |
104 | 0 | IPC::Message* msg__ = POfflineCacheUpdate::Msg_Finish(Id()); |
105 | 0 |
|
106 | 0 | WriteIPDLParam(msg__, this, succeeded); |
107 | 0 | // Sentinel = 'succeeded' |
108 | 0 | (msg__)->WriteSentinel(1477863910); |
109 | 0 | WriteIPDLParam(msg__, this, isUpgrade); |
110 | 0 | // Sentinel = 'isUpgrade' |
111 | 0 | (msg__)->WriteSentinel(1409803445); |
112 | 0 |
|
113 | 0 |
|
114 | 0 |
|
115 | 0 |
|
116 | 0 | if (mozilla::ipc::LoggingEnabledFor("POfflineCacheUpdateParent")) { |
117 | 0 | mozilla::ipc::LogMessageForProtocol("POfflineCacheUpdateParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
118 | 0 | } |
119 | 0 | AUTO_PROFILER_LABEL("POfflineCacheUpdate::Msg_Finish", OTHER); |
120 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
121 | 0 | mozilla::ipc::LogicError("Transition error"); |
122 | 0 | } |
123 | 0 |
|
124 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
125 | 0 | return sendok__; |
126 | 0 | } |
127 | | |
128 | | auto POfflineCacheUpdateParent::RemoveManagee( |
129 | | int32_t aProtocolId, |
130 | | IProtocol* aListener) -> void |
131 | 0 | { |
132 | 0 | FatalError("unreached"); |
133 | 0 | return; |
134 | 0 | } |
135 | | |
136 | | auto POfflineCacheUpdateParent::OnMessageReceived(const Message& msg__) -> POfflineCacheUpdateParent::Result |
137 | 0 | { |
138 | 0 | switch ((msg__).type()) { |
139 | 0 | case POfflineCacheUpdate::Msg___delete____ID: |
140 | 0 | { |
141 | 0 | if (mozilla::ipc::LoggingEnabledFor("POfflineCacheUpdateParent")) { |
142 | 0 | mozilla::ipc::LogMessageForProtocol("POfflineCacheUpdateParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
143 | 0 | } |
144 | 0 | AUTO_PROFILER_LABEL("POfflineCacheUpdate::Msg___delete__", OTHER); |
145 | 0 |
|
146 | 0 | PickleIterator iter__(msg__); |
147 | 0 | POfflineCacheUpdateParent* actor; |
148 | 0 |
|
149 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(actor)))))) { |
150 | 0 | FatalError("Error deserializing 'POfflineCacheUpdateParent'"); |
151 | 0 | return MsgValueError; |
152 | 0 | } |
153 | 0 | if ((!((*((&(actor))))))) { |
154 | 0 | FatalError("Error deserializing 'POfflineCacheUpdateParent'"); |
155 | 0 | return MsgValueError; |
156 | 0 | } |
157 | 0 | // Sentinel = 'actor' |
158 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) { |
159 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'POfflineCacheUpdateParent'"); |
160 | 0 | return MsgValueError; |
161 | 0 | } |
162 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
163 | 0 | if ((!(StateTransition(true, (&(mLivenessState)))))) { |
164 | 0 | FatalError("Transition error"); |
165 | 0 | return MsgValueError; |
166 | 0 | } |
167 | 0 | if ((!(Recv__delete__()))) { |
168 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
169 | 0 | // Error handled in mozilla::ipc::IPCResult |
170 | 0 | return MsgProcessingError; |
171 | 0 | } |
172 | 0 | |
173 | 0 | |
174 | 0 | IProtocol* mgr = (actor)->Manager(); |
175 | 0 | (actor)->DestroySubtree(Deletion); |
176 | 0 | (actor)->DeallocSubtree(); |
177 | 0 | (mgr)->RemoveManagee(POfflineCacheUpdateMsgStart, actor); |
178 | 0 |
|
179 | 0 | return MsgProcessed; |
180 | 0 | } |
181 | 0 | default: |
182 | 0 | { |
183 | 0 | return MsgNotKnown; |
184 | 0 | } |
185 | 0 | } |
186 | 0 | } |
187 | | |
188 | | auto POfflineCacheUpdateParent::OnMessageReceived( |
189 | | const Message& msg__, |
190 | | Message*& reply__) -> POfflineCacheUpdateParent::Result |
191 | 0 | { |
192 | 0 | return MsgNotKnown; |
193 | 0 | } |
194 | | |
195 | | auto POfflineCacheUpdateParent::OnCallReceived( |
196 | | const Message& msg__, |
197 | | Message*& reply__) -> POfflineCacheUpdateParent::Result |
198 | 0 | { |
199 | 0 | MOZ_ASSERT_UNREACHABLE("message protocol not supported"); |
200 | 0 | return MsgNotKnown; |
201 | 0 | } |
202 | | |
203 | | auto POfflineCacheUpdateParent::GetProtocolTypeId() -> int32_t |
204 | 0 | { |
205 | 0 | return POfflineCacheUpdateMsgStart; |
206 | 0 | } |
207 | | |
208 | | auto POfflineCacheUpdateParent::DestroySubtree(ActorDestroyReason why) -> void |
209 | 0 | { |
210 | 0 | // Unregister from our manager. |
211 | 0 | Unregister(Id()); |
212 | 0 |
|
213 | 0 | // Reject owning pending responses. |
214 | 0 | (GetIPCChannel())->RejectPendingResponsesForActor(this); |
215 | 0 |
|
216 | 0 | // Finally, destroy "us". |
217 | 0 | ActorDestroy(why); |
218 | 0 | } |
219 | | |
220 | | auto POfflineCacheUpdateParent::DeallocSubtree() -> void |
221 | 0 | { |
222 | 0 | } |
223 | | |
224 | | |
225 | | |
226 | | } // namespace docshell |
227 | | } // namespace mozilla |
228 | | namespace mozilla { |
229 | | namespace ipc { |
230 | | auto IPDLParamTraits<mozilla::docshell::POfflineCacheUpdateParent>::Write( |
231 | | IPC::Message* aMsg, |
232 | | mozilla::ipc::IProtocol* aActor, |
233 | | const paramType& aVar) -> void |
234 | 0 | { |
235 | 0 | int32_t id; |
236 | 0 | if ((!(aVar))) { |
237 | 0 | id = 0; |
238 | 0 | } |
239 | 0 | else { |
240 | 0 | id = (aVar)->Id(); |
241 | 0 | if ((1) == (id)) { |
242 | 0 | (aActor)->FatalError("actor has been |delete|d"); |
243 | 0 | } |
244 | 0 | } |
245 | 0 | WriteIPDLParam(aMsg, aActor, id); |
246 | 0 | } |
247 | | |
248 | | auto IPDLParamTraits<mozilla::docshell::POfflineCacheUpdateParent>::Read( |
249 | | const IPC::Message* aMsg, |
250 | | PickleIterator* aIter, |
251 | | mozilla::ipc::IProtocol* aActor, |
252 | | paramType* aVar) -> bool |
253 | 0 | { |
254 | 0 | mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "POfflineCacheUpdate", POfflineCacheUpdateMsgStart); |
255 | 0 | if ((actor).isNothing()) { |
256 | 0 | return false; |
257 | 0 | } |
258 | 0 | |
259 | 0 | (*(aVar)) = static_cast<mozilla::docshell::POfflineCacheUpdateParent*>((actor).value()); |
260 | 0 | return true; |
261 | 0 | } |
262 | | |
263 | | } // namespace ipc |
264 | | } // namespace mozilla |