Coverage Report

Created: 2018-09-25 14:53

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