Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dom/bindings/ProgressEvent.cpp
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim:set ts=2 sw=2 sts=2 et cindent: */
3
/* This Source Code Form is subject to the terms of the Mozilla Public
4
 * License, v. 2.0. If a copy of the MPL was not distributed with this
5
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7
/* THIS FILE IS AUTOGENERATED FROM ProgressEvent.webidl BY Codegen.py - DO NOT EDIT */
8
9
#include "EventBinding.h"
10
#include "ProgressEvent.h"
11
#include "ProgressEventBinding.h"
12
#include "js/GCAPI.h"
13
#include "mozilla/dom/Nullable.h"
14
#include "mozilla/dom/PrimitiveConversions.h"
15
#include "mozilla/dom/ProgressEvent.h"
16
17
namespace mozilla {
18
namespace dom {
19
20
21
ProgressEvent::ProgressEvent(mozilla::dom::EventTarget* aOwner)
22
  : Event(aOwner, nullptr, nullptr)
23
0
{
24
0
}
25
26
ProgressEvent::~ProgressEvent()
27
0
{
28
0
}
29
30
ProgressEvent*
31
ProgressEvent::AsProgressEvent()
32
0
{
33
0
  return this;
34
0
}
35
36
JSObject*
37
ProgressEvent::WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
38
0
{
39
0
  return ProgressEvent_Binding::Wrap(aCx, this, aGivenProto);
40
0
}
41
42
already_AddRefed<ProgressEvent>
43
ProgressEvent::Constructor(mozilla::dom::EventTarget* aOwner, const nsAString& aType, const ProgressEventInit& aEventInitDict)
44
0
{
45
0
  RefPtr<ProgressEvent> e = new ProgressEvent(aOwner);
46
0
  bool trusted = e->Init(aOwner);
47
0
  e->InitEvent(aType, aEventInitDict.mBubbles, aEventInitDict.mCancelable);
48
0
  e->mLengthComputable = aEventInitDict.mLengthComputable;
49
0
  e->mLoaded = aEventInitDict.mLoaded;
50
0
  e->mTotal = aEventInitDict.mTotal;
51
0
  e->SetTrusted(trusted);
52
0
  e->SetComposed(aEventInitDict.mComposed);
53
0
  return e.forget();
54
0
}
55
56
already_AddRefed<ProgressEvent>
57
ProgressEvent::Constructor(const GlobalObject& aGlobal, const nsAString& aType, const ProgressEventInit& aEventInitDict, ErrorResult& aRv)
58
0
{
59
0
  nsCOMPtr<mozilla::dom::EventTarget> owner = do_QueryInterface(aGlobal.GetAsSupports());
60
0
  return Constructor(owner, aType, aEventInitDict);
61
0
}
62
63
bool
64
ProgressEvent::LengthComputable() const
65
0
{
66
0
  return mLengthComputable;
67
0
}
68
69
uint64_t
70
ProgressEvent::Loaded() const
71
0
{
72
0
  return mLoaded;
73
0
}
74
75
uint64_t
76
ProgressEvent::Total() const
77
0
{
78
0
  return mTotal;
79
0
}
80
81
82
} // namespace dom
83
} // namespace mozilla