Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/DeviceLightEventBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM DeviceLightEvent.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_DeviceLightEventBinding_h
4
#define mozilla_dom_DeviceLightEventBinding_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 DeviceLightEvent;
19
struct DeviceLightEventAtoms;
20
struct DeviceLightEventInitAtoms;
21
struct NativePropertyHooks;
22
class ProtoAndIfaceCache;
23
24
} // namespace dom
25
} // namespace mozilla
26
27
namespace mozilla {
28
namespace dom {
29
30
struct DeviceLightEventInit : public EventInit
31
{
32
  MOZ_INIT_OUTSIDE_CTOR double mValue;
33
34
  DeviceLightEventInit();
35
36
  explicit inline DeviceLightEventInit(const FastDictionaryInitializer& )
37
    : EventInit(FastDictionaryInitializer())
38
0
  {
39
0
    // Do nothing here; this is used by our "Fast" subclass
40
0
  }
41
42
  explicit inline DeviceLightEventInit(const DeviceLightEventInit& aOther)
43
0
  {
44
0
    *this = aOther;
45
0
  }
46
47
  bool
48
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
49
50
  bool
51
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
52
53
  void
54
  TraceDictionary(JSTracer* trc);
55
56
  DeviceLightEventInit&
57
  operator=(const DeviceLightEventInit& aOther);
58
59
private:
60
  static bool
61
  InitIds(JSContext* cx, DeviceLightEventInitAtoms* atomsCache);
62
};
63
64
namespace binding_detail {
65
struct FastDeviceLightEventInit : public DeviceLightEventInit
66
{
67
  inline FastDeviceLightEventInit()
68
    : DeviceLightEventInit(FastDictionaryInitializer())
69
0
  {
70
0
    // Doesn't matter what int we pass to the parent constructor
71
0
  }
72
};
73
} // namespace binding_detail
74
75
76
namespace DeviceLightEvent_Binding {
77
78
  typedef mozilla::dom::DeviceLightEvent NativeType;
79
80
  bool
81
  ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
82
83
  const JSClass*
84
  GetJSClass();
85
86
  bool
87
  Wrap(JSContext* aCx, mozilla::dom::DeviceLightEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
88
89
  template <class T>
90
  inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
91
0
  {
92
0
    JS::Rooted<JSObject*> reflector(aCx);
93
0
    return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
94
0
  }
95
96
  // We declare this as an array so that retrieving a pointer to this
97
  // binding's property hooks only requires compile/link-time resolvable
98
  // address arithmetic.  Declaring it as a pointer instead would require
99
  // doing a run-time load to fetch a pointer to this binding's property
100
  // hooks.  And then structures which embedded a pointer to this structure
101
  // would require a run-time load for proper initialization, which would
102
  // then induce static constructors.  Lots of static constructors.
103
  extern const NativePropertyHooks sNativePropertyHooks[];
104
105
  void
106
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
107
108
  inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
109
0
  {
110
0
    /* Get the interface prototype object for this class.  This will create the
111
0
       object as needed. */
112
0
    return GetPerInterfaceObjectHandle(aCx, prototypes::id::DeviceLightEvent,
113
0
                                       &CreateInterfaceObjects,
114
0
                                       /* aDefineOnGlobal = */ true);
115
0
116
0
  }
117
118
  inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
119
0
  {
120
0
    /* Get the interface object for this class.  This will create the object as
121
0
       needed. */
122
0
123
0
    return GetPerInterfaceObjectHandle(aCx, constructors::id::DeviceLightEvent,
124
0
                                       &CreateInterfaceObjects,
125
0
                                       aDefineOnGlobal);
126
0
  }
127
128
  JSObject*
129
  GetConstructorObject(JSContext* aCx);
130
131
} // namespace DeviceLightEvent_Binding
132
133
134
135
} // namespace dom
136
} // namespace mozilla
137
138
#endif // mozilla_dom_DeviceLightEventBinding_h