Coverage Report

Created: 2018-09-25 14:53

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