Coverage Report

Created: 2018-09-25 14:53

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