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