/work/obj-fuzz/dist/include/mozilla/dom/FlexBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM Flex.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_FlexBinding_h |
4 | | #define mozilla_dom_FlexBinding_h |
5 | | |
6 | | #include "GeckoProfiler.h" |
7 | | #include "js/RootingAPI.h" |
8 | | #include "jspubtd.h" |
9 | | #include "mozilla/ErrorResult.h" |
10 | | #include "mozilla/dom/BindingDeclarations.h" |
11 | | #include "mozilla/dom/Nullable.h" |
12 | | #include "mozilla/dom/PrototypeList.h" |
13 | | |
14 | | namespace mozilla { |
15 | | namespace dom { |
16 | | |
17 | | class Flex; |
18 | | struct FlexAtoms; |
19 | | class FlexItem; |
20 | | struct FlexItemAtoms; |
21 | | class FlexLine; |
22 | | struct FlexLineAtoms; |
23 | | struct NativePropertyHooks; |
24 | | class ProtoAndIfaceCache; |
25 | | |
26 | | } // namespace dom |
27 | | } // namespace mozilla |
28 | | |
29 | | namespace mozilla { |
30 | | namespace dom { |
31 | | |
32 | | enum class FlexLineGrowthState : uint8_t { |
33 | | Unchanged, |
34 | | Shrinking, |
35 | | Growing, |
36 | | EndGuard_ |
37 | | }; |
38 | | |
39 | | namespace FlexLineGrowthStateValues { |
40 | | extern const EnumEntry strings[4]; |
41 | | } // namespace FlexLineGrowthStateValues |
42 | | |
43 | | bool |
44 | | ToJSValue(JSContext* aCx, FlexLineGrowthState aArgument, JS::MutableHandle<JS::Value> aValue); |
45 | | |
46 | | |
47 | | namespace Flex_Binding { |
48 | | |
49 | | typedef mozilla::dom::Flex NativeType; |
50 | | |
51 | | bool |
52 | | ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj); |
53 | | |
54 | | const JSClass* |
55 | | GetJSClass(); |
56 | | |
57 | | bool |
58 | | Wrap(JSContext* aCx, mozilla::dom::Flex* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector); |
59 | | |
60 | | template <class T> |
61 | | inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto) |
62 | 0 | { |
63 | 0 | JS::Rooted<JSObject*> reflector(aCx); |
64 | 0 | return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr; |
65 | 0 | } |
66 | | |
67 | | // We declare this as an array so that retrieving a pointer to this |
68 | | // binding's property hooks only requires compile/link-time resolvable |
69 | | // address arithmetic. Declaring it as a pointer instead would require |
70 | | // doing a run-time load to fetch a pointer to this binding's property |
71 | | // hooks. And then structures which embedded a pointer to this structure |
72 | | // would require a run-time load for proper initialization, which would |
73 | | // then induce static constructors. Lots of static constructors. |
74 | | extern const NativePropertyHooks sNativePropertyHooks[]; |
75 | | |
76 | | void |
77 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
78 | | |
79 | | inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx) |
80 | 0 | { |
81 | 0 | /* Get the interface prototype object for this class. This will create the |
82 | 0 | object as needed. */ |
83 | 0 | return GetPerInterfaceObjectHandle(aCx, prototypes::id::Flex, |
84 | 0 | &CreateInterfaceObjects, |
85 | 0 | /* aDefineOnGlobal = */ true); |
86 | 0 |
|
87 | 0 | } |
88 | | |
89 | | inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true) |
90 | 0 | { |
91 | 0 | /* Get the interface object for this class. This will create the object as |
92 | 0 | needed. */ |
93 | 0 |
|
94 | 0 | return GetPerInterfaceObjectHandle(aCx, constructors::id::Flex, |
95 | 0 | &CreateInterfaceObjects, |
96 | 0 | aDefineOnGlobal); |
97 | 0 | } |
98 | | |
99 | | JSObject* |
100 | | GetConstructorObject(JSContext* aCx); |
101 | | |
102 | | } // namespace Flex_Binding |
103 | | |
104 | | |
105 | | |
106 | | namespace FlexItem_Binding { |
107 | | |
108 | | typedef mozilla::dom::FlexItem NativeType; |
109 | | |
110 | | bool |
111 | | ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj); |
112 | | |
113 | | const JSClass* |
114 | | GetJSClass(); |
115 | | |
116 | | bool |
117 | | Wrap(JSContext* aCx, mozilla::dom::FlexItem* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector); |
118 | | |
119 | | template <class T> |
120 | | inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto) |
121 | 0 | { |
122 | 0 | JS::Rooted<JSObject*> reflector(aCx); |
123 | 0 | return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr; |
124 | 0 | } |
125 | | |
126 | | // We declare this as an array so that retrieving a pointer to this |
127 | | // binding's property hooks only requires compile/link-time resolvable |
128 | | // address arithmetic. Declaring it as a pointer instead would require |
129 | | // doing a run-time load to fetch a pointer to this binding's property |
130 | | // hooks. And then structures which embedded a pointer to this structure |
131 | | // would require a run-time load for proper initialization, which would |
132 | | // then induce static constructors. Lots of static constructors. |
133 | | extern const NativePropertyHooks sNativePropertyHooks[]; |
134 | | |
135 | | void |
136 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
137 | | |
138 | | inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx) |
139 | 0 | { |
140 | 0 | /* Get the interface prototype object for this class. This will create the |
141 | 0 | object as needed. */ |
142 | 0 | return GetPerInterfaceObjectHandle(aCx, prototypes::id::FlexItem, |
143 | 0 | &CreateInterfaceObjects, |
144 | 0 | /* aDefineOnGlobal = */ true); |
145 | 0 |
|
146 | 0 | } |
147 | | |
148 | | inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true) |
149 | 0 | { |
150 | 0 | /* Get the interface object for this class. This will create the object as |
151 | 0 | needed. */ |
152 | 0 |
|
153 | 0 | return GetPerInterfaceObjectHandle(aCx, constructors::id::FlexItem, |
154 | 0 | &CreateInterfaceObjects, |
155 | 0 | aDefineOnGlobal); |
156 | 0 | } |
157 | | |
158 | | JSObject* |
159 | | GetConstructorObject(JSContext* aCx); |
160 | | |
161 | | } // namespace FlexItem_Binding |
162 | | |
163 | | |
164 | | |
165 | | namespace FlexLine_Binding { |
166 | | |
167 | | typedef mozilla::dom::FlexLine NativeType; |
168 | | |
169 | | bool |
170 | | ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj); |
171 | | |
172 | | const JSClass* |
173 | | GetJSClass(); |
174 | | |
175 | | bool |
176 | | Wrap(JSContext* aCx, mozilla::dom::FlexLine* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector); |
177 | | |
178 | | template <class T> |
179 | | inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto) |
180 | 0 | { |
181 | 0 | JS::Rooted<JSObject*> reflector(aCx); |
182 | 0 | return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr; |
183 | 0 | } |
184 | | |
185 | | // We declare this as an array so that retrieving a pointer to this |
186 | | // binding's property hooks only requires compile/link-time resolvable |
187 | | // address arithmetic. Declaring it as a pointer instead would require |
188 | | // doing a run-time load to fetch a pointer to this binding's property |
189 | | // hooks. And then structures which embedded a pointer to this structure |
190 | | // would require a run-time load for proper initialization, which would |
191 | | // then induce static constructors. Lots of static constructors. |
192 | | extern const NativePropertyHooks sNativePropertyHooks[]; |
193 | | |
194 | | void |
195 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
196 | | |
197 | | inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx) |
198 | 0 | { |
199 | 0 | /* Get the interface prototype object for this class. This will create the |
200 | 0 | object as needed. */ |
201 | 0 | return GetPerInterfaceObjectHandle(aCx, prototypes::id::FlexLine, |
202 | 0 | &CreateInterfaceObjects, |
203 | 0 | /* aDefineOnGlobal = */ true); |
204 | 0 |
|
205 | 0 | } |
206 | | |
207 | | inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true) |
208 | 0 | { |
209 | 0 | /* Get the interface object for this class. This will create the object as |
210 | 0 | needed. */ |
211 | 0 |
|
212 | 0 | return GetPerInterfaceObjectHandle(aCx, constructors::id::FlexLine, |
213 | 0 | &CreateInterfaceObjects, |
214 | 0 | aDefineOnGlobal); |
215 | 0 | } |
216 | | |
217 | | JSObject* |
218 | | GetConstructorObject(JSContext* aCx); |
219 | | |
220 | | } // namespace FlexLine_Binding |
221 | | |
222 | | |
223 | | |
224 | | } // namespace dom |
225 | | } // namespace mozilla |
226 | | |
227 | | #endif // mozilla_dom_FlexBinding_h |