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