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