/work/obj-fuzz/ipc/ipdl/PTextureParent.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/PTextureParent.h" |
8 | | #include "FrameMetrics.h" |
9 | | |
10 | | #include "mozilla/layers/PLayerTransactionParent.h" |
11 | | #include "mozilla/layers/PCompositorBridgeParent.h" |
12 | | #include "mozilla/layers/PImageBridgeParent.h" |
13 | | #include "mozilla/layers/PVideoBridgeParent.h" |
14 | | |
15 | | #include "nsIFile.h" |
16 | | #include "GeckoProfiler.h" |
17 | | |
18 | | namespace mozilla { |
19 | | namespace layers { |
20 | | |
21 | | |
22 | | auto PTextureParent::ActorDestroy(ActorDestroyReason aWhy) -> void |
23 | 0 | { |
24 | 0 | } |
25 | | |
26 | | MOZ_IMPLICIT PTextureParent::PTextureParent() : |
27 | | mozilla::ipc::IProtocol(mozilla::ipc::ParentSide), |
28 | | mLivenessState(mozilla::ipc::LivenessState::Dead) |
29 | 0 | { |
30 | 0 | MOZ_COUNT_CTOR(PTextureParent); |
31 | 0 | } |
32 | | |
33 | | PTextureParent::~PTextureParent() |
34 | 0 | { |
35 | 0 | MOZ_COUNT_DTOR(PTextureParent); |
36 | 0 | } |
37 | | |
38 | | auto PTextureParent::Send__delete__(PTextureParent* actor) -> bool |
39 | 0 | { |
40 | 0 | if ((!(actor))) { |
41 | 0 | return false; |
42 | 0 | } |
43 | 0 | |
44 | 0 | IPC::Message* msg__ = PTexture::Msg___delete__((actor)->Id()); |
45 | 0 |
|
46 | 0 | MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param"); |
47 | 0 | WriteIPDLParam(msg__, actor, actor); |
48 | 0 | // Sentinel = 'actor' |
49 | 0 | (msg__)->WriteSentinel(875202478); |
50 | 0 |
|
51 | 0 |
|
52 | 0 |
|
53 | 0 | if (mozilla::ipc::LoggingEnabledFor("PTextureParent")) { |
54 | 0 | mozilla::ipc::LogMessageForProtocol("PTextureParent", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
55 | 0 | } |
56 | 0 | AUTO_PROFILER_LABEL("PTexture::Msg___delete__", OTHER); |
57 | 0 | if ((!(StateTransition(true, (&((actor)->mLivenessState)))))) { |
58 | 0 | mozilla::ipc::LogicError("Transition error"); |
59 | 0 | } |
60 | 0 |
|
61 | 0 | bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__); |
62 | 0 |
|
63 | 0 | IProtocol* mgr = (actor)->Manager(); |
64 | 0 | (actor)->DestroySubtree(Deletion); |
65 | 0 | (actor)->DeallocSubtree(); |
66 | 0 | (mgr)->RemoveManagee(PTextureMsgStart, actor); |
67 | 0 | return sendok__; |
68 | 0 | } |
69 | | |
70 | | auto PTextureParent::RemoveManagee( |
71 | | int32_t aProtocolId, |
72 | | IProtocol* aListener) -> void |
73 | 0 | { |
74 | 0 | FatalError("unreached"); |
75 | 0 | return; |
76 | 0 | } |
77 | | |
78 | | auto PTextureParent::OnMessageReceived(const Message& msg__) -> PTextureParent::Result |
79 | 0 | { |
80 | 0 | switch ((msg__).type()) { |
81 | 0 | case PTexture::Reply___delete____ID: |
82 | 0 | { |
83 | 0 | return MsgProcessed; |
84 | 0 | } |
85 | 0 | case PTexture::Msg_Destroy__ID: |
86 | 0 | { |
87 | 0 | if (mozilla::ipc::LoggingEnabledFor("PTextureParent")) { |
88 | 0 | mozilla::ipc::LogMessageForProtocol("PTextureParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
89 | 0 | } |
90 | 0 | AUTO_PROFILER_LABEL("PTexture::Msg_Destroy", OTHER); |
91 | 0 |
|
92 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
93 | 0 | FatalError("Transition error"); |
94 | 0 | return MsgValueError; |
95 | 0 | } |
96 | 0 | if ((!(RecvDestroy()))) { |
97 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
98 | 0 | // Error handled in mozilla::ipc::IPCResult |
99 | 0 | return MsgProcessingError; |
100 | 0 | } |
101 | 0 | |
102 | 0 | return MsgProcessed; |
103 | 0 | } |
104 | 0 | case PTexture::Msg_RecycleTexture__ID: |
105 | 0 | { |
106 | 0 | if (mozilla::ipc::LoggingEnabledFor("PTextureParent")) { |
107 | 0 | mozilla::ipc::LogMessageForProtocol("PTextureParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
108 | 0 | } |
109 | 0 | AUTO_PROFILER_LABEL("PTexture::Msg_RecycleTexture", OTHER); |
110 | 0 |
|
111 | 0 | PickleIterator iter__(msg__); |
112 | 0 | TextureFlags aTextureFlags; |
113 | 0 |
|
114 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aTextureFlags)))))) { |
115 | 0 | FatalError("Error deserializing 'TextureFlags'"); |
116 | 0 | return MsgValueError; |
117 | 0 | } |
118 | 0 | // Sentinel = 'aTextureFlags' |
119 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3005687826)))) { |
120 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'TextureFlags'"); |
121 | 0 | return MsgValueError; |
122 | 0 | } |
123 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
124 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
125 | 0 | FatalError("Transition error"); |
126 | 0 | return MsgValueError; |
127 | 0 | } |
128 | 0 | if ((!(RecvRecycleTexture(aTextureFlags)))) { |
129 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
130 | 0 | // Error handled in mozilla::ipc::IPCResult |
131 | 0 | return MsgProcessingError; |
132 | 0 | } |
133 | 0 | |
134 | 0 | return MsgProcessed; |
135 | 0 | } |
136 | 0 | default: |
137 | 0 | { |
138 | 0 | return MsgNotKnown; |
139 | 0 | } |
140 | 0 | } |
141 | 0 | } |
142 | | |
143 | | auto PTextureParent::OnMessageReceived( |
144 | | const Message& msg__, |
145 | | Message*& reply__) -> PTextureParent::Result |
146 | 0 | { |
147 | 0 | return MsgNotKnown; |
148 | 0 | } |
149 | | |
150 | | auto PTextureParent::OnCallReceived( |
151 | | const Message& msg__, |
152 | | Message*& reply__) -> PTextureParent::Result |
153 | 0 | { |
154 | 0 | MOZ_ASSERT_UNREACHABLE("message protocol not supported"); |
155 | 0 | return MsgNotKnown; |
156 | 0 | } |
157 | | |
158 | | auto PTextureParent::GetProtocolTypeId() -> int32_t |
159 | 0 | { |
160 | 0 | return PTextureMsgStart; |
161 | 0 | } |
162 | | |
163 | | auto PTextureParent::DestroySubtree(ActorDestroyReason why) -> void |
164 | 0 | { |
165 | 0 | // Unregister from our manager. |
166 | 0 | Unregister(Id()); |
167 | 0 |
|
168 | 0 | // Reject owning pending responses. |
169 | 0 | (GetIPCChannel())->RejectPendingResponsesForActor(this); |
170 | 0 |
|
171 | 0 | // Finally, destroy "us". |
172 | 0 | ActorDestroy(why); |
173 | 0 | } |
174 | | |
175 | | auto PTextureParent::DeallocSubtree() -> void |
176 | 0 | { |
177 | 0 | } |
178 | | |
179 | | |
180 | | |
181 | | } // namespace layers |
182 | | } // namespace mozilla |
183 | | namespace mozilla { |
184 | | namespace ipc { |
185 | | auto IPDLParamTraits<mozilla::layers::PTextureParent>::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::layers::PTextureParent>::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, "PTexture", PTextureMsgStart); |
210 | 0 | if ((actor).isNothing()) { |
211 | 0 | return false; |
212 | 0 | } |
213 | 0 | |
214 | 0 | (*(aVar)) = static_cast<mozilla::layers::PTextureParent*>((actor).value()); |
215 | 0 | return true; |
216 | 0 | } |
217 | | |
218 | | } // namespace ipc |
219 | | } // namespace mozilla |