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