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