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