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