Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/PPluginSurfaceParent.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/plugins/PPluginSurfaceParent.h"
8
9
#include "mozilla/plugins/PPluginInstanceParent.h"
10
11
#include "nsIFile.h"
12
#include "GeckoProfiler.h"
13
14
namespace mozilla {
15
namespace plugins {
16
17
18
auto PPluginSurfaceParent::Recv__delete__() -> mozilla::ipc::IPCResult
19
0
{
20
0
    return IPC_OK();
21
0
}
22
23
auto PPluginSurfaceParent::ActorDestroy(ActorDestroyReason aWhy) -> void
24
0
{
25
0
}
26
27
MOZ_IMPLICIT PPluginSurfaceParent::PPluginSurfaceParent() :
28
    mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
29
    mLivenessState(mozilla::ipc::LivenessState::Dead)
30
0
{
31
0
    MOZ_COUNT_CTOR(PPluginSurfaceParent);
32
0
}
33
34
PPluginSurfaceParent::~PPluginSurfaceParent()
35
0
{
36
0
    MOZ_COUNT_DTOR(PPluginSurfaceParent);
37
0
}
38
39
auto PPluginSurfaceParent::Manager() const -> PPluginInstanceParent*
40
0
{
41
0
    return static_cast<PPluginInstanceParent*>(IProtocol::Manager());
42
0
}
43
44
auto PPluginSurfaceParent::RemoveManagee(
45
        int32_t aProtocolId,
46
        IProtocol* aListener) -> void
47
0
{
48
0
    FatalError("unreached");
49
0
    return;
50
0
}
51
52
auto PPluginSurfaceParent::OnMessageReceived(const Message& msg__) -> PPluginSurfaceParent::Result
53
0
{
54
0
    switch ((msg__).type()) {
55
0
    case PPluginSurface::Msg___delete____ID:
56
0
        {
57
0
            if (mozilla::ipc::LoggingEnabledFor("PPluginSurfaceParent")) {
58
0
                mozilla::ipc::LogMessageForProtocol("PPluginSurfaceParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
59
0
            }
60
0
            AUTO_PROFILER_LABEL("PPluginSurface::Msg___delete__", OTHER);
61
0
62
0
            PickleIterator iter__(msg__);
63
0
            PPluginSurfaceParent* actor;
64
0
65
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(actor)))))) {
66
0
                FatalError("Error deserializing 'PPluginSurfaceParent'");
67
0
                return MsgValueError;
68
0
            }
69
0
            if ((!((*((&(actor))))))) {
70
0
                FatalError("Error deserializing 'PPluginSurfaceParent'");
71
0
                return MsgValueError;
72
0
            }
73
0
            // Sentinel = 'actor'
74
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
75
0
                mozilla::ipc::SentinelReadError("Error deserializing 'PPluginSurfaceParent'");
76
0
                return MsgValueError;
77
0
            }
78
0
            (msg__).EndRead(iter__, (msg__).type());
79
0
            if ((!(StateTransition(true, (&(mLivenessState)))))) {
80
0
                FatalError("Transition error");
81
0
                return MsgValueError;
82
0
            }
83
0
            if ((!(Recv__delete__()))) {
84
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
85
0
                // Error handled in mozilla::ipc::IPCResult
86
0
                return MsgProcessingError;
87
0
            }
88
0
89
0
90
0
            IProtocol* mgr = (actor)->Manager();
91
0
            (actor)->DestroySubtree(Deletion);
92
0
            (actor)->DeallocSubtree();
93
0
            (mgr)->RemoveManagee(PPluginSurfaceMsgStart, actor);
94
0
95
0
            return MsgProcessed;
96
0
        }
97
0
    default:
98
0
        {
99
0
            return MsgNotKnown;
100
0
        }
101
0
    }
102
0
}
103
104
auto PPluginSurfaceParent::OnMessageReceived(
105
        const Message& msg__,
106
        Message*& reply__) -> PPluginSurfaceParent::Result
107
0
{
108
0
    return MsgNotKnown;
109
0
}
110
111
auto PPluginSurfaceParent::OnCallReceived(
112
        const Message& msg__,
113
        Message*& reply__) -> PPluginSurfaceParent::Result
114
0
{
115
0
    return MsgNotKnown;
116
0
}
117
118
auto PPluginSurfaceParent::GetProtocolTypeId() -> int32_t
119
0
{
120
0
    return PPluginSurfaceMsgStart;
121
0
}
122
123
auto PPluginSurfaceParent::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 PPluginSurfaceParent::DeallocSubtree() -> void
136
0
{
137
0
}
138
139
140
141
} // namespace plugins
142
} // namespace mozilla
143
namespace mozilla {
144
namespace ipc {
145
auto IPDLParamTraits<mozilla::plugins::PPluginSurfaceParent>::Write(
146
        IPC::Message* aMsg,
147
        mozilla::ipc::IProtocol* aActor,
148
        const paramType& aVar) -> void
149
0
{
150
0
    int32_t id;
151
0
    if ((!(aVar))) {
152
0
        id = 0;
153
0
    }
154
0
    else {
155
0
        id = (aVar)->Id();
156
0
        if ((1) == (id)) {
157
0
            (aActor)->FatalError("actor has been |delete|d");
158
0
        }
159
0
    }
160
0
    WriteIPDLParam(aMsg, aActor, id);
161
0
}
162
163
auto IPDLParamTraits<mozilla::plugins::PPluginSurfaceParent>::Read(
164
        const IPC::Message* aMsg,
165
        PickleIterator* aIter,
166
        mozilla::ipc::IProtocol* aActor,
167
        paramType* aVar) -> bool
168
0
{
169
0
    mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PPluginSurface", PPluginSurfaceMsgStart);
170
0
    if ((actor).isNothing()) {
171
0
        return false;
172
0
    }
173
0
174
0
    (*(aVar)) = static_cast<mozilla::plugins::PPluginSurfaceParent*>((actor).value());
175
0
    return true;
176
0
}
177
178
} // namespace ipc
179
} // namespace mozilla