Coverage Report

Created: 2018-09-25 14:53

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