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