/work/obj-fuzz/dist/include/mozilla/dom/MIDIConnectionEventBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM MIDIConnectionEvent.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_MIDIConnectionEventBinding_h |
4 | | #define mozilla_dom_MIDIConnectionEventBinding_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/MIDIPort.h" |
13 | | #include "mozilla/dom/Nullable.h" |
14 | | #include "mozilla/dom/PrototypeList.h" |
15 | | |
16 | | namespace mozilla { |
17 | | namespace dom { |
18 | | |
19 | | class MIDIConnectionEvent; |
20 | | struct MIDIConnectionEventAtoms; |
21 | | struct MIDIConnectionEventInitAtoms; |
22 | | class MIDIPort; |
23 | | struct NativePropertyHooks; |
24 | | class ProtoAndIfaceCache; |
25 | | |
26 | | } // namespace dom |
27 | | } // namespace mozilla |
28 | | |
29 | | namespace mozilla { |
30 | | namespace dom { |
31 | | |
32 | | struct MIDIConnectionEventInit : public EventInit |
33 | | { |
34 | | MOZ_INIT_OUTSIDE_CTOR RefPtr<mozilla::dom::MIDIPort> mPort; |
35 | | |
36 | | MIDIConnectionEventInit(); |
37 | | |
38 | | explicit inline MIDIConnectionEventInit(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 MIDIConnectionEventInit(const MIDIConnectionEventInit& 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 | | inline void |
59 | | TraverseForCC(nsCycleCollectionTraversalCallback& aCallback, uint32_t aFlags) |
60 | 0 | { |
61 | 0 | ImplCycleCollectionTraverse(aCallback, mPort, "mPort", aFlags); |
62 | 0 | } |
63 | | |
64 | | inline void |
65 | | UnlinkForCC() |
66 | 0 | { |
67 | 0 | ImplCycleCollectionUnlink(mPort); |
68 | 0 | } |
69 | | |
70 | | MIDIConnectionEventInit& |
71 | | operator=(const MIDIConnectionEventInit& aOther); |
72 | | |
73 | | private: |
74 | | static bool |
75 | | InitIds(JSContext* cx, MIDIConnectionEventInitAtoms* atomsCache); |
76 | | }; |
77 | | |
78 | | namespace binding_detail { |
79 | | struct FastMIDIConnectionEventInit : public MIDIConnectionEventInit |
80 | | { |
81 | | inline FastMIDIConnectionEventInit() |
82 | | : MIDIConnectionEventInit(FastDictionaryInitializer()) |
83 | 0 | { |
84 | 0 | // Doesn't matter what int we pass to the parent constructor |
85 | 0 | } |
86 | | }; |
87 | | } // namespace binding_detail |
88 | | |
89 | | |
90 | | namespace MIDIConnectionEvent_Binding { |
91 | | |
92 | | typedef mozilla::dom::MIDIConnectionEvent NativeType; |
93 | | |
94 | | bool |
95 | | ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj); |
96 | | |
97 | | const JSClass* |
98 | | GetJSClass(); |
99 | | |
100 | | bool |
101 | | Wrap(JSContext* aCx, mozilla::dom::MIDIConnectionEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector); |
102 | | |
103 | | template <class T> |
104 | | inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto) |
105 | 0 | { |
106 | 0 | JS::Rooted<JSObject*> reflector(aCx); |
107 | 0 | return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr; |
108 | 0 | } |
109 | | |
110 | | // We declare this as an array so that retrieving a pointer to this |
111 | | // binding's property hooks only requires compile/link-time resolvable |
112 | | // address arithmetic. Declaring it as a pointer instead would require |
113 | | // doing a run-time load to fetch a pointer to this binding's property |
114 | | // hooks. And then structures which embedded a pointer to this structure |
115 | | // would require a run-time load for proper initialization, which would |
116 | | // then induce static constructors. Lots of static constructors. |
117 | | extern const NativePropertyHooks sNativePropertyHooks[]; |
118 | | |
119 | | void |
120 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
121 | | |
122 | | inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx) |
123 | 0 | { |
124 | 0 | /* Get the interface prototype object for this class. This will create the |
125 | 0 | object as needed. */ |
126 | 0 | return GetPerInterfaceObjectHandle(aCx, prototypes::id::MIDIConnectionEvent, |
127 | 0 | &CreateInterfaceObjects, |
128 | 0 | /* aDefineOnGlobal = */ true); |
129 | 0 |
|
130 | 0 | } |
131 | | |
132 | | inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true) |
133 | 0 | { |
134 | 0 | /* Get the interface object for this class. This will create the object as |
135 | 0 | needed. */ |
136 | 0 |
|
137 | 0 | return GetPerInterfaceObjectHandle(aCx, constructors::id::MIDIConnectionEvent, |
138 | 0 | &CreateInterfaceObjects, |
139 | 0 | aDefineOnGlobal); |
140 | 0 | } |
141 | | |
142 | | JSObject* |
143 | | GetConstructorObject(JSContext* aCx); |
144 | | |
145 | | } // namespace MIDIConnectionEvent_Binding |
146 | | |
147 | | |
148 | | |
149 | | } // namespace dom |
150 | | } // namespace mozilla |
151 | | |
152 | | #endif // mozilla_dom_MIDIConnectionEventBinding_h |