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