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