Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/ExtendableEventBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM ExtendableEvent.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_ExtendableEventBinding_h
4
#define mozilla_dom_ExtendableEventBinding_h
5
6
#include "EventBinding.h"
7
#include "GeckoProfiler.h"
8
#include "js/RootingAPI.h"
9
#include "jspubtd.h"
10
#include "mozilla/ErrorResult.h"
11
#include "mozilla/dom/BindingDeclarations.h"
12
#include "mozilla/dom/Nullable.h"
13
#include "mozilla/dom/PrototypeList.h"
14
15
namespace mozilla {
16
namespace dom {
17
18
class ExtendableEvent;
19
struct ExtendableEventAtoms;
20
struct NativePropertyHooks;
21
class ProtoAndIfaceCache;
22
23
} // namespace dom
24
} // namespace mozilla
25
26
namespace mozilla {
27
namespace dom {
28
29
struct ExtendableEventInit : public EventInit
30
{
31
  ExtendableEventInit();
32
33
  explicit inline ExtendableEventInit(const FastDictionaryInitializer& )
34
    : EventInit(FastDictionaryInitializer())
35
0
  {
36
0
    // Do nothing here; this is used by our "Fast" subclass
37
0
  }
38
39
  explicit inline ExtendableEventInit(const ExtendableEventInit& aOther)
40
0
  {
41
0
    *this = aOther;
42
0
  }
43
44
  bool
45
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
46
47
  bool
48
  Init(const nsAString& aJSON);
49
50
  bool
51
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
52
53
  bool
54
  ToJSON(nsAString& aJSON) const;
55
56
  void
57
  TraceDictionary(JSTracer* trc);
58
59
  ExtendableEventInit&
60
  operator=(const ExtendableEventInit& aOther);
61
};
62
63
namespace binding_detail {
64
struct FastExtendableEventInit : public ExtendableEventInit
65
{
66
  inline FastExtendableEventInit()
67
    : ExtendableEventInit(FastDictionaryInitializer())
68
0
  {
69
0
    // Doesn't matter what int we pass to the parent constructor
70
0
  }
71
};
72
} // namespace binding_detail
73
74
75
namespace ExtendableEvent_Binding {
76
77
  typedef mozilla::dom::ExtendableEvent NativeType;
78
79
  bool
80
  ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
81
82
  const JSClass*
83
  GetJSClass();
84
85
  bool
86
  Wrap(JSContext* aCx, mozilla::dom::ExtendableEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
87
88
  template <class T>
89
  inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
90
0
  {
91
0
    JS::Rooted<JSObject*> reflector(aCx);
92
0
    return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
93
0
  }
94
95
  void
96
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
97
98
  inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
99
0
  {
100
0
    /* Get the interface prototype object for this class.  This will create the
101
0
       object as needed. */
102
0
    return GetPerInterfaceObjectHandle(aCx, prototypes::id::ExtendableEvent,
103
0
                                       &CreateInterfaceObjects,
104
0
                                       /* aDefineOnGlobal = */ true);
105
0
106
0
  }
107
108
  JSObject*
109
  GetProtoObject(JSContext* aCx);
110
111
  inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
112
0
  {
113
0
    /* Get the interface object for this class.  This will create the object as
114
0
       needed. */
115
0
116
0
    return GetPerInterfaceObjectHandle(aCx, constructors::id::ExtendableEvent,
117
0
                                       &CreateInterfaceObjects,
118
0
                                       aDefineOnGlobal);
119
0
  }
120
121
  JSObject*
122
  GetConstructorObject(JSContext* aCx);
123
124
} // namespace ExtendableEvent_Binding
125
126
127
128
} // namespace dom
129
} // namespace mozilla
130
131
#endif // mozilla_dom_ExtendableEventBinding_h