Coverage Report

Created: 2018-09-25 14:53

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