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