Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/PlacesEventBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM PlacesEvent.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_PlacesEventBinding_h
4
#define mozilla_dom_PlacesEventBinding_h
5
6
#include "GeckoProfiler.h"
7
#include "js/RootingAPI.h"
8
#include "jspubtd.h"
9
#include "mozilla/ErrorResult.h"
10
#include "mozilla/dom/BindingDeclarations.h"
11
#include "mozilla/dom/Nullable.h"
12
#include "mozilla/dom/PrototypeList.h"
13
14
namespace mozilla {
15
namespace dom {
16
17
struct NativePropertyHooks;
18
class PlacesEvent;
19
struct PlacesEventAtoms;
20
class PlacesVisit;
21
struct PlacesVisitAtoms;
22
class ProtoAndIfaceCache;
23
24
} // namespace dom
25
} // namespace mozilla
26
27
namespace mozilla {
28
namespace dom {
29
30
enum class PlacesEventType : uint8_t {
31
  None,
32
  Page_visited,
33
  EndGuard_
34
};
35
36
namespace PlacesEventTypeValues {
37
extern const EnumEntry strings[3];
38
} // namespace PlacesEventTypeValues
39
40
bool
41
ToJSValue(JSContext* aCx, PlacesEventType aArgument, JS::MutableHandle<JS::Value> aValue);
42
43
44
namespace PlacesEvent_Binding {
45
46
  typedef mozilla::dom::PlacesEvent NativeType;
47
48
  bool
49
  ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
50
51
  const JSClass*
52
  GetJSClass();
53
54
  bool
55
  Wrap(JSContext* aCx, mozilla::dom::PlacesEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
56
57
  template <class T>
58
  inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
59
0
  {
60
0
    JS::Rooted<JSObject*> reflector(aCx);
61
0
    return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
62
0
  }
63
64
  // We declare this as an array so that retrieving a pointer to this
65
  // binding's property hooks only requires compile/link-time resolvable
66
  // address arithmetic.  Declaring it as a pointer instead would require
67
  // doing a run-time load to fetch a pointer to this binding's property
68
  // hooks.  And then structures which embedded a pointer to this structure
69
  // would require a run-time load for proper initialization, which would
70
  // then induce static constructors.  Lots of static constructors.
71
  extern const NativePropertyHooks sNativePropertyHooks[];
72
73
  void
74
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
75
76
  inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
77
0
  {
78
0
    /* Get the interface prototype object for this class.  This will create the
79
0
       object as needed. */
80
0
    return GetPerInterfaceObjectHandle(aCx, prototypes::id::PlacesEvent,
81
0
                                       &CreateInterfaceObjects,
82
0
                                       /* aDefineOnGlobal = */ true);
83
0
84
0
  }
85
86
  JSObject*
87
  GetProtoObject(JSContext* aCx);
88
89
  inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
90
0
  {
91
0
    /* Get the interface object for this class.  This will create the object as
92
0
       needed. */
93
0
94
0
    return GetPerInterfaceObjectHandle(aCx, constructors::id::PlacesEvent,
95
0
                                       &CreateInterfaceObjects,
96
0
                                       aDefineOnGlobal);
97
0
  }
98
99
  JSObject*
100
  GetConstructorObject(JSContext* aCx);
101
102
} // namespace PlacesEvent_Binding
103
104
105
106
namespace PlacesVisit_Binding {
107
108
  typedef mozilla::dom::PlacesVisit NativeType;
109
110
  bool
111
  ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
112
113
  const JSClass*
114
  GetJSClass();
115
116
  bool
117
  Wrap(JSContext* aCx, mozilla::dom::PlacesVisit* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
118
119
  template <class T>
120
  inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
121
0
  {
122
0
    JS::Rooted<JSObject*> reflector(aCx);
123
0
    return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
124
0
  }
125
126
  // We declare this as an array so that retrieving a pointer to this
127
  // binding's property hooks only requires compile/link-time resolvable
128
  // address arithmetic.  Declaring it as a pointer instead would require
129
  // doing a run-time load to fetch a pointer to this binding's property
130
  // hooks.  And then structures which embedded a pointer to this structure
131
  // would require a run-time load for proper initialization, which would
132
  // then induce static constructors.  Lots of static constructors.
133
  extern const NativePropertyHooks sNativePropertyHooks[];
134
135
  void
136
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
137
138
  inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
139
0
  {
140
0
    /* Get the interface prototype object for this class.  This will create the
141
0
       object as needed. */
142
0
    return GetPerInterfaceObjectHandle(aCx, prototypes::id::PlacesVisit,
143
0
                                       &CreateInterfaceObjects,
144
0
                                       /* aDefineOnGlobal = */ true);
145
0
146
0
  }
147
148
  inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
149
0
  {
150
0
    /* Get the interface object for this class.  This will create the object as
151
0
       needed. */
152
0
153
0
    return GetPerInterfaceObjectHandle(aCx, constructors::id::PlacesVisit,
154
0
                                       &CreateInterfaceObjects,
155
0
                                       aDefineOnGlobal);
156
0
  }
157
158
  JSObject*
159
  GetConstructorObject(JSContext* aCx);
160
161
} // namespace PlacesVisit_Binding
162
163
164
165
} // namespace dom
166
} // namespace mozilla
167
168
#endif // mozilla_dom_PlacesEventBinding_h