Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/PWebBrowserPersistSerializeParent.h"
8 :
9 : #include "mozilla/PWebBrowserPersistDocumentParent.h"
10 :
11 : #include "nsIFile.h"
12 : #include "GeckoProfiler.h"
13 :
14 : namespace mozilla {
15 :
16 :
17 0 : auto PWebBrowserPersistSerializeParent::Recv__delete__(
18 : const nsCString& aContentType,
19 : const nsresult& aStatus) -> mozilla::ipc::IPCResult
20 : {
21 0 : return IPC_OK();
22 : }
23 :
24 :
25 0 : MOZ_IMPLICIT PWebBrowserPersistSerializeParent::PWebBrowserPersistSerializeParent() :
26 : mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
27 0 : mState(PWebBrowserPersistSerialize::__Dead)
28 : {
29 0 : MOZ_COUNT_CTOR(PWebBrowserPersistSerializeParent);
30 0 : }
31 :
32 0 : PWebBrowserPersistSerializeParent::~PWebBrowserPersistSerializeParent()
33 : {
34 0 : MOZ_COUNT_DTOR(PWebBrowserPersistSerializeParent);
35 0 : }
36 :
37 0 : auto PWebBrowserPersistSerializeParent::Manager() const -> PWebBrowserPersistDocumentParent*
38 : {
39 0 : return static_cast<PWebBrowserPersistDocumentParent*>(IProtocol::Manager());
40 : }
41 :
42 0 : auto PWebBrowserPersistSerializeParent::RemoveManagee(
43 : int32_t aProtocolId,
44 : ProtocolBase* aListener) -> void
45 : {
46 0 : FatalError("unreached");
47 0 : return;
48 : }
49 :
50 0 : auto PWebBrowserPersistSerializeParent::OnMessageReceived(const Message& msg__) -> PWebBrowserPersistSerializeParent::Result
51 : {
52 0 : switch ((msg__).type()) {
53 : case PWebBrowserPersistSerialize::Msg_WriteData__ID:
54 : {
55 0 : if (mozilla::ipc::LoggingEnabledFor("PWebBrowserPersistSerializeParent")) {
56 0 : mozilla::ipc::LogMessageForProtocol("PWebBrowserPersistSerializeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
57 : }
58 0 : AUTO_PROFILER_LABEL("PWebBrowserPersistSerialize::Msg_WriteData", OTHER);
59 :
60 0 : PickleIterator iter__(msg__);
61 0 : nsTArray<uint8_t> aData;
62 :
63 0 : if ((!(Read((&(aData)), (&(msg__)), (&(iter__)))))) {
64 0 : FatalError("Error deserializing 'nsTArray'");
65 0 : return MsgValueError;
66 : }
67 : // Sentinel = 'aData'
68 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3285075324)))) {
69 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'");
70 0 : return MsgValueError;
71 : }
72 0 : (msg__).EndRead(iter__, (msg__).type());
73 0 : PWebBrowserPersistSerialize::Transition(PWebBrowserPersistSerialize::Msg_WriteData__ID, (&(mState)));
74 0 : if ((!(RecvWriteData(mozilla::Move(aData))))) {
75 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
76 : // Error handled in mozilla::ipc::IPCResult
77 0 : return MsgProcessingError;
78 : }
79 :
80 0 : return MsgProcessed;
81 : }
82 : case PWebBrowserPersistSerialize::Msg___delete____ID:
83 : {
84 0 : if (mozilla::ipc::LoggingEnabledFor("PWebBrowserPersistSerializeParent")) {
85 0 : mozilla::ipc::LogMessageForProtocol("PWebBrowserPersistSerializeParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
86 : }
87 0 : AUTO_PROFILER_LABEL("PWebBrowserPersistSerialize::Msg___delete__", OTHER);
88 :
89 0 : PickleIterator iter__(msg__);
90 : PWebBrowserPersistSerializeParent* actor;
91 0 : nsCString aContentType;
92 : nsresult aStatus;
93 :
94 0 : if ((!(Read((&(actor)), (&(msg__)), (&(iter__)), false)))) {
95 0 : FatalError("Error deserializing 'PWebBrowserPersistSerializeParent'");
96 0 : return MsgValueError;
97 : }
98 : // Sentinel = 'actor'
99 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
100 0 : mozilla::ipc::SentinelReadError("Error deserializing 'PWebBrowserPersistSerializeParent'");
101 0 : return MsgValueError;
102 : }
103 0 : if ((!(Read((&(aContentType)), (&(msg__)), (&(iter__)))))) {
104 0 : FatalError("Error deserializing 'nsCString'");
105 0 : return MsgValueError;
106 : }
107 : // Sentinel = 'aContentType'
108 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 694407768)))) {
109 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
110 0 : return MsgValueError;
111 : }
112 0 : if ((!(Read((&(aStatus)), (&(msg__)), (&(iter__)))))) {
113 0 : FatalError("Error deserializing 'nsresult'");
114 0 : return MsgValueError;
115 : }
116 : // Sentinel = 'aStatus'
117 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 236002576)))) {
118 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
119 0 : return MsgValueError;
120 : }
121 0 : (msg__).EndRead(iter__, (msg__).type());
122 0 : PWebBrowserPersistSerialize::Transition(PWebBrowserPersistSerialize::Msg___delete____ID, (&(mState)));
123 0 : if ((!(Recv__delete__(mozilla::Move(aContentType), mozilla::Move(aStatus))))) {
124 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
125 : // Error handled in mozilla::ipc::IPCResult
126 0 : return MsgProcessingError;
127 : }
128 :
129 :
130 0 : IProtocol* mgr = (actor)->Manager();
131 0 : (actor)->DestroySubtree(Deletion);
132 0 : (actor)->DeallocSubtree();
133 0 : (mgr)->RemoveManagee(PWebBrowserPersistSerializeMsgStart, actor);
134 :
135 0 : return MsgProcessed;
136 : }
137 : default:
138 : {
139 0 : return MsgNotKnown;
140 : }
141 : }
142 : }
143 :
144 0 : auto PWebBrowserPersistSerializeParent::OnMessageReceived(
145 : const Message& msg__,
146 : Message*& reply__) -> PWebBrowserPersistSerializeParent::Result
147 : {
148 0 : return MsgNotKnown;
149 : }
150 :
151 0 : auto PWebBrowserPersistSerializeParent::OnCallReceived(
152 : const Message& msg__,
153 : Message*& reply__) -> PWebBrowserPersistSerializeParent::Result
154 : {
155 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
156 : return MsgNotKnown;
157 : }
158 :
159 0 : auto PWebBrowserPersistSerializeParent::GetProtocolTypeId() -> int32_t
160 : {
161 0 : return PWebBrowserPersistSerializeMsgStart;
162 : }
163 :
164 0 : auto PWebBrowserPersistSerializeParent::ProtocolName() const -> const char*
165 : {
166 0 : return "PWebBrowserPersistSerializeParent";
167 : }
168 :
169 0 : auto PWebBrowserPersistSerializeParent::DestroySubtree(ActorDestroyReason why) -> void
170 : {
171 : // Unregister from our manager.
172 0 : Unregister(Id());
173 :
174 : // Reject owning pending promises.
175 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
176 :
177 : // Finally, destroy "us".
178 0 : ActorDestroy(why);
179 0 : }
180 :
181 0 : auto PWebBrowserPersistSerializeParent::DeallocSubtree() -> void
182 : {
183 0 : }
184 :
185 0 : auto PWebBrowserPersistSerializeParent::Write(
186 : const PWebBrowserPersistSerializeParent* v__,
187 : Message* msg__,
188 : bool nullable__) -> void
189 : {
190 : int32_t id;
191 0 : if ((!(v__))) {
192 0 : if ((!(nullable__))) {
193 0 : FatalError("NULL actor value passed to non-nullable param");
194 : }
195 0 : id = 0;
196 : }
197 : else {
198 0 : id = (v__)->Id();
199 0 : if ((1) == (id)) {
200 0 : FatalError("actor has been |delete|d");
201 : }
202 : }
203 :
204 0 : Write(id, msg__);
205 0 : }
206 :
207 0 : auto PWebBrowserPersistSerializeParent::Read(
208 : PWebBrowserPersistSerializeParent** v__,
209 : const Message* msg__,
210 : PickleIterator* iter__,
211 : bool nullable__) -> bool
212 : {
213 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PWebBrowserPersistSerialize", PWebBrowserPersistSerializeMsgStart);
214 0 : if ((actor).isNothing()) {
215 0 : return false;
216 : }
217 :
218 0 : (*(v__)) = static_cast<PWebBrowserPersistSerializeParent*>((actor).value());
219 0 : return true;
220 : }
221 :
222 :
223 :
224 : } // namespace mozilla
|