/work/obj-fuzz/ipc/ipdl/PBackgroundFileRequestParent.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/dom/PBackgroundFileRequestParent.h" |
8 | | #include "ipc/IPCMessageUtils.h" |
9 | | |
10 | | #include "mozilla/dom/PBackgroundFileHandleParent.h" |
11 | | #include "mozilla/ipc/PPendingIPCBlobParent.h" |
12 | | |
13 | | #include "nsIFile.h" |
14 | | #include "GeckoProfiler.h" |
15 | | |
16 | | namespace mozilla { |
17 | | namespace dom { |
18 | | |
19 | | |
20 | | auto PBackgroundFileRequestParent::ActorDestroy(ActorDestroyReason aWhy) -> void |
21 | 0 | { |
22 | 0 | } |
23 | | |
24 | | MOZ_IMPLICIT PBackgroundFileRequestParent::PBackgroundFileRequestParent() : |
25 | | mozilla::ipc::IProtocol(mozilla::ipc::ParentSide), |
26 | | mLivenessState(mozilla::ipc::LivenessState::Dead) |
27 | 0 | { |
28 | 0 | MOZ_COUNT_CTOR(PBackgroundFileRequestParent); |
29 | 0 | } |
30 | | |
31 | | PBackgroundFileRequestParent::~PBackgroundFileRequestParent() |
32 | 0 | { |
33 | 0 | MOZ_COUNT_DTOR(PBackgroundFileRequestParent); |
34 | 0 | } |
35 | | |
36 | | auto PBackgroundFileRequestParent::Manager() const -> PBackgroundFileHandleParent* |
37 | 0 | { |
38 | 0 | return static_cast<PBackgroundFileHandleParent*>(IProtocol::Manager()); |
39 | 0 | } |
40 | | |
41 | | auto PBackgroundFileRequestParent::Send__delete__( |
42 | | PBackgroundFileRequestParent* actor, |
43 | | const FileRequestResponse& response) -> bool |
44 | 0 | { |
45 | 0 | if ((!(actor))) { |
46 | 0 | return false; |
47 | 0 | } |
48 | 0 | |
49 | 0 | IPC::Message* msg__ = PBackgroundFileRequest::Msg___delete__((actor)->Id()); |
50 | 0 |
|
51 | 0 | MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param"); |
52 | 0 | WriteIPDLParam(msg__, actor, actor); |
53 | 0 | // Sentinel = 'actor' |
54 | 0 | (msg__)->WriteSentinel(875202478); |
55 | 0 | WriteIPDLParam(msg__, actor, response); |
56 | 0 | // Sentinel = 'response' |
57 | 0 | (msg__)->WriteSentinel(2396115421); |
58 | 0 |
|
59 | 0 |
|
60 | 0 |
|
61 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundFileRequestParent")) { |
62 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundFileRequestParent", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
63 | 0 | } |
64 | 0 | AUTO_PROFILER_LABEL("PBackgroundFileRequest::Msg___delete__", OTHER); |
65 | 0 | if ((!(StateTransition(true, (&((actor)->mLivenessState)))))) { |
66 | 0 | mozilla::ipc::LogicError("Transition error"); |
67 | 0 | } |
68 | 0 |
|
69 | 0 | bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__); |
70 | 0 |
|
71 | 0 | IProtocol* mgr = (actor)->Manager(); |
72 | 0 | (actor)->DestroySubtree(Deletion); |
73 | 0 | (actor)->DeallocSubtree(); |
74 | 0 | (mgr)->RemoveManagee(PBackgroundFileRequestMsgStart, actor); |
75 | 0 | return sendok__; |
76 | 0 | } |
77 | | |
78 | | auto PBackgroundFileRequestParent::SendProgress( |
79 | | const uint64_t& progress, |
80 | | const uint64_t& progressMax) -> bool |
81 | 0 | { |
82 | 0 | IPC::Message* msg__ = PBackgroundFileRequest::Msg_Progress(Id()); |
83 | 0 |
|
84 | 0 | WriteIPDLParam(msg__, this, progress); |
85 | 0 | // Sentinel = 'progress' |
86 | 0 | (msg__)->WriteSentinel(858119353); |
87 | 0 | WriteIPDLParam(msg__, this, progressMax); |
88 | 0 | // Sentinel = 'progressMax' |
89 | 0 | (msg__)->WriteSentinel(2530734978); |
90 | 0 |
|
91 | 0 |
|
92 | 0 |
|
93 | 0 |
|
94 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundFileRequestParent")) { |
95 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundFileRequestParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
96 | 0 | } |
97 | 0 | AUTO_PROFILER_LABEL("PBackgroundFileRequest::Msg_Progress", OTHER); |
98 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
99 | 0 | mozilla::ipc::LogicError("Transition error"); |
100 | 0 | } |
101 | 0 |
|
102 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
103 | 0 | return sendok__; |
104 | 0 | } |
105 | | |
106 | | auto PBackgroundFileRequestParent::RemoveManagee( |
107 | | int32_t aProtocolId, |
108 | | IProtocol* aListener) -> void |
109 | 0 | { |
110 | 0 | FatalError("unreached"); |
111 | 0 | return; |
112 | 0 | } |
113 | | |
114 | | auto PBackgroundFileRequestParent::OnMessageReceived(const Message& msg__) -> PBackgroundFileRequestParent::Result |
115 | | { |
116 | | switch ((msg__).type()) { |
117 | | case PBackgroundFileRequest::Reply___delete____ID: |
118 | | { |
119 | | return MsgProcessed; |
120 | | } |
121 | | default: |
122 | | { |
123 | | return MsgNotKnown; |
124 | | } |
125 | | } |
126 | | } |
127 | | |
128 | | auto PBackgroundFileRequestParent::OnMessageReceived( |
129 | | const Message& msg__, |
130 | | Message*& reply__) -> PBackgroundFileRequestParent::Result |
131 | 0 | { |
132 | 0 | return MsgNotKnown; |
133 | 0 | } |
134 | | |
135 | | auto PBackgroundFileRequestParent::OnCallReceived( |
136 | | const Message& msg__, |
137 | | Message*& reply__) -> PBackgroundFileRequestParent::Result |
138 | 0 | { |
139 | 0 | MOZ_ASSERT_UNREACHABLE("message protocol not supported"); |
140 | 0 | return MsgNotKnown; |
141 | 0 | } |
142 | | |
143 | | auto PBackgroundFileRequestParent::GetProtocolTypeId() -> int32_t |
144 | 0 | { |
145 | 0 | return PBackgroundFileRequestMsgStart; |
146 | 0 | } |
147 | | |
148 | | auto PBackgroundFileRequestParent::DestroySubtree(ActorDestroyReason why) -> void |
149 | 0 | { |
150 | 0 | // Unregister from our manager. |
151 | 0 | Unregister(Id()); |
152 | 0 |
|
153 | 0 | // Reject owning pending responses. |
154 | 0 | (GetIPCChannel())->RejectPendingResponsesForActor(this); |
155 | 0 |
|
156 | 0 | // Finally, destroy "us". |
157 | 0 | ActorDestroy(why); |
158 | 0 | } |
159 | | |
160 | | auto PBackgroundFileRequestParent::DeallocSubtree() -> void |
161 | 0 | { |
162 | 0 | } |
163 | | |
164 | | |
165 | | |
166 | | } // namespace dom |
167 | | } // namespace mozilla |
168 | | namespace mozilla { |
169 | | namespace ipc { |
170 | | auto IPDLParamTraits<mozilla::dom::PBackgroundFileRequestParent>::Write( |
171 | | IPC::Message* aMsg, |
172 | | mozilla::ipc::IProtocol* aActor, |
173 | | const paramType& aVar) -> void |
174 | 0 | { |
175 | 0 | int32_t id; |
176 | 0 | if ((!(aVar))) { |
177 | 0 | id = 0; |
178 | 0 | } |
179 | 0 | else { |
180 | 0 | id = (aVar)->Id(); |
181 | 0 | if ((1) == (id)) { |
182 | 0 | (aActor)->FatalError("actor has been |delete|d"); |
183 | 0 | } |
184 | 0 | } |
185 | 0 | WriteIPDLParam(aMsg, aActor, id); |
186 | 0 | } |
187 | | |
188 | | auto IPDLParamTraits<mozilla::dom::PBackgroundFileRequestParent>::Read( |
189 | | const IPC::Message* aMsg, |
190 | | PickleIterator* aIter, |
191 | | mozilla::ipc::IProtocol* aActor, |
192 | | paramType* aVar) -> bool |
193 | 0 | { |
194 | 0 | mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PBackgroundFileRequest", PBackgroundFileRequestMsgStart); |
195 | 0 | if ((actor).isNothing()) { |
196 | 0 | return false; |
197 | 0 | } |
198 | 0 | |
199 | 0 | (*(aVar)) = static_cast<mozilla::dom::PBackgroundFileRequestParent*>((actor).value()); |
200 | 0 | return true; |
201 | 0 | } |
202 | | |
203 | | } // namespace ipc |
204 | | } // namespace mozilla |