Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/PQuotaRequestParent.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/quota/PQuotaRequestParent.h"
8
9
#include "mozilla/dom/quota/PQuotaParent.h"
10
11
#include "nsIFile.h"
12
#include "GeckoProfiler.h"
13
14
namespace mozilla {
15
namespace dom {
16
namespace quota {
17
18
19
auto PQuotaRequestParent::ActorDestroy(ActorDestroyReason aWhy) -> void
20
0
{
21
0
}
22
23
MOZ_IMPLICIT PQuotaRequestParent::PQuotaRequestParent() :
24
    mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
25
    mLivenessState(mozilla::ipc::LivenessState::Dead)
26
0
{
27
0
    MOZ_COUNT_CTOR(PQuotaRequestParent);
28
0
}
29
30
PQuotaRequestParent::~PQuotaRequestParent()
31
0
{
32
0
    MOZ_COUNT_DTOR(PQuotaRequestParent);
33
0
}
34
35
auto PQuotaRequestParent::Manager() const -> PQuotaParent*
36
0
{
37
0
    return static_cast<PQuotaParent*>(IProtocol::Manager());
38
0
}
39
40
auto PQuotaRequestParent::Send__delete__(
41
        PQuotaRequestParent* actor,
42
        const RequestResponse& response) -> bool
43
0
{
44
0
    if ((!(actor))) {
45
0
        return false;
46
0
    }
47
0
48
0
    IPC::Message* msg__ = PQuotaRequest::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, response);
55
0
    // Sentinel = 'response'
56
0
    (msg__)->WriteSentinel(2396115421);
57
0
58
0
59
0
60
0
    if (mozilla::ipc::LoggingEnabledFor("PQuotaRequestParent")) {
61
0
        mozilla::ipc::LogMessageForProtocol("PQuotaRequestParent", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
62
0
    }
63
0
    AUTO_PROFILER_LABEL("PQuotaRequest::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(PQuotaRequestMsgStart, actor);
74
0
    return sendok__;
75
0
}
76
77
auto PQuotaRequestParent::RemoveManagee(
78
        int32_t aProtocolId,
79
        IProtocol* aListener) -> void
80
0
{
81
0
    FatalError("unreached");
82
0
    return;
83
0
}
84
85
auto PQuotaRequestParent::OnMessageReceived(const Message& msg__) -> PQuotaRequestParent::Result
86
{
87
    switch ((msg__).type()) {
88
    case PQuotaRequest::Reply___delete____ID:
89
        {
90
            return MsgProcessed;
91
        }
92
    default:
93
        {
94
            return MsgNotKnown;
95
        }
96
    }
97
}
98
99
auto PQuotaRequestParent::OnMessageReceived(
100
        const Message& msg__,
101
        Message*& reply__) -> PQuotaRequestParent::Result
102
0
{
103
0
    return MsgNotKnown;
104
0
}
105
106
auto PQuotaRequestParent::OnCallReceived(
107
        const Message& msg__,
108
        Message*& reply__) -> PQuotaRequestParent::Result
109
0
{
110
0
    MOZ_ASSERT_UNREACHABLE("message protocol not supported");
111
0
    return MsgNotKnown;
112
0
}
113
114
auto PQuotaRequestParent::GetProtocolTypeId() -> int32_t
115
0
{
116
0
    return PQuotaRequestMsgStart;
117
0
}
118
119
auto PQuotaRequestParent::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 PQuotaRequestParent::DeallocSubtree() -> void
132
0
{
133
0
}
134
135
136
137
} // namespace quota
138
} // namespace dom
139
} // namespace mozilla
140
namespace mozilla {
141
namespace ipc {
142
auto IPDLParamTraits<mozilla::dom::quota::PQuotaRequestParent>::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::quota::PQuotaRequestParent>::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, "PQuotaRequest", PQuotaRequestMsgStart);
167
0
    if ((actor).isNothing()) {
168
0
        return false;
169
0
    }
170
0
171
0
    (*(aVar)) = static_cast<mozilla::dom::quota::PQuotaRequestParent*>((actor).value());
172
0
    return true;
173
0
}
174
175
} // namespace ipc
176
} // namespace mozilla