Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/PPrintProgressDialogChild.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/embedding/PPrintProgressDialogChild.h"
8
9
#include "mozilla/embedding/PPrintingChild.h"
10
11
#include "nsIFile.h"
12
#include "GeckoProfiler.h"
13
14
namespace mozilla {
15
namespace embedding {
16
17
18
auto PPrintProgressDialogChild::ActorDestroy(ActorDestroyReason aWhy) -> void
19
0
{
20
0
}
21
22
MOZ_IMPLICIT PPrintProgressDialogChild::PPrintProgressDialogChild() :
23
    mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
24
    mLivenessState(mozilla::ipc::LivenessState::Dead)
25
0
{
26
0
    MOZ_COUNT_CTOR(PPrintProgressDialogChild);
27
0
}
28
29
PPrintProgressDialogChild::~PPrintProgressDialogChild()
30
0
{
31
0
    MOZ_COUNT_DTOR(PPrintProgressDialogChild);
32
0
}
33
34
auto PPrintProgressDialogChild::Manager() const -> PPrintingChild*
35
0
{
36
0
    return static_cast<PPrintingChild*>(IProtocol::Manager());
37
0
}
38
39
auto PPrintProgressDialogChild::SendStateChange(
40
        const long& stateFlags,
41
        const nsresult& status) -> bool
42
0
{
43
0
    IPC::Message* msg__ = PPrintProgressDialog::Msg_StateChange(Id());
44
0
45
0
    WriteIPDLParam(msg__, this, stateFlags);
46
0
    // Sentinel = 'stateFlags'
47
0
    (msg__)->WriteSentinel(2666547646);
48
0
    WriteIPDLParam(msg__, this, status);
49
0
    // Sentinel = 'status'
50
0
    (msg__)->WriteSentinel(3714608576);
51
0
52
0
53
0
54
0
55
0
    if (mozilla::ipc::LoggingEnabledFor("PPrintProgressDialogChild")) {
56
0
        mozilla::ipc::LogMessageForProtocol("PPrintProgressDialogChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
57
0
    }
58
0
    AUTO_PROFILER_LABEL("PPrintProgressDialog::Msg_StateChange", OTHER);
59
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
60
0
        mozilla::ipc::LogicError("Transition error");
61
0
    }
62
0
63
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
64
0
    return sendok__;
65
0
}
66
67
auto PPrintProgressDialogChild::SendProgressChange(
68
        const long& curSelfProgress,
69
        const long& maxSelfProgress,
70
        const long& curTotalProgress,
71
        const long& maxTotalProgress) -> bool
72
0
{
73
0
    IPC::Message* msg__ = PPrintProgressDialog::Msg_ProgressChange(Id());
74
0
75
0
    WriteIPDLParam(msg__, this, curSelfProgress);
76
0
    // Sentinel = 'curSelfProgress'
77
0
    (msg__)->WriteSentinel(4225363786);
78
0
    WriteIPDLParam(msg__, this, maxSelfProgress);
79
0
    // Sentinel = 'maxSelfProgress'
80
0
    (msg__)->WriteSentinel(3605923158);
81
0
    WriteIPDLParam(msg__, this, curTotalProgress);
82
0
    // Sentinel = 'curTotalProgress'
83
0
    (msg__)->WriteSentinel(3294949245);
84
0
    WriteIPDLParam(msg__, this, maxTotalProgress);
85
0
    // Sentinel = 'maxTotalProgress'
86
0
    (msg__)->WriteSentinel(2454639121);
87
0
88
0
89
0
90
0
91
0
    if (mozilla::ipc::LoggingEnabledFor("PPrintProgressDialogChild")) {
92
0
        mozilla::ipc::LogMessageForProtocol("PPrintProgressDialogChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
93
0
    }
94
0
    AUTO_PROFILER_LABEL("PPrintProgressDialog::Msg_ProgressChange", OTHER);
95
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
96
0
        mozilla::ipc::LogicError("Transition error");
97
0
    }
98
0
99
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
100
0
    return sendok__;
101
0
}
102
103
auto PPrintProgressDialogChild::SendDocTitleChange(const nsString& newTitle) -> bool
104
0
{
105
0
    IPC::Message* msg__ = PPrintProgressDialog::Msg_DocTitleChange(Id());
106
0
107
0
    WriteIPDLParam(msg__, this, newTitle);
108
0
    // Sentinel = 'newTitle'
109
0
    (msg__)->WriteSentinel(2867378368);
110
0
111
0
112
0
113
0
114
0
    if (mozilla::ipc::LoggingEnabledFor("PPrintProgressDialogChild")) {
115
0
        mozilla::ipc::LogMessageForProtocol("PPrintProgressDialogChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
116
0
    }
117
0
    AUTO_PROFILER_LABEL("PPrintProgressDialog::Msg_DocTitleChange", OTHER);
118
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
119
0
        mozilla::ipc::LogicError("Transition error");
120
0
    }
121
0
122
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
123
0
    return sendok__;
124
0
}
125
126
auto PPrintProgressDialogChild::SendDocURLChange(const nsString& newURL) -> bool
127
0
{
128
0
    IPC::Message* msg__ = PPrintProgressDialog::Msg_DocURLChange(Id());
129
0
130
0
    WriteIPDLParam(msg__, this, newURL);
131
0
    // Sentinel = 'newURL'
132
0
    (msg__)->WriteSentinel(1179970083);
133
0
134
0
135
0
136
0
137
0
    if (mozilla::ipc::LoggingEnabledFor("PPrintProgressDialogChild")) {
138
0
        mozilla::ipc::LogMessageForProtocol("PPrintProgressDialogChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
139
0
    }
140
0
    AUTO_PROFILER_LABEL("PPrintProgressDialog::Msg_DocURLChange", OTHER);
141
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
142
0
        mozilla::ipc::LogicError("Transition error");
143
0
    }
144
0
145
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
146
0
    return sendok__;
147
0
}
148
149
auto PPrintProgressDialogChild::Send__delete__(PPrintProgressDialogChild* actor) -> bool
150
0
{
151
0
    if ((!(actor))) {
152
0
        return false;
153
0
    }
154
0
155
0
    IPC::Message* msg__ = PPrintProgressDialog::Msg___delete__((actor)->Id());
156
0
157
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
158
0
    WriteIPDLParam(msg__, actor, actor);
159
0
    // Sentinel = 'actor'
160
0
    (msg__)->WriteSentinel(875202478);
161
0
162
0
163
0
164
0
    if (mozilla::ipc::LoggingEnabledFor("PPrintProgressDialogChild")) {
165
0
        mozilla::ipc::LogMessageForProtocol("PPrintProgressDialogChild", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
166
0
    }
167
0
    AUTO_PROFILER_LABEL("PPrintProgressDialog::Msg___delete__", OTHER);
168
0
    if ((!(StateTransition(true, (&((actor)->mLivenessState)))))) {
169
0
        mozilla::ipc::LogicError("Transition error");
170
0
    }
171
0
172
0
    bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
173
0
174
0
    IProtocol* mgr = (actor)->Manager();
175
0
    (actor)->DestroySubtree(Deletion);
176
0
    (actor)->DeallocSubtree();
177
0
    (mgr)->RemoveManagee(PPrintProgressDialogMsgStart, actor);
178
0
    return sendok__;
179
0
}
180
181
auto PPrintProgressDialogChild::RemoveManagee(
182
        int32_t aProtocolId,
183
        IProtocol* aListener) -> void
184
0
{
185
0
    FatalError("unreached");
186
0
    return;
187
0
}
188
189
auto PPrintProgressDialogChild::OnMessageReceived(const Message& msg__) -> PPrintProgressDialogChild::Result
190
0
{
191
0
    switch ((msg__).type()) {
192
0
    case PPrintProgressDialog::Reply___delete____ID:
193
0
        {
194
0
            return MsgProcessed;
195
0
        }
196
0
    case PPrintProgressDialog::Msg_DialogOpened__ID:
197
0
        {
198
0
            if (mozilla::ipc::LoggingEnabledFor("PPrintProgressDialogChild")) {
199
0
                mozilla::ipc::LogMessageForProtocol("PPrintProgressDialogChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
200
0
            }
201
0
            AUTO_PROFILER_LABEL("PPrintProgressDialog::Msg_DialogOpened", OTHER);
202
0
203
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
204
0
                FatalError("Transition error");
205
0
                return MsgValueError;
206
0
            }
207
0
            if ((!(RecvDialogOpened()))) {
208
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
209
0
                // Error handled in mozilla::ipc::IPCResult
210
0
                return MsgProcessingError;
211
0
            }
212
0
213
0
            return MsgProcessed;
214
0
        }
215
0
    case PPrintProgressDialog::Msg_CancelledCurrentJob__ID:
216
0
        {
217
0
            if (mozilla::ipc::LoggingEnabledFor("PPrintProgressDialogChild")) {
218
0
                mozilla::ipc::LogMessageForProtocol("PPrintProgressDialogChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
219
0
            }
220
0
            AUTO_PROFILER_LABEL("PPrintProgressDialog::Msg_CancelledCurrentJob", OTHER);
221
0
222
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
223
0
                FatalError("Transition error");
224
0
                return MsgValueError;
225
0
            }
226
0
            if ((!(RecvCancelledCurrentJob()))) {
227
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
228
0
                // Error handled in mozilla::ipc::IPCResult
229
0
                return MsgProcessingError;
230
0
            }
231
0
232
0
            return MsgProcessed;
233
0
        }
234
0
    default:
235
0
        {
236
0
            return MsgNotKnown;
237
0
        }
238
0
    }
239
0
}
240
241
auto PPrintProgressDialogChild::OnMessageReceived(
242
        const Message& msg__,
243
        Message*& reply__) -> PPrintProgressDialogChild::Result
244
0
{
245
0
    return MsgNotKnown;
246
0
}
247
248
auto PPrintProgressDialogChild::OnCallReceived(
249
        const Message& msg__,
250
        Message*& reply__) -> PPrintProgressDialogChild::Result
251
0
{
252
0
    MOZ_ASSERT_UNREACHABLE("message protocol not supported");
253
0
    return MsgNotKnown;
254
0
}
255
256
auto PPrintProgressDialogChild::GetProtocolTypeId() -> int32_t
257
0
{
258
0
    return PPrintProgressDialogMsgStart;
259
0
}
260
261
auto PPrintProgressDialogChild::DestroySubtree(ActorDestroyReason why) -> void
262
0
{
263
0
    // Unregister from our manager.
264
0
    Unregister(Id());
265
0
266
0
    // Reject owning pending responses.
267
0
    (GetIPCChannel())->RejectPendingResponsesForActor(this);
268
0
269
0
    // Finally, destroy "us".
270
0
    ActorDestroy(why);
271
0
}
272
273
auto PPrintProgressDialogChild::DeallocSubtree() -> void
274
0
{
275
0
}
276
277
278
279
} // namespace embedding
280
} // namespace mozilla
281
namespace mozilla {
282
namespace ipc {
283
auto IPDLParamTraits<mozilla::embedding::PPrintProgressDialogChild>::Write(
284
        IPC::Message* aMsg,
285
        mozilla::ipc::IProtocol* aActor,
286
        const paramType& aVar) -> void
287
0
{
288
0
    int32_t id;
289
0
    if ((!(aVar))) {
290
0
        id = 0;
291
0
    }
292
0
    else {
293
0
        id = (aVar)->Id();
294
0
        if ((1) == (id)) {
295
0
            (aActor)->FatalError("actor has been |delete|d");
296
0
        }
297
0
    }
298
0
    WriteIPDLParam(aMsg, aActor, id);
299
0
}
300
301
auto IPDLParamTraits<mozilla::embedding::PPrintProgressDialogChild>::Read(
302
        const IPC::Message* aMsg,
303
        PickleIterator* aIter,
304
        mozilla::ipc::IProtocol* aActor,
305
        paramType* aVar) -> bool
306
0
{
307
0
    mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PPrintProgressDialog", PPrintProgressDialogMsgStart);
308
0
    if ((actor).isNothing()) {
309
0
        return false;
310
0
    }
311
0
312
0
    (*(aVar)) = static_cast<mozilla::embedding::PPrintProgressDialogChild*>((actor).value());
313
0
    return true;
314
0
}
315
316
} // namespace ipc
317
} // namespace mozilla