/work/obj-fuzz/ipc/ipdl/PPresentationRequestChild.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/PPresentationRequestChild.h" |
8 | | |
9 | | #include "mozilla/dom/PPresentationChild.h" |
10 | | |
11 | | #include "nsIFile.h" |
12 | | #include "GeckoProfiler.h" |
13 | | |
14 | | namespace mozilla { |
15 | | namespace dom { |
16 | | |
17 | | |
18 | | auto PPresentationRequestChild::Recv__delete__(const nsresult& result) -> mozilla::ipc::IPCResult |
19 | 0 | { |
20 | 0 | return IPC_OK(); |
21 | 0 | } |
22 | | |
23 | | auto PPresentationRequestChild::ActorDestroy(ActorDestroyReason aWhy) -> void |
24 | 0 | { |
25 | 0 | } |
26 | | |
27 | | MOZ_IMPLICIT PPresentationRequestChild::PPresentationRequestChild() : |
28 | | mozilla::ipc::IProtocol(mozilla::ipc::ChildSide), |
29 | | mLivenessState(mozilla::ipc::LivenessState::Dead) |
30 | 0 | { |
31 | 0 | MOZ_COUNT_CTOR(PPresentationRequestChild); |
32 | 0 | } |
33 | | |
34 | | PPresentationRequestChild::~PPresentationRequestChild() |
35 | 0 | { |
36 | 0 | MOZ_COUNT_DTOR(PPresentationRequestChild); |
37 | 0 | } |
38 | | |
39 | | auto PPresentationRequestChild::Manager() const -> PPresentationChild* |
40 | 0 | { |
41 | 0 | return static_cast<PPresentationChild*>(IProtocol::Manager()); |
42 | 0 | } |
43 | | |
44 | | auto PPresentationRequestChild::RemoveManagee( |
45 | | int32_t aProtocolId, |
46 | | IProtocol* aListener) -> void |
47 | 0 | { |
48 | 0 | FatalError("unreached"); |
49 | 0 | return; |
50 | 0 | } |
51 | | |
52 | | auto PPresentationRequestChild::OnMessageReceived(const Message& msg__) -> PPresentationRequestChild::Result |
53 | 0 | { |
54 | 0 | switch ((msg__).type()) { |
55 | 0 | case PPresentationRequest::Msg___delete____ID: |
56 | 0 | { |
57 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPresentationRequestChild")) { |
58 | 0 | mozilla::ipc::LogMessageForProtocol("PPresentationRequestChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
59 | 0 | } |
60 | 0 | AUTO_PROFILER_LABEL("PPresentationRequest::Msg___delete__", OTHER); |
61 | 0 |
|
62 | 0 | PickleIterator iter__(msg__); |
63 | 0 | PPresentationRequestChild* actor; |
64 | 0 | nsresult result; |
65 | 0 |
|
66 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(actor)))))) { |
67 | 0 | FatalError("Error deserializing 'PPresentationRequestChild'"); |
68 | 0 | return MsgValueError; |
69 | 0 | } |
70 | 0 | if ((!((*((&(actor))))))) { |
71 | 0 | FatalError("Error deserializing 'PPresentationRequestChild'"); |
72 | 0 | return MsgValueError; |
73 | 0 | } |
74 | 0 | // Sentinel = 'actor' |
75 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) { |
76 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'PPresentationRequestChild'"); |
77 | 0 | return MsgValueError; |
78 | 0 | } |
79 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(result)))))) { |
80 | 0 | FatalError("Error deserializing 'nsresult'"); |
81 | 0 | return MsgValueError; |
82 | 0 | } |
83 | 0 | // Sentinel = 'result' |
84 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3991766165)))) { |
85 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'"); |
86 | 0 | return MsgValueError; |
87 | 0 | } |
88 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
89 | 0 | if ((!(StateTransition(true, (&(mLivenessState)))))) { |
90 | 0 | FatalError("Transition error"); |
91 | 0 | return MsgValueError; |
92 | 0 | } |
93 | 0 | if ((!(Recv__delete__(result)))) { |
94 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
95 | 0 | // Error handled in mozilla::ipc::IPCResult |
96 | 0 | return MsgProcessingError; |
97 | 0 | } |
98 | 0 | |
99 | 0 | |
100 | 0 | IProtocol* mgr = (actor)->Manager(); |
101 | 0 | (actor)->DestroySubtree(Deletion); |
102 | 0 | (actor)->DeallocSubtree(); |
103 | 0 | (mgr)->RemoveManagee(PPresentationRequestMsgStart, actor); |
104 | 0 |
|
105 | 0 | return MsgProcessed; |
106 | 0 | } |
107 | 0 | case PPresentationRequest::Msg_NotifyRequestUrlSelected__ID: |
108 | 0 | { |
109 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPresentationRequestChild")) { |
110 | 0 | mozilla::ipc::LogMessageForProtocol("PPresentationRequestChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
111 | 0 | } |
112 | 0 | AUTO_PROFILER_LABEL("PPresentationRequest::Msg_NotifyRequestUrlSelected", OTHER); |
113 | 0 |
|
114 | 0 | PickleIterator iter__(msg__); |
115 | 0 | nsString aUrl; |
116 | 0 |
|
117 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aUrl)))))) { |
118 | 0 | FatalError("Error deserializing 'nsString'"); |
119 | 0 | return MsgValueError; |
120 | 0 | } |
121 | 0 | // Sentinel = 'aUrl' |
122 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2043506200)))) { |
123 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsString'"); |
124 | 0 | return MsgValueError; |
125 | 0 | } |
126 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
127 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
128 | 0 | FatalError("Transition error"); |
129 | 0 | return MsgValueError; |
130 | 0 | } |
131 | 0 | if ((!(RecvNotifyRequestUrlSelected(aUrl)))) { |
132 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
133 | 0 | // Error handled in mozilla::ipc::IPCResult |
134 | 0 | return MsgProcessingError; |
135 | 0 | } |
136 | 0 | |
137 | 0 | return MsgProcessed; |
138 | 0 | } |
139 | 0 | default: |
140 | 0 | { |
141 | 0 | return MsgNotKnown; |
142 | 0 | } |
143 | 0 | } |
144 | 0 | } |
145 | | |
146 | | auto PPresentationRequestChild::OnMessageReceived( |
147 | | const Message& msg__, |
148 | | Message*& reply__) -> PPresentationRequestChild::Result |
149 | 0 | { |
150 | 0 | return MsgNotKnown; |
151 | 0 | } |
152 | | |
153 | | auto PPresentationRequestChild::OnCallReceived( |
154 | | const Message& msg__, |
155 | | Message*& reply__) -> PPresentationRequestChild::Result |
156 | 0 | { |
157 | 0 | MOZ_ASSERT_UNREACHABLE("message protocol not supported"); |
158 | 0 | return MsgNotKnown; |
159 | 0 | } |
160 | | |
161 | | auto PPresentationRequestChild::GetProtocolTypeId() -> int32_t |
162 | 0 | { |
163 | 0 | return PPresentationRequestMsgStart; |
164 | 0 | } |
165 | | |
166 | | auto PPresentationRequestChild::DestroySubtree(ActorDestroyReason why) -> void |
167 | 0 | { |
168 | 0 | // Unregister from our manager. |
169 | 0 | Unregister(Id()); |
170 | 0 |
|
171 | 0 | // Reject owning pending responses. |
172 | 0 | (GetIPCChannel())->RejectPendingResponsesForActor(this); |
173 | 0 |
|
174 | 0 | // Finally, destroy "us". |
175 | 0 | ActorDestroy(why); |
176 | 0 | } |
177 | | |
178 | | auto PPresentationRequestChild::DeallocSubtree() -> void |
179 | 0 | { |
180 | 0 | } |
181 | | |
182 | | |
183 | | |
184 | | } // namespace dom |
185 | | } // namespace mozilla |
186 | | namespace mozilla { |
187 | | namespace ipc { |
188 | | auto IPDLParamTraits<mozilla::dom::PPresentationRequestChild>::Write( |
189 | | IPC::Message* aMsg, |
190 | | mozilla::ipc::IProtocol* aActor, |
191 | | const paramType& aVar) -> void |
192 | 0 | { |
193 | 0 | int32_t id; |
194 | 0 | if ((!(aVar))) { |
195 | 0 | id = 0; |
196 | 0 | } |
197 | 0 | else { |
198 | 0 | id = (aVar)->Id(); |
199 | 0 | if ((1) == (id)) { |
200 | 0 | (aActor)->FatalError("actor has been |delete|d"); |
201 | 0 | } |
202 | 0 | } |
203 | 0 | WriteIPDLParam(aMsg, aActor, id); |
204 | 0 | } |
205 | | |
206 | | auto IPDLParamTraits<mozilla::dom::PPresentationRequestChild>::Read( |
207 | | const IPC::Message* aMsg, |
208 | | PickleIterator* aIter, |
209 | | mozilla::ipc::IProtocol* aActor, |
210 | | paramType* aVar) -> bool |
211 | 0 | { |
212 | 0 | mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PPresentationRequest", PPresentationRequestMsgStart); |
213 | 0 | if ((actor).isNothing()) { |
214 | 0 | return false; |
215 | 0 | } |
216 | 0 | |
217 | 0 | (*(aVar)) = static_cast<mozilla::dom::PPresentationRequestChild*>((actor).value()); |
218 | 0 | return true; |
219 | 0 | } |
220 | | |
221 | | } // namespace ipc |
222 | | } // namespace mozilla |