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