/work/obj-fuzz/ipc/ipdl/PTextureChild.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/layers/PTextureChild.h" |
8 | | #include "FrameMetrics.h" |
9 | | |
10 | | #include "mozilla/layers/PLayerTransactionChild.h" |
11 | | #include "mozilla/layers/PCompositorBridgeChild.h" |
12 | | #include "mozilla/layers/PImageBridgeChild.h" |
13 | | #include "mozilla/layers/PVideoBridgeChild.h" |
14 | | |
15 | | #include "nsIFile.h" |
16 | | #include "GeckoProfiler.h" |
17 | | |
18 | | namespace mozilla { |
19 | | namespace layers { |
20 | | |
21 | | |
22 | | auto PTextureChild::Recv__delete__() -> mozilla::ipc::IPCResult |
23 | 0 | { |
24 | 0 | return IPC_OK(); |
25 | 0 | } |
26 | | |
27 | | auto PTextureChild::ActorDestroy(ActorDestroyReason aWhy) -> void |
28 | 0 | { |
29 | 0 | } |
30 | | |
31 | | MOZ_IMPLICIT PTextureChild::PTextureChild() : |
32 | | mozilla::ipc::IProtocol(mozilla::ipc::ChildSide), |
33 | | mLivenessState(mozilla::ipc::LivenessState::Dead) |
34 | 0 | { |
35 | 0 | MOZ_COUNT_CTOR(PTextureChild); |
36 | 0 | } |
37 | | |
38 | | PTextureChild::~PTextureChild() |
39 | 0 | { |
40 | 0 | MOZ_COUNT_DTOR(PTextureChild); |
41 | 0 | } |
42 | | |
43 | | auto PTextureChild::SendDestroy() -> bool |
44 | 0 | { |
45 | 0 | IPC::Message* msg__ = PTexture::Msg_Destroy(Id()); |
46 | 0 |
|
47 | 0 |
|
48 | 0 |
|
49 | 0 |
|
50 | 0 |
|
51 | 0 | if (mozilla::ipc::LoggingEnabledFor("PTextureChild")) { |
52 | 0 | mozilla::ipc::LogMessageForProtocol("PTextureChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
53 | 0 | } |
54 | 0 | AUTO_PROFILER_LABEL("PTexture::Msg_Destroy", OTHER); |
55 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
56 | 0 | mozilla::ipc::LogicError("Transition error"); |
57 | 0 | } |
58 | 0 |
|
59 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
60 | 0 | return sendok__; |
61 | 0 | } |
62 | | |
63 | | auto PTextureChild::SendRecycleTexture(const TextureFlags& aTextureFlags) -> bool |
64 | 0 | { |
65 | 0 | IPC::Message* msg__ = PTexture::Msg_RecycleTexture(Id()); |
66 | 0 |
|
67 | 0 | WriteIPDLParam(msg__, this, aTextureFlags); |
68 | 0 | // Sentinel = 'aTextureFlags' |
69 | 0 | (msg__)->WriteSentinel(3005687826); |
70 | 0 |
|
71 | 0 |
|
72 | 0 |
|
73 | 0 |
|
74 | 0 | if (mozilla::ipc::LoggingEnabledFor("PTextureChild")) { |
75 | 0 | mozilla::ipc::LogMessageForProtocol("PTextureChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
76 | 0 | } |
77 | 0 | AUTO_PROFILER_LABEL("PTexture::Msg_RecycleTexture", OTHER); |
78 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
79 | 0 | mozilla::ipc::LogicError("Transition error"); |
80 | 0 | } |
81 | 0 |
|
82 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
83 | 0 | return sendok__; |
84 | 0 | } |
85 | | |
86 | | auto PTextureChild::RemoveManagee( |
87 | | int32_t aProtocolId, |
88 | | IProtocol* aListener) -> void |
89 | 0 | { |
90 | 0 | FatalError("unreached"); |
91 | 0 | return; |
92 | 0 | } |
93 | | |
94 | | auto PTextureChild::OnMessageReceived(const Message& msg__) -> PTextureChild::Result |
95 | 0 | { |
96 | 0 | switch ((msg__).type()) { |
97 | 0 | case PTexture::Msg___delete____ID: |
98 | 0 | { |
99 | 0 | if (mozilla::ipc::LoggingEnabledFor("PTextureChild")) { |
100 | 0 | mozilla::ipc::LogMessageForProtocol("PTextureChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
101 | 0 | } |
102 | 0 | AUTO_PROFILER_LABEL("PTexture::Msg___delete__", OTHER); |
103 | 0 |
|
104 | 0 | PickleIterator iter__(msg__); |
105 | 0 | PTextureChild* actor; |
106 | 0 |
|
107 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(actor)))))) { |
108 | 0 | FatalError("Error deserializing 'PTextureChild'"); |
109 | 0 | return MsgValueError; |
110 | 0 | } |
111 | 0 | if ((!((*((&(actor))))))) { |
112 | 0 | FatalError("Error deserializing 'PTextureChild'"); |
113 | 0 | return MsgValueError; |
114 | 0 | } |
115 | 0 | // Sentinel = 'actor' |
116 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) { |
117 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'PTextureChild'"); |
118 | 0 | return MsgValueError; |
119 | 0 | } |
120 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
121 | 0 | if ((!(StateTransition(true, (&(mLivenessState)))))) { |
122 | 0 | FatalError("Transition error"); |
123 | 0 | return MsgValueError; |
124 | 0 | } |
125 | 0 | if ((!(Recv__delete__()))) { |
126 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
127 | 0 | // Error handled in mozilla::ipc::IPCResult |
128 | 0 | return MsgProcessingError; |
129 | 0 | } |
130 | 0 | |
131 | 0 | |
132 | 0 | IProtocol* mgr = (actor)->Manager(); |
133 | 0 | (actor)->DestroySubtree(Deletion); |
134 | 0 | (actor)->DeallocSubtree(); |
135 | 0 | (mgr)->RemoveManagee(PTextureMsgStart, actor); |
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 PTextureChild::OnMessageReceived( |
147 | | const Message& msg__, |
148 | | Message*& reply__) -> PTextureChild::Result |
149 | 0 | { |
150 | 0 | return MsgNotKnown; |
151 | 0 | } |
152 | | |
153 | | auto PTextureChild::OnCallReceived( |
154 | | const Message& msg__, |
155 | | Message*& reply__) -> PTextureChild::Result |
156 | 0 | { |
157 | 0 | MOZ_ASSERT_UNREACHABLE("message protocol not supported"); |
158 | 0 | return MsgNotKnown; |
159 | 0 | } |
160 | | |
161 | | auto PTextureChild::GetProtocolTypeId() -> int32_t |
162 | 0 | { |
163 | 0 | return PTextureMsgStart; |
164 | 0 | } |
165 | | |
166 | | auto PTextureChild::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 PTextureChild::DeallocSubtree() -> void |
179 | 0 | { |
180 | 0 | } |
181 | | |
182 | | |
183 | | |
184 | | } // namespace layers |
185 | | } // namespace mozilla |
186 | | namespace mozilla { |
187 | | namespace ipc { |
188 | | auto IPDLParamTraits<mozilla::layers::PTextureChild>::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::layers::PTextureChild>::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, "PTexture", PTextureMsgStart); |
213 | 0 | if ((actor).isNothing()) { |
214 | 0 | return false; |
215 | 0 | } |
216 | 0 | |
217 | 0 | (*(aVar)) = static_cast<mozilla::layers::PTextureChild*>((actor).value()); |
218 | 0 | return true; |
219 | 0 | } |
220 | | |
221 | | } // namespace ipc |
222 | | } // namespace mozilla |