Coverage Report

Created: 2018-09-25 14:53

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