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