Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/PVsyncBridgeChild.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/gfx/PVsyncBridgeChild.h"
8
#include "mozilla/TimeStamp.h"
9
10
11
#include "nsIFile.h"
12
#include "GeckoProfiler.h"
13
14
namespace mozilla {
15
namespace gfx {
16
17
18
auto PVsyncBridgeChild::ActorDestroy(ActorDestroyReason aWhy) -> void
19
0
{
20
0
}
21
22
auto PVsyncBridgeChild::ProcessingError(
23
        Result aCode,
24
        const char* aReason) -> void
25
0
{
26
0
}
27
28
auto PVsyncBridgeChild::ShouldContinueFromReplyTimeout() -> bool
29
0
{
30
0
    return true;
31
0
}
32
33
auto PVsyncBridgeChild::EnteredCxxStack() -> void
34
0
{
35
0
}
36
37
auto PVsyncBridgeChild::ExitedCxxStack() -> void
38
0
{
39
0
}
40
41
auto PVsyncBridgeChild::EnteredCall() -> void
42
0
{
43
0
}
44
45
auto PVsyncBridgeChild::ExitedCall() -> void
46
0
{
47
0
}
48
49
MOZ_IMPLICIT PVsyncBridgeChild::PVsyncBridgeChild() :
50
    mozilla::ipc::IToplevelProtocol("PVsyncBridgeChild", PVsyncBridgeMsgStart, mozilla::ipc::ChildSide),
51
    mLivenessState(mozilla::ipc::LivenessState::Start)
52
0
{
53
0
    MOZ_COUNT_CTOR(PVsyncBridgeChild);
54
0
}
55
56
PVsyncBridgeChild::~PVsyncBridgeChild()
57
0
{
58
0
    MOZ_COUNT_DTOR(PVsyncBridgeChild);
59
0
}
60
61
auto PVsyncBridgeChild::SendNotifyVsync(
62
        const TimeStamp& vsyncTimeStamp,
63
        const LayersId& layersId) -> bool
64
0
{
65
0
    IPC::Message* msg__ = PVsyncBridge::Msg_NotifyVsync(MSG_ROUTING_CONTROL);
66
0
67
0
    WriteIPDLParam(msg__, this, vsyncTimeStamp);
68
0
    // Sentinel = 'vsyncTimeStamp'
69
0
    (msg__)->WriteSentinel(1510557875);
70
0
    WriteIPDLParam(msg__, this, layersId);
71
0
    // Sentinel = 'layersId'
72
0
    (msg__)->WriteSentinel(2382073245);
73
0
74
0
75
0
76
0
77
0
    if (mozilla::ipc::LoggingEnabledFor("PVsyncBridgeChild")) {
78
0
        mozilla::ipc::LogMessageForProtocol("PVsyncBridgeChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
79
0
    }
80
0
    AUTO_PROFILER_LABEL("PVsyncBridge::Msg_NotifyVsync", OTHER);
81
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
82
0
        mozilla::ipc::LogicError("Transition error");
83
0
    }
84
0
85
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
86
0
    return sendok__;
87
0
}
88
89
auto PVsyncBridgeChild::RemoveManagee(
90
        int32_t aProtocolId,
91
        IProtocol* aListener) -> void
92
0
{
93
0
    FatalError("unreached");
94
0
    return;
95
0
}
96
97
auto PVsyncBridgeChild::OnMessageReceived(const Message& msg__) -> PVsyncBridgeChild::Result
98
{
99
    switch ((msg__).type()) {
100
    default:
101
        {
102
            return MsgNotKnown;
103
        }
104
    case SHMEM_CREATED_MESSAGE_TYPE:
105
        {
106
            FatalError("this protocol tree does not use shmem");
107
            return MsgNotKnown;
108
        }
109
    case SHMEM_DESTROYED_MESSAGE_TYPE:
110
        {
111
            FatalError("this protocol tree does not use shmem");
112
            return MsgNotKnown;
113
        }
114
    }
115
}
116
117
auto PVsyncBridgeChild::OnMessageReceived(
118
        const Message& msg__,
119
        Message*& reply__) -> PVsyncBridgeChild::Result
120
0
{
121
0
    return MsgNotKnown;
122
0
}
123
124
auto PVsyncBridgeChild::OnCallReceived(
125
        const Message& msg__,
126
        Message*& reply__) -> PVsyncBridgeChild::Result
127
0
{
128
0
    MOZ_ASSERT_UNREACHABLE("message protocol not supported");
129
0
    return MsgNotKnown;
130
0
}
131
132
auto PVsyncBridgeChild::GetProtocolTypeId() -> int32_t
133
0
{
134
0
    return PVsyncBridgeMsgStart;
135
0
}
136
137
auto PVsyncBridgeChild::OnChannelClose() -> void
138
0
{
139
0
    DestroySubtree(NormalShutdown);
140
0
    DeallocSubtree();
141
0
    DeallocShmems();
142
0
    DeallocPVsyncBridgeChild();
143
0
}
144
145
auto PVsyncBridgeChild::OnChannelError() -> void
146
0
{
147
0
    DestroySubtree(AbnormalShutdown);
148
0
    DeallocSubtree();
149
0
    DeallocShmems();
150
0
    DeallocPVsyncBridgeChild();
151
0
}
152
153
auto PVsyncBridgeChild::DestroySubtree(ActorDestroyReason why) -> void
154
0
{
155
0
    // Reject owning pending responses.
156
0
    (GetIPCChannel())->RejectPendingResponsesForActor(this);
157
0
158
0
    // Finally, destroy "us".
159
0
    ActorDestroy(why);
160
0
}
161
162
auto PVsyncBridgeChild::DeallocSubtree() -> void
163
0
{
164
0
}
165
166
auto PVsyncBridgeChild::DeallocPVsyncBridgeChild() -> void
167
0
{
168
0
}
169
170
171
172
} // namespace gfx
173
} // namespace mozilla
174
namespace mozilla {
175
namespace ipc {
176
auto IPDLParamTraits<mozilla::gfx::PVsyncBridgeChild>::Write(
177
        IPC::Message* aMsg,
178
        mozilla::ipc::IProtocol* aActor,
179
        const paramType& aVar) -> void
180
0
{
181
0
    int32_t id;
182
0
    if ((!(aVar))) {
183
0
        id = 0;
184
0
    }
185
0
    else {
186
0
        id = (aVar)->Id();
187
0
        if ((1) == (id)) {
188
0
            (aActor)->FatalError("actor has been |delete|d");
189
0
        }
190
0
    }
191
0
    WriteIPDLParam(aMsg, aActor, id);
192
0
}
193
194
auto IPDLParamTraits<mozilla::gfx::PVsyncBridgeChild>::Read(
195
        const IPC::Message* aMsg,
196
        PickleIterator* aIter,
197
        mozilla::ipc::IProtocol* aActor,
198
        paramType* aVar) -> bool
199
0
{
200
0
    mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PVsyncBridge", PVsyncBridgeMsgStart);
201
0
    if ((actor).isNothing()) {
202
0
        return false;
203
0
    }
204
0
205
0
    (*(aVar)) = static_cast<mozilla::gfx::PVsyncBridgeChild*>((actor).value());
206
0
    return true;
207
0
}
208
209
} // namespace ipc
210
} // namespace mozilla