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