Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dom/bindings/CloseEvent.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 CloseEvent.webidl BY Codegen.py - DO NOT EDIT */
8
9
#include "CloseEvent.h"
10
#include "CloseEventBinding.h"
11
#include "EventBinding.h"
12
#include "js/GCAPI.h"
13
#include "mozilla/dom/CloseEvent.h"
14
#include "mozilla/dom/Nullable.h"
15
#include "mozilla/dom/PrimitiveConversions.h"
16
17
namespace mozilla {
18
namespace dom {
19
20
21
CloseEvent::CloseEvent(mozilla::dom::EventTarget* aOwner)
22
  : Event(aOwner, nullptr, nullptr)
23
0
{
24
0
}
25
26
CloseEvent::~CloseEvent()
27
0
{
28
0
}
29
30
CloseEvent*
31
CloseEvent::AsCloseEvent()
32
0
{
33
0
  return this;
34
0
}
35
36
JSObject*
37
CloseEvent::WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
38
0
{
39
0
  return CloseEvent_Binding::Wrap(aCx, this, aGivenProto);
40
0
}
41
42
already_AddRefed<CloseEvent>
43
CloseEvent::Constructor(mozilla::dom::EventTarget* aOwner, const nsAString& aType, const CloseEventInit& aEventInitDict)
44
0
{
45
0
  RefPtr<CloseEvent> e = new CloseEvent(aOwner);
46
0
  bool trusted = e->Init(aOwner);
47
0
  e->InitEvent(aType, aEventInitDict.mBubbles, aEventInitDict.mCancelable);
48
0
  e->mWasClean = aEventInitDict.mWasClean;
49
0
  e->mCode = aEventInitDict.mCode;
50
0
  e->mReason = aEventInitDict.mReason;
51
0
  e->SetTrusted(trusted);
52
0
  e->SetComposed(aEventInitDict.mComposed);
53
0
  return e.forget();
54
0
}
55
56
already_AddRefed<CloseEvent>
57
CloseEvent::Constructor(const GlobalObject& aGlobal, const nsAString& aType, const CloseEventInit& 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
CloseEvent::WasClean() const
65
0
{
66
0
  return mWasClean;
67
0
}
68
69
uint16_t
70
CloseEvent::Code() const
71
0
{
72
0
  return mCode;
73
0
}
74
75
void
76
CloseEvent::GetReason(nsString& aRetVal) const
77
0
{
78
0
  aRetVal = mReason;
79
0
}
80
81
82
} // namespace dom
83
} // namespace mozilla