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