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