/work/obj-fuzz/dom/bindings/HTMLAreaElementBinding.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM HTMLAreaElement.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #include "HTMLAreaElementBinding.h" |
4 | | #include "HTMLElementBinding.h" |
5 | | #include "WrapperFactory.h" |
6 | | #include "mozilla/OwningNonNull.h" |
7 | | #include "mozilla/dom/BindingUtils.h" |
8 | | #include "mozilla/dom/CustomElementRegistry.h" |
9 | | #include "mozilla/dom/DOMJSClass.h" |
10 | | #include "mozilla/dom/DocGroup.h" |
11 | | #include "mozilla/dom/HTMLAreaElement.h" |
12 | | #include "mozilla/dom/NonRefcountedDOMObject.h" |
13 | | #include "mozilla/dom/PrimitiveConversions.h" |
14 | | #include "mozilla/dom/XrayExpandoClass.h" |
15 | | #include "nsDOMTokenList.h" |
16 | | |
17 | | namespace mozilla { |
18 | | namespace dom { |
19 | | |
20 | | namespace binding_detail {}; // Just to make sure it's known as a namespace |
21 | | using namespace mozilla::dom::binding_detail; |
22 | | |
23 | | |
24 | | namespace HTMLAreaElement_Binding { |
25 | | |
26 | | static_assert(IsRefcounted<NativeType>::value == IsRefcounted<HTMLElement_Binding::NativeType>::value, |
27 | | "Can't inherit from an interface with a different ownership model."); |
28 | | |
29 | | MOZ_CAN_RUN_SCRIPT static bool |
30 | | get_alt(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
31 | 0 | { |
32 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.alt", DOM, cx); |
33 | 0 |
|
34 | 0 | DOMString result; |
35 | 0 | self->GetAlt(result); |
36 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
37 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
38 | 0 | return false; |
39 | 0 | } |
40 | 0 | return true; |
41 | 0 | } |
42 | | |
43 | | MOZ_CAN_RUN_SCRIPT static bool |
44 | | set_alt(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitSetterCallArgs args) |
45 | 0 | { |
46 | 0 | AUTO_PROFILER_LABEL_FAST("set HTMLAreaElement.alt", DOM, cx); |
47 | 0 |
|
48 | 0 | binding_detail::FakeString arg0; |
49 | 0 | if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) { |
50 | 0 | return false; |
51 | 0 | } |
52 | 0 | Maybe<AutoCEReaction> ceReaction; |
53 | 0 | if (CustomElementRegistry::IsCustomElementEnabled(cx, obj)) { |
54 | 0 | DocGroup* docGroup = self->GetDocGroup(); |
55 | 0 | if (docGroup) { |
56 | 0 | ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx); |
57 | 0 | } |
58 | 0 | } |
59 | 0 | FastErrorResult rv; |
60 | 0 | self->SetAlt(NonNullHelper(Constify(arg0)), rv); |
61 | 0 | if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) { |
62 | 0 | return false; |
63 | 0 | } |
64 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
65 | 0 |
|
66 | 0 | return true; |
67 | 0 | } |
68 | | |
69 | | static const JSJitInfo alt_getterinfo = { |
70 | | { (JSJitGetterOp)get_alt }, |
71 | | { prototypes::id::HTMLAreaElement }, |
72 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
73 | | JSJitInfo::Getter, |
74 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
75 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
76 | | false, /* isInfallible. False in setters. */ |
77 | | false, /* isMovable. Not relevant for setters. */ |
78 | | false, /* isEliminatable. Not relevant for setters. */ |
79 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
80 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
81 | | false, /* isTypedMethod. Only relevant for methods. */ |
82 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
83 | | }; |
84 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
85 | | static_assert(0 < 1, "There is no slot for us"); |
86 | | static const JSJitInfo alt_setterinfo = { |
87 | | { (JSJitGetterOp)set_alt }, |
88 | | { prototypes::id::HTMLAreaElement }, |
89 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
90 | | JSJitInfo::Setter, |
91 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
92 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
93 | | false, /* isInfallible. False in setters. */ |
94 | | false, /* isMovable. Not relevant for setters. */ |
95 | | false, /* isEliminatable. Not relevant for setters. */ |
96 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
97 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
98 | | false, /* isTypedMethod. Only relevant for methods. */ |
99 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
100 | | }; |
101 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
102 | | static_assert(0 < 1, "There is no slot for us"); |
103 | | |
104 | | MOZ_CAN_RUN_SCRIPT static bool |
105 | | get_coords(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
106 | 0 | { |
107 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.coords", DOM, cx); |
108 | 0 |
|
109 | 0 | DOMString result; |
110 | 0 | self->GetCoords(result); |
111 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
112 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
113 | 0 | return false; |
114 | 0 | } |
115 | 0 | return true; |
116 | 0 | } |
117 | | |
118 | | MOZ_CAN_RUN_SCRIPT static bool |
119 | | set_coords(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitSetterCallArgs args) |
120 | 0 | { |
121 | 0 | AUTO_PROFILER_LABEL_FAST("set HTMLAreaElement.coords", DOM, cx); |
122 | 0 |
|
123 | 0 | binding_detail::FakeString arg0; |
124 | 0 | if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) { |
125 | 0 | return false; |
126 | 0 | } |
127 | 0 | Maybe<AutoCEReaction> ceReaction; |
128 | 0 | if (CustomElementRegistry::IsCustomElementEnabled(cx, obj)) { |
129 | 0 | DocGroup* docGroup = self->GetDocGroup(); |
130 | 0 | if (docGroup) { |
131 | 0 | ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx); |
132 | 0 | } |
133 | 0 | } |
134 | 0 | FastErrorResult rv; |
135 | 0 | self->SetCoords(NonNullHelper(Constify(arg0)), rv); |
136 | 0 | if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) { |
137 | 0 | return false; |
138 | 0 | } |
139 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
140 | 0 |
|
141 | 0 | return true; |
142 | 0 | } |
143 | | |
144 | | static const JSJitInfo coords_getterinfo = { |
145 | | { (JSJitGetterOp)get_coords }, |
146 | | { prototypes::id::HTMLAreaElement }, |
147 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
148 | | JSJitInfo::Getter, |
149 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
150 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
151 | | false, /* isInfallible. False in setters. */ |
152 | | false, /* isMovable. Not relevant for setters. */ |
153 | | false, /* isEliminatable. Not relevant for setters. */ |
154 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
155 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
156 | | false, /* isTypedMethod. Only relevant for methods. */ |
157 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
158 | | }; |
159 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
160 | | static_assert(0 < 1, "There is no slot for us"); |
161 | | static const JSJitInfo coords_setterinfo = { |
162 | | { (JSJitGetterOp)set_coords }, |
163 | | { prototypes::id::HTMLAreaElement }, |
164 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
165 | | JSJitInfo::Setter, |
166 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
167 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
168 | | false, /* isInfallible. False in setters. */ |
169 | | false, /* isMovable. Not relevant for setters. */ |
170 | | false, /* isEliminatable. Not relevant for setters. */ |
171 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
172 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
173 | | false, /* isTypedMethod. Only relevant for methods. */ |
174 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
175 | | }; |
176 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
177 | | static_assert(0 < 1, "There is no slot for us"); |
178 | | |
179 | | MOZ_CAN_RUN_SCRIPT static bool |
180 | | get_shape(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
181 | 0 | { |
182 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.shape", DOM, cx); |
183 | 0 |
|
184 | 0 | DOMString result; |
185 | 0 | self->GetShape(result); |
186 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
187 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
188 | 0 | return false; |
189 | 0 | } |
190 | 0 | return true; |
191 | 0 | } |
192 | | |
193 | | MOZ_CAN_RUN_SCRIPT static bool |
194 | | set_shape(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitSetterCallArgs args) |
195 | 0 | { |
196 | 0 | AUTO_PROFILER_LABEL_FAST("set HTMLAreaElement.shape", DOM, cx); |
197 | 0 |
|
198 | 0 | binding_detail::FakeString arg0; |
199 | 0 | if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) { |
200 | 0 | return false; |
201 | 0 | } |
202 | 0 | Maybe<AutoCEReaction> ceReaction; |
203 | 0 | if (CustomElementRegistry::IsCustomElementEnabled(cx, obj)) { |
204 | 0 | DocGroup* docGroup = self->GetDocGroup(); |
205 | 0 | if (docGroup) { |
206 | 0 | ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx); |
207 | 0 | } |
208 | 0 | } |
209 | 0 | FastErrorResult rv; |
210 | 0 | self->SetShape(NonNullHelper(Constify(arg0)), rv); |
211 | 0 | if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) { |
212 | 0 | return false; |
213 | 0 | } |
214 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
215 | 0 |
|
216 | 0 | return true; |
217 | 0 | } |
218 | | |
219 | | static const JSJitInfo shape_getterinfo = { |
220 | | { (JSJitGetterOp)get_shape }, |
221 | | { prototypes::id::HTMLAreaElement }, |
222 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
223 | | JSJitInfo::Getter, |
224 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
225 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
226 | | false, /* isInfallible. False in setters. */ |
227 | | false, /* isMovable. Not relevant for setters. */ |
228 | | false, /* isEliminatable. Not relevant for setters. */ |
229 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
230 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
231 | | false, /* isTypedMethod. Only relevant for methods. */ |
232 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
233 | | }; |
234 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
235 | | static_assert(0 < 1, "There is no slot for us"); |
236 | | static const JSJitInfo shape_setterinfo = { |
237 | | { (JSJitGetterOp)set_shape }, |
238 | | { prototypes::id::HTMLAreaElement }, |
239 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
240 | | JSJitInfo::Setter, |
241 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
242 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
243 | | false, /* isInfallible. False in setters. */ |
244 | | false, /* isMovable. Not relevant for setters. */ |
245 | | false, /* isEliminatable. Not relevant for setters. */ |
246 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
247 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
248 | | false, /* isTypedMethod. Only relevant for methods. */ |
249 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
250 | | }; |
251 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
252 | | static_assert(0 < 1, "There is no slot for us"); |
253 | | |
254 | | MOZ_CAN_RUN_SCRIPT static bool |
255 | | get_target(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
256 | 0 | { |
257 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.target", DOM, cx); |
258 | 0 |
|
259 | 0 | DOMString result; |
260 | 0 | self->GetTarget(result); |
261 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
262 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
263 | 0 | return false; |
264 | 0 | } |
265 | 0 | return true; |
266 | 0 | } |
267 | | |
268 | | MOZ_CAN_RUN_SCRIPT static bool |
269 | | set_target(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitSetterCallArgs args) |
270 | 0 | { |
271 | 0 | AUTO_PROFILER_LABEL_FAST("set HTMLAreaElement.target", DOM, cx); |
272 | 0 |
|
273 | 0 | binding_detail::FakeString arg0; |
274 | 0 | if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) { |
275 | 0 | return false; |
276 | 0 | } |
277 | 0 | Maybe<AutoCEReaction> ceReaction; |
278 | 0 | if (CustomElementRegistry::IsCustomElementEnabled(cx, obj)) { |
279 | 0 | DocGroup* docGroup = self->GetDocGroup(); |
280 | 0 | if (docGroup) { |
281 | 0 | ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx); |
282 | 0 | } |
283 | 0 | } |
284 | 0 | FastErrorResult rv; |
285 | 0 | self->SetTarget(NonNullHelper(Constify(arg0)), rv); |
286 | 0 | if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) { |
287 | 0 | return false; |
288 | 0 | } |
289 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
290 | 0 |
|
291 | 0 | return true; |
292 | 0 | } |
293 | | |
294 | | static const JSJitInfo target_getterinfo = { |
295 | | { (JSJitGetterOp)get_target }, |
296 | | { prototypes::id::HTMLAreaElement }, |
297 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
298 | | JSJitInfo::Getter, |
299 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
300 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
301 | | false, /* isInfallible. False in setters. */ |
302 | | false, /* isMovable. Not relevant for setters. */ |
303 | | false, /* isEliminatable. Not relevant for setters. */ |
304 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
305 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
306 | | false, /* isTypedMethod. Only relevant for methods. */ |
307 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
308 | | }; |
309 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
310 | | static_assert(0 < 1, "There is no slot for us"); |
311 | | static const JSJitInfo target_setterinfo = { |
312 | | { (JSJitGetterOp)set_target }, |
313 | | { prototypes::id::HTMLAreaElement }, |
314 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
315 | | JSJitInfo::Setter, |
316 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
317 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
318 | | false, /* isInfallible. False in setters. */ |
319 | | false, /* isMovable. Not relevant for setters. */ |
320 | | false, /* isEliminatable. Not relevant for setters. */ |
321 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
322 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
323 | | false, /* isTypedMethod. Only relevant for methods. */ |
324 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
325 | | }; |
326 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
327 | | static_assert(0 < 1, "There is no slot for us"); |
328 | | |
329 | | MOZ_CAN_RUN_SCRIPT static bool |
330 | | get_download(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
331 | 0 | { |
332 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.download", DOM, cx); |
333 | 0 |
|
334 | 0 | DOMString result; |
335 | 0 | self->GetDownload(result); |
336 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
337 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
338 | 0 | return false; |
339 | 0 | } |
340 | 0 | return true; |
341 | 0 | } |
342 | | |
343 | | MOZ_CAN_RUN_SCRIPT static bool |
344 | | set_download(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitSetterCallArgs args) |
345 | 0 | { |
346 | 0 | AUTO_PROFILER_LABEL_FAST("set HTMLAreaElement.download", DOM, cx); |
347 | 0 |
|
348 | 0 | binding_detail::FakeString arg0; |
349 | 0 | if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) { |
350 | 0 | return false; |
351 | 0 | } |
352 | 0 | Maybe<AutoCEReaction> ceReaction; |
353 | 0 | if (CustomElementRegistry::IsCustomElementEnabled(cx, obj)) { |
354 | 0 | DocGroup* docGroup = self->GetDocGroup(); |
355 | 0 | if (docGroup) { |
356 | 0 | ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx); |
357 | 0 | } |
358 | 0 | } |
359 | 0 | FastErrorResult rv; |
360 | 0 | self->SetDownload(NonNullHelper(Constify(arg0)), rv); |
361 | 0 | if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) { |
362 | 0 | return false; |
363 | 0 | } |
364 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
365 | 0 |
|
366 | 0 | return true; |
367 | 0 | } |
368 | | |
369 | | static const JSJitInfo download_getterinfo = { |
370 | | { (JSJitGetterOp)get_download }, |
371 | | { prototypes::id::HTMLAreaElement }, |
372 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
373 | | JSJitInfo::Getter, |
374 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
375 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
376 | | false, /* isInfallible. False in setters. */ |
377 | | false, /* isMovable. Not relevant for setters. */ |
378 | | false, /* isEliminatable. Not relevant for setters. */ |
379 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
380 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
381 | | false, /* isTypedMethod. Only relevant for methods. */ |
382 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
383 | | }; |
384 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
385 | | static_assert(0 < 1, "There is no slot for us"); |
386 | | static const JSJitInfo download_setterinfo = { |
387 | | { (JSJitGetterOp)set_download }, |
388 | | { prototypes::id::HTMLAreaElement }, |
389 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
390 | | JSJitInfo::Setter, |
391 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
392 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
393 | | false, /* isInfallible. False in setters. */ |
394 | | false, /* isMovable. Not relevant for setters. */ |
395 | | false, /* isEliminatable. Not relevant for setters. */ |
396 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
397 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
398 | | false, /* isTypedMethod. Only relevant for methods. */ |
399 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
400 | | }; |
401 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
402 | | static_assert(0 < 1, "There is no slot for us"); |
403 | | |
404 | | MOZ_CAN_RUN_SCRIPT static bool |
405 | | get_ping(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
406 | 0 | { |
407 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.ping", DOM, cx); |
408 | 0 |
|
409 | 0 | DOMString result; |
410 | 0 | self->GetPing(result); |
411 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
412 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
413 | 0 | return false; |
414 | 0 | } |
415 | 0 | return true; |
416 | 0 | } |
417 | | |
418 | | MOZ_CAN_RUN_SCRIPT static bool |
419 | | set_ping(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitSetterCallArgs args) |
420 | 0 | { |
421 | 0 | AUTO_PROFILER_LABEL_FAST("set HTMLAreaElement.ping", DOM, cx); |
422 | 0 |
|
423 | 0 | binding_detail::FakeString arg0; |
424 | 0 | if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) { |
425 | 0 | return false; |
426 | 0 | } |
427 | 0 | Maybe<AutoCEReaction> ceReaction; |
428 | 0 | if (CustomElementRegistry::IsCustomElementEnabled(cx, obj)) { |
429 | 0 | DocGroup* docGroup = self->GetDocGroup(); |
430 | 0 | if (docGroup) { |
431 | 0 | ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx); |
432 | 0 | } |
433 | 0 | } |
434 | 0 | FastErrorResult rv; |
435 | 0 | self->SetPing(NonNullHelper(Constify(arg0)), rv); |
436 | 0 | if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) { |
437 | 0 | return false; |
438 | 0 | } |
439 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
440 | 0 |
|
441 | 0 | return true; |
442 | 0 | } |
443 | | |
444 | | static const JSJitInfo ping_getterinfo = { |
445 | | { (JSJitGetterOp)get_ping }, |
446 | | { prototypes::id::HTMLAreaElement }, |
447 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
448 | | JSJitInfo::Getter, |
449 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
450 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
451 | | false, /* isInfallible. False in setters. */ |
452 | | false, /* isMovable. Not relevant for setters. */ |
453 | | false, /* isEliminatable. Not relevant for setters. */ |
454 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
455 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
456 | | false, /* isTypedMethod. Only relevant for methods. */ |
457 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
458 | | }; |
459 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
460 | | static_assert(0 < 1, "There is no slot for us"); |
461 | | static const JSJitInfo ping_setterinfo = { |
462 | | { (JSJitGetterOp)set_ping }, |
463 | | { prototypes::id::HTMLAreaElement }, |
464 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
465 | | JSJitInfo::Setter, |
466 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
467 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
468 | | false, /* isInfallible. False in setters. */ |
469 | | false, /* isMovable. Not relevant for setters. */ |
470 | | false, /* isEliminatable. Not relevant for setters. */ |
471 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
472 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
473 | | false, /* isTypedMethod. Only relevant for methods. */ |
474 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
475 | | }; |
476 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
477 | | static_assert(0 < 1, "There is no slot for us"); |
478 | | |
479 | | MOZ_CAN_RUN_SCRIPT static bool |
480 | | get_rel(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
481 | 0 | { |
482 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.rel", DOM, cx); |
483 | 0 |
|
484 | 0 | DOMString result; |
485 | 0 | self->GetRel(result); |
486 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
487 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
488 | 0 | return false; |
489 | 0 | } |
490 | 0 | return true; |
491 | 0 | } |
492 | | |
493 | | MOZ_CAN_RUN_SCRIPT static bool |
494 | | set_rel(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitSetterCallArgs args) |
495 | 0 | { |
496 | 0 | AUTO_PROFILER_LABEL_FAST("set HTMLAreaElement.rel", DOM, cx); |
497 | 0 |
|
498 | 0 | binding_detail::FakeString arg0; |
499 | 0 | if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) { |
500 | 0 | return false; |
501 | 0 | } |
502 | 0 | Maybe<AutoCEReaction> ceReaction; |
503 | 0 | if (CustomElementRegistry::IsCustomElementEnabled(cx, obj)) { |
504 | 0 | DocGroup* docGroup = self->GetDocGroup(); |
505 | 0 | if (docGroup) { |
506 | 0 | ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx); |
507 | 0 | } |
508 | 0 | } |
509 | 0 | FastErrorResult rv; |
510 | 0 | self->SetRel(NonNullHelper(Constify(arg0)), rv); |
511 | 0 | if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) { |
512 | 0 | return false; |
513 | 0 | } |
514 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
515 | 0 |
|
516 | 0 | return true; |
517 | 0 | } |
518 | | |
519 | | static const JSJitInfo rel_getterinfo = { |
520 | | { (JSJitGetterOp)get_rel }, |
521 | | { prototypes::id::HTMLAreaElement }, |
522 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
523 | | JSJitInfo::Getter, |
524 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
525 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
526 | | false, /* isInfallible. False in setters. */ |
527 | | false, /* isMovable. Not relevant for setters. */ |
528 | | false, /* isEliminatable. Not relevant for setters. */ |
529 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
530 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
531 | | false, /* isTypedMethod. Only relevant for methods. */ |
532 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
533 | | }; |
534 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
535 | | static_assert(0 < 1, "There is no slot for us"); |
536 | | static const JSJitInfo rel_setterinfo = { |
537 | | { (JSJitGetterOp)set_rel }, |
538 | | { prototypes::id::HTMLAreaElement }, |
539 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
540 | | JSJitInfo::Setter, |
541 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
542 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
543 | | false, /* isInfallible. False in setters. */ |
544 | | false, /* isMovable. Not relevant for setters. */ |
545 | | false, /* isEliminatable. Not relevant for setters. */ |
546 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
547 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
548 | | false, /* isTypedMethod. Only relevant for methods. */ |
549 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
550 | | }; |
551 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
552 | | static_assert(0 < 1, "There is no slot for us"); |
553 | | |
554 | | MOZ_CAN_RUN_SCRIPT static bool |
555 | | get_referrerPolicy(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
556 | 0 | { |
557 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.referrerPolicy", DOM, cx); |
558 | 0 |
|
559 | 0 | DOMString result; |
560 | 0 | self->GetReferrerPolicy(result); |
561 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
562 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
563 | 0 | return false; |
564 | 0 | } |
565 | 0 | return true; |
566 | 0 | } |
567 | | |
568 | | MOZ_CAN_RUN_SCRIPT static bool |
569 | | set_referrerPolicy(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitSetterCallArgs args) |
570 | 0 | { |
571 | 0 | AUTO_PROFILER_LABEL_FAST("set HTMLAreaElement.referrerPolicy", DOM, cx); |
572 | 0 |
|
573 | 0 | binding_detail::FakeString arg0; |
574 | 0 | if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) { |
575 | 0 | return false; |
576 | 0 | } |
577 | 0 | Maybe<AutoCEReaction> ceReaction; |
578 | 0 | if (CustomElementRegistry::IsCustomElementEnabled(cx, obj)) { |
579 | 0 | DocGroup* docGroup = self->GetDocGroup(); |
580 | 0 | if (docGroup) { |
581 | 0 | ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx); |
582 | 0 | } |
583 | 0 | } |
584 | 0 | FastErrorResult rv; |
585 | 0 | self->SetReferrerPolicy(NonNullHelper(Constify(arg0)), rv); |
586 | 0 | if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) { |
587 | 0 | return false; |
588 | 0 | } |
589 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
590 | 0 |
|
591 | 0 | return true; |
592 | 0 | } |
593 | | |
594 | | static const JSJitInfo referrerPolicy_getterinfo = { |
595 | | { (JSJitGetterOp)get_referrerPolicy }, |
596 | | { prototypes::id::HTMLAreaElement }, |
597 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
598 | | JSJitInfo::Getter, |
599 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
600 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
601 | | false, /* isInfallible. False in setters. */ |
602 | | false, /* isMovable. Not relevant for setters. */ |
603 | | false, /* isEliminatable. Not relevant for setters. */ |
604 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
605 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
606 | | false, /* isTypedMethod. Only relevant for methods. */ |
607 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
608 | | }; |
609 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
610 | | static_assert(0 < 1, "There is no slot for us"); |
611 | | static const JSJitInfo referrerPolicy_setterinfo = { |
612 | | { (JSJitGetterOp)set_referrerPolicy }, |
613 | | { prototypes::id::HTMLAreaElement }, |
614 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
615 | | JSJitInfo::Setter, |
616 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
617 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
618 | | false, /* isInfallible. False in setters. */ |
619 | | false, /* isMovable. Not relevant for setters. */ |
620 | | false, /* isEliminatable. Not relevant for setters. */ |
621 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
622 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
623 | | false, /* isTypedMethod. Only relevant for methods. */ |
624 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
625 | | }; |
626 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
627 | | static_assert(0 < 1, "There is no slot for us"); |
628 | | |
629 | | MOZ_CAN_RUN_SCRIPT static bool |
630 | | get_relList(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
631 | 0 | { |
632 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.relList", DOM, cx); |
633 | 0 |
|
634 | 0 | auto result(StrongOrRawPtr<nsDOMTokenList>(self->RelList())); |
635 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
636 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
637 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
638 | 0 | return false; |
639 | 0 | } |
640 | 0 | return true; |
641 | 0 | } |
642 | | |
643 | | MOZ_CAN_RUN_SCRIPT static bool |
644 | | set_relList(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitSetterCallArgs args) |
645 | 0 | { |
646 | 0 | AUTO_PROFILER_LABEL_FAST("set HTMLAreaElement.relList", DOM, cx); |
647 | 0 |
|
648 | 0 | JS::Rooted<JS::Value> v(cx); |
649 | 0 | if (!JS_GetProperty(cx, obj, "relList", &v)) { |
650 | 0 | return false; |
651 | 0 | } |
652 | 0 | |
653 | 0 | if (!v.isObject()) { |
654 | 0 | return ThrowErrorMessage(cx, MSG_NOT_OBJECT, "HTMLAreaElement.relList"); |
655 | 0 | } |
656 | 0 | |
657 | 0 | JS::Rooted<JSObject*> targetObj(cx, &v.toObject()); |
658 | 0 | return JS_SetProperty(cx, targetObj, "value", args[0]); |
659 | 0 | } |
660 | | |
661 | | static const JSJitInfo relList_getterinfo = { |
662 | | { (JSJitGetterOp)get_relList }, |
663 | | { prototypes::id::HTMLAreaElement }, |
664 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
665 | | JSJitInfo::Getter, |
666 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
667 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
668 | | false, /* isInfallible. False in setters. */ |
669 | | false, /* isMovable. Not relevant for setters. */ |
670 | | false, /* isEliminatable. Not relevant for setters. */ |
671 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
672 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
673 | | false, /* isTypedMethod. Only relevant for methods. */ |
674 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
675 | | }; |
676 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
677 | | static_assert(0 < 1, "There is no slot for us"); |
678 | | static const JSJitInfo relList_setterinfo = { |
679 | | { (JSJitGetterOp)set_relList }, |
680 | | { prototypes::id::HTMLAreaElement }, |
681 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
682 | | JSJitInfo::Setter, |
683 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
684 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
685 | | false, /* isInfallible. False in setters. */ |
686 | | false, /* isMovable. Not relevant for setters. */ |
687 | | false, /* isEliminatable. Not relevant for setters. */ |
688 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
689 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
690 | | false, /* isTypedMethod. Only relevant for methods. */ |
691 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
692 | | }; |
693 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
694 | | static_assert(0 < 1, "There is no slot for us"); |
695 | | |
696 | | MOZ_CAN_RUN_SCRIPT static bool |
697 | | get_noHref(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
698 | 0 | { |
699 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.noHref", DOM, cx); |
700 | 0 |
|
701 | 0 | bool result(self->NoHref()); |
702 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
703 | 0 | args.rval().setBoolean(result); |
704 | 0 | return true; |
705 | 0 | } |
706 | | |
707 | | MOZ_CAN_RUN_SCRIPT static bool |
708 | | set_noHref(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitSetterCallArgs args) |
709 | 0 | { |
710 | 0 | AUTO_PROFILER_LABEL_FAST("set HTMLAreaElement.noHref", DOM, cx); |
711 | 0 |
|
712 | 0 | bool arg0; |
713 | 0 | if (!ValueToPrimitive<bool, eDefault>(cx, args[0], &arg0)) { |
714 | 0 | return false; |
715 | 0 | } |
716 | 0 | Maybe<AutoCEReaction> ceReaction; |
717 | 0 | if (CustomElementRegistry::IsCustomElementEnabled(cx, obj)) { |
718 | 0 | DocGroup* docGroup = self->GetDocGroup(); |
719 | 0 | if (docGroup) { |
720 | 0 | ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx); |
721 | 0 | } |
722 | 0 | } |
723 | 0 | FastErrorResult rv; |
724 | 0 | self->SetNoHref(arg0, rv); |
725 | 0 | if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) { |
726 | 0 | return false; |
727 | 0 | } |
728 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
729 | 0 |
|
730 | 0 | return true; |
731 | 0 | } |
732 | | |
733 | | static const JSJitInfo noHref_getterinfo = { |
734 | | { (JSJitGetterOp)get_noHref }, |
735 | | { prototypes::id::HTMLAreaElement }, |
736 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
737 | | JSJitInfo::Getter, |
738 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
739 | | JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */ |
740 | | true, /* isInfallible. False in setters. */ |
741 | | false, /* isMovable. Not relevant for setters. */ |
742 | | false, /* isEliminatable. Not relevant for setters. */ |
743 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
744 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
745 | | false, /* isTypedMethod. Only relevant for methods. */ |
746 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
747 | | }; |
748 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
749 | | static_assert(0 < 1, "There is no slot for us"); |
750 | | static const JSJitInfo noHref_setterinfo = { |
751 | | { (JSJitGetterOp)set_noHref }, |
752 | | { prototypes::id::HTMLAreaElement }, |
753 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
754 | | JSJitInfo::Setter, |
755 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
756 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
757 | | false, /* isInfallible. False in setters. */ |
758 | | false, /* isMovable. Not relevant for setters. */ |
759 | | false, /* isEliminatable. Not relevant for setters. */ |
760 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
761 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
762 | | false, /* isTypedMethod. Only relevant for methods. */ |
763 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
764 | | }; |
765 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
766 | | static_assert(0 < 1, "There is no slot for us"); |
767 | | |
768 | | MOZ_CAN_RUN_SCRIPT static bool |
769 | | __stringifier(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, const JSJitMethodCallArgs& args) |
770 | 0 | { |
771 | 0 | AUTO_PROFILER_LABEL_FAST("HTMLAreaElement.__stringifier", DOM, cx); |
772 | 0 |
|
773 | 0 | DOMString result; |
774 | 0 | self->Stringify(result); |
775 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
776 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
777 | 0 | return false; |
778 | 0 | } |
779 | 0 | return true; |
780 | 0 | } |
781 | | |
782 | | static const JSJitInfo __stringifier_methodinfo = { |
783 | | { (JSJitGetterOp)__stringifier }, |
784 | | { prototypes::id::HTMLAreaElement }, |
785 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
786 | | JSJitInfo::Method, |
787 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
788 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
789 | | false, /* isInfallible. False in setters. */ |
790 | | false, /* isMovable. Not relevant for setters. */ |
791 | | false, /* isEliminatable. Not relevant for setters. */ |
792 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
793 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
794 | | false, /* isTypedMethod. Only relevant for methods. */ |
795 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
796 | | }; |
797 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
798 | | static_assert(0 < 1, "There is no slot for us"); |
799 | | |
800 | | MOZ_CAN_RUN_SCRIPT static bool |
801 | | get_href(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
802 | 0 | { |
803 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.href", DOM, cx); |
804 | 0 |
|
805 | 0 | DOMString result; |
806 | 0 | self->GetHref(result); |
807 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
808 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
809 | 0 | return false; |
810 | 0 | } |
811 | 0 | return true; |
812 | 0 | } |
813 | | |
814 | | MOZ_CAN_RUN_SCRIPT static bool |
815 | | set_href(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitSetterCallArgs args) |
816 | 0 | { |
817 | 0 | AUTO_PROFILER_LABEL_FAST("set HTMLAreaElement.href", DOM, cx); |
818 | 0 |
|
819 | 0 | binding_detail::FakeString arg0; |
820 | 0 | if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) { |
821 | 0 | return false; |
822 | 0 | } |
823 | 0 | NormalizeUSVString(arg0); |
824 | 0 | Maybe<AutoCEReaction> ceReaction; |
825 | 0 | if (CustomElementRegistry::IsCustomElementEnabled(cx, obj)) { |
826 | 0 | DocGroup* docGroup = self->GetDocGroup(); |
827 | 0 | if (docGroup) { |
828 | 0 | ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx); |
829 | 0 | } |
830 | 0 | } |
831 | 0 | FastErrorResult rv; |
832 | 0 | self->SetHref(Constify(arg0), rv); |
833 | 0 | if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) { |
834 | 0 | return false; |
835 | 0 | } |
836 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
837 | 0 |
|
838 | 0 | return true; |
839 | 0 | } |
840 | | |
841 | | static const JSJitInfo href_getterinfo = { |
842 | | { (JSJitGetterOp)get_href }, |
843 | | { prototypes::id::HTMLAreaElement }, |
844 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
845 | | JSJitInfo::Getter, |
846 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
847 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
848 | | false, /* isInfallible. False in setters. */ |
849 | | false, /* isMovable. Not relevant for setters. */ |
850 | | false, /* isEliminatable. Not relevant for setters. */ |
851 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
852 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
853 | | false, /* isTypedMethod. Only relevant for methods. */ |
854 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
855 | | }; |
856 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
857 | | static_assert(0 < 1, "There is no slot for us"); |
858 | | static const JSJitInfo href_setterinfo = { |
859 | | { (JSJitGetterOp)set_href }, |
860 | | { prototypes::id::HTMLAreaElement }, |
861 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
862 | | JSJitInfo::Setter, |
863 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
864 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
865 | | false, /* isInfallible. False in setters. */ |
866 | | false, /* isMovable. Not relevant for setters. */ |
867 | | false, /* isEliminatable. Not relevant for setters. */ |
868 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
869 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
870 | | false, /* isTypedMethod. Only relevant for methods. */ |
871 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
872 | | }; |
873 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
874 | | static_assert(0 < 1, "There is no slot for us"); |
875 | | |
876 | | MOZ_CAN_RUN_SCRIPT static bool |
877 | | get_origin(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
878 | 0 | { |
879 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.origin", DOM, cx); |
880 | 0 |
|
881 | 0 | DOMString result; |
882 | 0 | self->GetOrigin(result); |
883 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
884 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
885 | 0 | return false; |
886 | 0 | } |
887 | 0 | return true; |
888 | 0 | } |
889 | | |
890 | | static const JSJitInfo origin_getterinfo = { |
891 | | { (JSJitGetterOp)get_origin }, |
892 | | { prototypes::id::HTMLAreaElement }, |
893 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
894 | | JSJitInfo::Getter, |
895 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
896 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
897 | | false, /* isInfallible. False in setters. */ |
898 | | false, /* isMovable. Not relevant for setters. */ |
899 | | false, /* isEliminatable. Not relevant for setters. */ |
900 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
901 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
902 | | false, /* isTypedMethod. Only relevant for methods. */ |
903 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
904 | | }; |
905 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
906 | | static_assert(0 < 1, "There is no slot for us"); |
907 | | |
908 | | MOZ_CAN_RUN_SCRIPT static bool |
909 | | get_protocol(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
910 | 0 | { |
911 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.protocol", DOM, cx); |
912 | 0 |
|
913 | 0 | DOMString result; |
914 | 0 | self->GetProtocol(result); |
915 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
916 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
917 | 0 | return false; |
918 | 0 | } |
919 | 0 | return true; |
920 | 0 | } |
921 | | |
922 | | MOZ_CAN_RUN_SCRIPT static bool |
923 | | set_protocol(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitSetterCallArgs args) |
924 | 0 | { |
925 | 0 | AUTO_PROFILER_LABEL_FAST("set HTMLAreaElement.protocol", DOM, cx); |
926 | 0 |
|
927 | 0 | binding_detail::FakeString arg0; |
928 | 0 | if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) { |
929 | 0 | return false; |
930 | 0 | } |
931 | 0 | NormalizeUSVString(arg0); |
932 | 0 | Maybe<AutoCEReaction> ceReaction; |
933 | 0 | if (CustomElementRegistry::IsCustomElementEnabled(cx, obj)) { |
934 | 0 | DocGroup* docGroup = self->GetDocGroup(); |
935 | 0 | if (docGroup) { |
936 | 0 | ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx); |
937 | 0 | } |
938 | 0 | } |
939 | 0 | self->SetProtocol(Constify(arg0)); |
940 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
941 | 0 |
|
942 | 0 | return true; |
943 | 0 | } |
944 | | |
945 | | static const JSJitInfo protocol_getterinfo = { |
946 | | { (JSJitGetterOp)get_protocol }, |
947 | | { prototypes::id::HTMLAreaElement }, |
948 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
949 | | JSJitInfo::Getter, |
950 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
951 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
952 | | false, /* isInfallible. False in setters. */ |
953 | | false, /* isMovable. Not relevant for setters. */ |
954 | | false, /* isEliminatable. Not relevant for setters. */ |
955 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
956 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
957 | | false, /* isTypedMethod. Only relevant for methods. */ |
958 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
959 | | }; |
960 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
961 | | static_assert(0 < 1, "There is no slot for us"); |
962 | | static const JSJitInfo protocol_setterinfo = { |
963 | | { (JSJitGetterOp)set_protocol }, |
964 | | { prototypes::id::HTMLAreaElement }, |
965 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
966 | | JSJitInfo::Setter, |
967 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
968 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
969 | | false, /* isInfallible. False in setters. */ |
970 | | false, /* isMovable. Not relevant for setters. */ |
971 | | false, /* isEliminatable. Not relevant for setters. */ |
972 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
973 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
974 | | false, /* isTypedMethod. Only relevant for methods. */ |
975 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
976 | | }; |
977 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
978 | | static_assert(0 < 1, "There is no slot for us"); |
979 | | |
980 | | MOZ_CAN_RUN_SCRIPT static bool |
981 | | get_username(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
982 | 0 | { |
983 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.username", DOM, cx); |
984 | 0 |
|
985 | 0 | DOMString result; |
986 | 0 | self->GetUsername(result); |
987 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
988 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
989 | 0 | return false; |
990 | 0 | } |
991 | 0 | return true; |
992 | 0 | } |
993 | | |
994 | | MOZ_CAN_RUN_SCRIPT static bool |
995 | | set_username(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitSetterCallArgs args) |
996 | 0 | { |
997 | 0 | AUTO_PROFILER_LABEL_FAST("set HTMLAreaElement.username", DOM, cx); |
998 | 0 |
|
999 | 0 | binding_detail::FakeString arg0; |
1000 | 0 | if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) { |
1001 | 0 | return false; |
1002 | 0 | } |
1003 | 0 | NormalizeUSVString(arg0); |
1004 | 0 | Maybe<AutoCEReaction> ceReaction; |
1005 | 0 | if (CustomElementRegistry::IsCustomElementEnabled(cx, obj)) { |
1006 | 0 | DocGroup* docGroup = self->GetDocGroup(); |
1007 | 0 | if (docGroup) { |
1008 | 0 | ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx); |
1009 | 0 | } |
1010 | 0 | } |
1011 | 0 | self->SetUsername(Constify(arg0)); |
1012 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1013 | 0 |
|
1014 | 0 | return true; |
1015 | 0 | } |
1016 | | |
1017 | | static const JSJitInfo username_getterinfo = { |
1018 | | { (JSJitGetterOp)get_username }, |
1019 | | { prototypes::id::HTMLAreaElement }, |
1020 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
1021 | | JSJitInfo::Getter, |
1022 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1023 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
1024 | | false, /* isInfallible. False in setters. */ |
1025 | | false, /* isMovable. Not relevant for setters. */ |
1026 | | false, /* isEliminatable. Not relevant for setters. */ |
1027 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1028 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1029 | | false, /* isTypedMethod. Only relevant for methods. */ |
1030 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1031 | | }; |
1032 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1033 | | static_assert(0 < 1, "There is no slot for us"); |
1034 | | static const JSJitInfo username_setterinfo = { |
1035 | | { (JSJitGetterOp)set_username }, |
1036 | | { prototypes::id::HTMLAreaElement }, |
1037 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
1038 | | JSJitInfo::Setter, |
1039 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1040 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1041 | | false, /* isInfallible. False in setters. */ |
1042 | | false, /* isMovable. Not relevant for setters. */ |
1043 | | false, /* isEliminatable. Not relevant for setters. */ |
1044 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1045 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1046 | | false, /* isTypedMethod. Only relevant for methods. */ |
1047 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1048 | | }; |
1049 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1050 | | static_assert(0 < 1, "There is no slot for us"); |
1051 | | |
1052 | | MOZ_CAN_RUN_SCRIPT static bool |
1053 | | get_password(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
1054 | 0 | { |
1055 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.password", DOM, cx); |
1056 | 0 |
|
1057 | 0 | DOMString result; |
1058 | 0 | self->GetPassword(result); |
1059 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1060 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
1061 | 0 | return false; |
1062 | 0 | } |
1063 | 0 | return true; |
1064 | 0 | } |
1065 | | |
1066 | | MOZ_CAN_RUN_SCRIPT static bool |
1067 | | set_password(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitSetterCallArgs args) |
1068 | 0 | { |
1069 | 0 | AUTO_PROFILER_LABEL_FAST("set HTMLAreaElement.password", DOM, cx); |
1070 | 0 |
|
1071 | 0 | binding_detail::FakeString arg0; |
1072 | 0 | if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) { |
1073 | 0 | return false; |
1074 | 0 | } |
1075 | 0 | NormalizeUSVString(arg0); |
1076 | 0 | Maybe<AutoCEReaction> ceReaction; |
1077 | 0 | if (CustomElementRegistry::IsCustomElementEnabled(cx, obj)) { |
1078 | 0 | DocGroup* docGroup = self->GetDocGroup(); |
1079 | 0 | if (docGroup) { |
1080 | 0 | ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx); |
1081 | 0 | } |
1082 | 0 | } |
1083 | 0 | self->SetPassword(Constify(arg0)); |
1084 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1085 | 0 |
|
1086 | 0 | return true; |
1087 | 0 | } |
1088 | | |
1089 | | static const JSJitInfo password_getterinfo = { |
1090 | | { (JSJitGetterOp)get_password }, |
1091 | | { prototypes::id::HTMLAreaElement }, |
1092 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
1093 | | JSJitInfo::Getter, |
1094 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1095 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
1096 | | false, /* isInfallible. False in setters. */ |
1097 | | false, /* isMovable. Not relevant for setters. */ |
1098 | | false, /* isEliminatable. Not relevant for setters. */ |
1099 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1100 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1101 | | false, /* isTypedMethod. Only relevant for methods. */ |
1102 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1103 | | }; |
1104 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1105 | | static_assert(0 < 1, "There is no slot for us"); |
1106 | | static const JSJitInfo password_setterinfo = { |
1107 | | { (JSJitGetterOp)set_password }, |
1108 | | { prototypes::id::HTMLAreaElement }, |
1109 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
1110 | | JSJitInfo::Setter, |
1111 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1112 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1113 | | false, /* isInfallible. False in setters. */ |
1114 | | false, /* isMovable. Not relevant for setters. */ |
1115 | | false, /* isEliminatable. Not relevant for setters. */ |
1116 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1117 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1118 | | false, /* isTypedMethod. Only relevant for methods. */ |
1119 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1120 | | }; |
1121 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1122 | | static_assert(0 < 1, "There is no slot for us"); |
1123 | | |
1124 | | MOZ_CAN_RUN_SCRIPT static bool |
1125 | | get_host(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
1126 | 0 | { |
1127 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.host", DOM, cx); |
1128 | 0 |
|
1129 | 0 | DOMString result; |
1130 | 0 | self->GetHost(result); |
1131 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1132 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
1133 | 0 | return false; |
1134 | 0 | } |
1135 | 0 | return true; |
1136 | 0 | } |
1137 | | |
1138 | | MOZ_CAN_RUN_SCRIPT static bool |
1139 | | set_host(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitSetterCallArgs args) |
1140 | 0 | { |
1141 | 0 | AUTO_PROFILER_LABEL_FAST("set HTMLAreaElement.host", DOM, cx); |
1142 | 0 |
|
1143 | 0 | binding_detail::FakeString arg0; |
1144 | 0 | if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) { |
1145 | 0 | return false; |
1146 | 0 | } |
1147 | 0 | NormalizeUSVString(arg0); |
1148 | 0 | Maybe<AutoCEReaction> ceReaction; |
1149 | 0 | if (CustomElementRegistry::IsCustomElementEnabled(cx, obj)) { |
1150 | 0 | DocGroup* docGroup = self->GetDocGroup(); |
1151 | 0 | if (docGroup) { |
1152 | 0 | ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx); |
1153 | 0 | } |
1154 | 0 | } |
1155 | 0 | self->SetHost(Constify(arg0)); |
1156 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1157 | 0 |
|
1158 | 0 | return true; |
1159 | 0 | } |
1160 | | |
1161 | | static const JSJitInfo host_getterinfo = { |
1162 | | { (JSJitGetterOp)get_host }, |
1163 | | { prototypes::id::HTMLAreaElement }, |
1164 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
1165 | | JSJitInfo::Getter, |
1166 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1167 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
1168 | | false, /* isInfallible. False in setters. */ |
1169 | | false, /* isMovable. Not relevant for setters. */ |
1170 | | false, /* isEliminatable. Not relevant for setters. */ |
1171 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1172 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1173 | | false, /* isTypedMethod. Only relevant for methods. */ |
1174 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1175 | | }; |
1176 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1177 | | static_assert(0 < 1, "There is no slot for us"); |
1178 | | static const JSJitInfo host_setterinfo = { |
1179 | | { (JSJitGetterOp)set_host }, |
1180 | | { prototypes::id::HTMLAreaElement }, |
1181 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
1182 | | JSJitInfo::Setter, |
1183 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1184 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1185 | | false, /* isInfallible. False in setters. */ |
1186 | | false, /* isMovable. Not relevant for setters. */ |
1187 | | false, /* isEliminatable. Not relevant for setters. */ |
1188 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1189 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1190 | | false, /* isTypedMethod. Only relevant for methods. */ |
1191 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1192 | | }; |
1193 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1194 | | static_assert(0 < 1, "There is no slot for us"); |
1195 | | |
1196 | | MOZ_CAN_RUN_SCRIPT static bool |
1197 | | get_hostname(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
1198 | 0 | { |
1199 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.hostname", DOM, cx); |
1200 | 0 |
|
1201 | 0 | DOMString result; |
1202 | 0 | self->GetHostname(result); |
1203 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1204 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
1205 | 0 | return false; |
1206 | 0 | } |
1207 | 0 | return true; |
1208 | 0 | } |
1209 | | |
1210 | | MOZ_CAN_RUN_SCRIPT static bool |
1211 | | set_hostname(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitSetterCallArgs args) |
1212 | 0 | { |
1213 | 0 | AUTO_PROFILER_LABEL_FAST("set HTMLAreaElement.hostname", DOM, cx); |
1214 | 0 |
|
1215 | 0 | binding_detail::FakeString arg0; |
1216 | 0 | if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) { |
1217 | 0 | return false; |
1218 | 0 | } |
1219 | 0 | NormalizeUSVString(arg0); |
1220 | 0 | Maybe<AutoCEReaction> ceReaction; |
1221 | 0 | if (CustomElementRegistry::IsCustomElementEnabled(cx, obj)) { |
1222 | 0 | DocGroup* docGroup = self->GetDocGroup(); |
1223 | 0 | if (docGroup) { |
1224 | 0 | ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx); |
1225 | 0 | } |
1226 | 0 | } |
1227 | 0 | self->SetHostname(Constify(arg0)); |
1228 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1229 | 0 |
|
1230 | 0 | return true; |
1231 | 0 | } |
1232 | | |
1233 | | static const JSJitInfo hostname_getterinfo = { |
1234 | | { (JSJitGetterOp)get_hostname }, |
1235 | | { prototypes::id::HTMLAreaElement }, |
1236 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
1237 | | JSJitInfo::Getter, |
1238 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1239 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
1240 | | false, /* isInfallible. False in setters. */ |
1241 | | false, /* isMovable. Not relevant for setters. */ |
1242 | | false, /* isEliminatable. Not relevant for setters. */ |
1243 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1244 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1245 | | false, /* isTypedMethod. Only relevant for methods. */ |
1246 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1247 | | }; |
1248 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1249 | | static_assert(0 < 1, "There is no slot for us"); |
1250 | | static const JSJitInfo hostname_setterinfo = { |
1251 | | { (JSJitGetterOp)set_hostname }, |
1252 | | { prototypes::id::HTMLAreaElement }, |
1253 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
1254 | | JSJitInfo::Setter, |
1255 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1256 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1257 | | false, /* isInfallible. False in setters. */ |
1258 | | false, /* isMovable. Not relevant for setters. */ |
1259 | | false, /* isEliminatable. Not relevant for setters. */ |
1260 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1261 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1262 | | false, /* isTypedMethod. Only relevant for methods. */ |
1263 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1264 | | }; |
1265 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1266 | | static_assert(0 < 1, "There is no slot for us"); |
1267 | | |
1268 | | MOZ_CAN_RUN_SCRIPT static bool |
1269 | | get_port(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
1270 | 0 | { |
1271 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.port", DOM, cx); |
1272 | 0 |
|
1273 | 0 | DOMString result; |
1274 | 0 | self->GetPort(result); |
1275 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1276 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
1277 | 0 | return false; |
1278 | 0 | } |
1279 | 0 | return true; |
1280 | 0 | } |
1281 | | |
1282 | | MOZ_CAN_RUN_SCRIPT static bool |
1283 | | set_port(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitSetterCallArgs args) |
1284 | 0 | { |
1285 | 0 | AUTO_PROFILER_LABEL_FAST("set HTMLAreaElement.port", DOM, cx); |
1286 | 0 |
|
1287 | 0 | binding_detail::FakeString arg0; |
1288 | 0 | if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) { |
1289 | 0 | return false; |
1290 | 0 | } |
1291 | 0 | NormalizeUSVString(arg0); |
1292 | 0 | Maybe<AutoCEReaction> ceReaction; |
1293 | 0 | if (CustomElementRegistry::IsCustomElementEnabled(cx, obj)) { |
1294 | 0 | DocGroup* docGroup = self->GetDocGroup(); |
1295 | 0 | if (docGroup) { |
1296 | 0 | ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx); |
1297 | 0 | } |
1298 | 0 | } |
1299 | 0 | self->SetPort(Constify(arg0)); |
1300 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1301 | 0 |
|
1302 | 0 | return true; |
1303 | 0 | } |
1304 | | |
1305 | | static const JSJitInfo port_getterinfo = { |
1306 | | { (JSJitGetterOp)get_port }, |
1307 | | { prototypes::id::HTMLAreaElement }, |
1308 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
1309 | | JSJitInfo::Getter, |
1310 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1311 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
1312 | | false, /* isInfallible. False in setters. */ |
1313 | | false, /* isMovable. Not relevant for setters. */ |
1314 | | false, /* isEliminatable. Not relevant for setters. */ |
1315 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1316 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1317 | | false, /* isTypedMethod. Only relevant for methods. */ |
1318 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1319 | | }; |
1320 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1321 | | static_assert(0 < 1, "There is no slot for us"); |
1322 | | static const JSJitInfo port_setterinfo = { |
1323 | | { (JSJitGetterOp)set_port }, |
1324 | | { prototypes::id::HTMLAreaElement }, |
1325 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
1326 | | JSJitInfo::Setter, |
1327 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1328 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1329 | | false, /* isInfallible. False in setters. */ |
1330 | | false, /* isMovable. Not relevant for setters. */ |
1331 | | false, /* isEliminatable. Not relevant for setters. */ |
1332 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1333 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1334 | | false, /* isTypedMethod. Only relevant for methods. */ |
1335 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1336 | | }; |
1337 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1338 | | static_assert(0 < 1, "There is no slot for us"); |
1339 | | |
1340 | | MOZ_CAN_RUN_SCRIPT static bool |
1341 | | get_pathname(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
1342 | 0 | { |
1343 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.pathname", DOM, cx); |
1344 | 0 |
|
1345 | 0 | DOMString result; |
1346 | 0 | self->GetPathname(result); |
1347 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1348 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
1349 | 0 | return false; |
1350 | 0 | } |
1351 | 0 | return true; |
1352 | 0 | } |
1353 | | |
1354 | | MOZ_CAN_RUN_SCRIPT static bool |
1355 | | set_pathname(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitSetterCallArgs args) |
1356 | 0 | { |
1357 | 0 | AUTO_PROFILER_LABEL_FAST("set HTMLAreaElement.pathname", DOM, cx); |
1358 | 0 |
|
1359 | 0 | binding_detail::FakeString arg0; |
1360 | 0 | if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) { |
1361 | 0 | return false; |
1362 | 0 | } |
1363 | 0 | NormalizeUSVString(arg0); |
1364 | 0 | Maybe<AutoCEReaction> ceReaction; |
1365 | 0 | if (CustomElementRegistry::IsCustomElementEnabled(cx, obj)) { |
1366 | 0 | DocGroup* docGroup = self->GetDocGroup(); |
1367 | 0 | if (docGroup) { |
1368 | 0 | ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx); |
1369 | 0 | } |
1370 | 0 | } |
1371 | 0 | self->SetPathname(Constify(arg0)); |
1372 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1373 | 0 |
|
1374 | 0 | return true; |
1375 | 0 | } |
1376 | | |
1377 | | static const JSJitInfo pathname_getterinfo = { |
1378 | | { (JSJitGetterOp)get_pathname }, |
1379 | | { prototypes::id::HTMLAreaElement }, |
1380 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
1381 | | JSJitInfo::Getter, |
1382 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1383 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
1384 | | false, /* isInfallible. False in setters. */ |
1385 | | false, /* isMovable. Not relevant for setters. */ |
1386 | | false, /* isEliminatable. Not relevant for setters. */ |
1387 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1388 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1389 | | false, /* isTypedMethod. Only relevant for methods. */ |
1390 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1391 | | }; |
1392 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1393 | | static_assert(0 < 1, "There is no slot for us"); |
1394 | | static const JSJitInfo pathname_setterinfo = { |
1395 | | { (JSJitGetterOp)set_pathname }, |
1396 | | { prototypes::id::HTMLAreaElement }, |
1397 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
1398 | | JSJitInfo::Setter, |
1399 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1400 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1401 | | false, /* isInfallible. False in setters. */ |
1402 | | false, /* isMovable. Not relevant for setters. */ |
1403 | | false, /* isEliminatable. Not relevant for setters. */ |
1404 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1405 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1406 | | false, /* isTypedMethod. Only relevant for methods. */ |
1407 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1408 | | }; |
1409 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1410 | | static_assert(0 < 1, "There is no slot for us"); |
1411 | | |
1412 | | MOZ_CAN_RUN_SCRIPT static bool |
1413 | | get_search(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
1414 | 0 | { |
1415 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.search", DOM, cx); |
1416 | 0 |
|
1417 | 0 | DOMString result; |
1418 | 0 | self->GetSearch(result); |
1419 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1420 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
1421 | 0 | return false; |
1422 | 0 | } |
1423 | 0 | return true; |
1424 | 0 | } |
1425 | | |
1426 | | MOZ_CAN_RUN_SCRIPT static bool |
1427 | | set_search(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitSetterCallArgs args) |
1428 | 0 | { |
1429 | 0 | AUTO_PROFILER_LABEL_FAST("set HTMLAreaElement.search", DOM, cx); |
1430 | 0 |
|
1431 | 0 | binding_detail::FakeString arg0; |
1432 | 0 | if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) { |
1433 | 0 | return false; |
1434 | 0 | } |
1435 | 0 | NormalizeUSVString(arg0); |
1436 | 0 | Maybe<AutoCEReaction> ceReaction; |
1437 | 0 | if (CustomElementRegistry::IsCustomElementEnabled(cx, obj)) { |
1438 | 0 | DocGroup* docGroup = self->GetDocGroup(); |
1439 | 0 | if (docGroup) { |
1440 | 0 | ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx); |
1441 | 0 | } |
1442 | 0 | } |
1443 | 0 | self->SetSearch(Constify(arg0)); |
1444 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1445 | 0 |
|
1446 | 0 | return true; |
1447 | 0 | } |
1448 | | |
1449 | | static const JSJitInfo search_getterinfo = { |
1450 | | { (JSJitGetterOp)get_search }, |
1451 | | { prototypes::id::HTMLAreaElement }, |
1452 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
1453 | | JSJitInfo::Getter, |
1454 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1455 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
1456 | | false, /* isInfallible. False in setters. */ |
1457 | | false, /* isMovable. Not relevant for setters. */ |
1458 | | false, /* isEliminatable. Not relevant for setters. */ |
1459 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1460 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1461 | | false, /* isTypedMethod. Only relevant for methods. */ |
1462 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1463 | | }; |
1464 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1465 | | static_assert(0 < 1, "There is no slot for us"); |
1466 | | static const JSJitInfo search_setterinfo = { |
1467 | | { (JSJitGetterOp)set_search }, |
1468 | | { prototypes::id::HTMLAreaElement }, |
1469 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
1470 | | JSJitInfo::Setter, |
1471 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1472 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1473 | | false, /* isInfallible. False in setters. */ |
1474 | | false, /* isMovable. Not relevant for setters. */ |
1475 | | false, /* isEliminatable. Not relevant for setters. */ |
1476 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1477 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1478 | | false, /* isTypedMethod. Only relevant for methods. */ |
1479 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1480 | | }; |
1481 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1482 | | static_assert(0 < 1, "There is no slot for us"); |
1483 | | |
1484 | | MOZ_CAN_RUN_SCRIPT static bool |
1485 | | get_hash(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitGetterCallArgs args) |
1486 | 0 | { |
1487 | 0 | AUTO_PROFILER_LABEL_FAST("get HTMLAreaElement.hash", DOM, cx); |
1488 | 0 |
|
1489 | 0 | DOMString result; |
1490 | 0 | self->GetHash(result); |
1491 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1492 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
1493 | 0 | return false; |
1494 | 0 | } |
1495 | 0 | return true; |
1496 | 0 | } |
1497 | | |
1498 | | MOZ_CAN_RUN_SCRIPT static bool |
1499 | | set_hash(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLAreaElement* self, JSJitSetterCallArgs args) |
1500 | 0 | { |
1501 | 0 | AUTO_PROFILER_LABEL_FAST("set HTMLAreaElement.hash", DOM, cx); |
1502 | 0 |
|
1503 | 0 | binding_detail::FakeString arg0; |
1504 | 0 | if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) { |
1505 | 0 | return false; |
1506 | 0 | } |
1507 | 0 | NormalizeUSVString(arg0); |
1508 | 0 | Maybe<AutoCEReaction> ceReaction; |
1509 | 0 | if (CustomElementRegistry::IsCustomElementEnabled(cx, obj)) { |
1510 | 0 | DocGroup* docGroup = self->GetDocGroup(); |
1511 | 0 | if (docGroup) { |
1512 | 0 | ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx); |
1513 | 0 | } |
1514 | 0 | } |
1515 | 0 | self->SetHash(Constify(arg0)); |
1516 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1517 | 0 |
|
1518 | 0 | return true; |
1519 | 0 | } |
1520 | | |
1521 | | static const JSJitInfo hash_getterinfo = { |
1522 | | { (JSJitGetterOp)get_hash }, |
1523 | | { prototypes::id::HTMLAreaElement }, |
1524 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
1525 | | JSJitInfo::Getter, |
1526 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1527 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
1528 | | false, /* isInfallible. False in setters. */ |
1529 | | false, /* isMovable. Not relevant for setters. */ |
1530 | | false, /* isEliminatable. Not relevant for setters. */ |
1531 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1532 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1533 | | false, /* isTypedMethod. Only relevant for methods. */ |
1534 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1535 | | }; |
1536 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1537 | | static_assert(0 < 1, "There is no slot for us"); |
1538 | | static const JSJitInfo hash_setterinfo = { |
1539 | | { (JSJitGetterOp)set_hash }, |
1540 | | { prototypes::id::HTMLAreaElement }, |
1541 | | { PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth }, |
1542 | | JSJitInfo::Setter, |
1543 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1544 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1545 | | false, /* isInfallible. False in setters. */ |
1546 | | false, /* isMovable. Not relevant for setters. */ |
1547 | | false, /* isEliminatable. Not relevant for setters. */ |
1548 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1549 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1550 | | false, /* isTypedMethod. Only relevant for methods. */ |
1551 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1552 | | }; |
1553 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1554 | | static_assert(0 < 1, "There is no slot for us"); |
1555 | | |
1556 | | static bool |
1557 | | _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val) |
1558 | 0 | { |
1559 | 0 | mozilla::dom::HTMLAreaElement* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::HTMLAreaElement>(obj); |
1560 | 0 | // We don't want to preserve if we don't have a wrapper, and we |
1561 | 0 | // obviously can't preserve if we're not initialized. |
1562 | 0 | if (self && self->GetWrapperPreserveColor()) { |
1563 | 0 | PreserveWrapper(self); |
1564 | 0 | } |
1565 | 0 | return true; |
1566 | 0 | } |
1567 | | |
1568 | | static void |
1569 | | _finalize(js::FreeOp* fop, JSObject* obj) |
1570 | 0 | { |
1571 | 0 | mozilla::dom::HTMLAreaElement* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::HTMLAreaElement>(obj); |
1572 | 0 | if (self) { |
1573 | 0 | ClearWrapper(self, self, obj); |
1574 | 0 | AddForDeferredFinalization<mozilla::dom::HTMLAreaElement>(self); |
1575 | 0 | } |
1576 | 0 | } |
1577 | | |
1578 | | static size_t |
1579 | | _objectMoved(JSObject* obj, JSObject* old) |
1580 | 0 | { |
1581 | 0 | mozilla::dom::HTMLAreaElement* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::HTMLAreaElement>(obj); |
1582 | 0 | if (self) { |
1583 | 0 | UpdateWrapper(self, self, obj, old); |
1584 | 0 | } |
1585 | 0 |
|
1586 | 0 | return 0; |
1587 | 0 | } |
1588 | | |
1589 | | // We deliberately use brace-elision to make Visual Studio produce better initalization code. |
1590 | | #if defined(__clang__) |
1591 | | #pragma clang diagnostic push |
1592 | | #pragma clang diagnostic ignored "-Wmissing-braces" |
1593 | | #endif |
1594 | | static const JSFunctionSpec sMethods_specs[] = { |
1595 | | JS_FNSPEC("toString", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&__stringifier_methodinfo), 0, JSPROP_ENUMERATE, nullptr), |
1596 | | JS_FS_END |
1597 | | }; |
1598 | | #if defined(__clang__) |
1599 | | #pragma clang diagnostic pop |
1600 | | #endif |
1601 | | |
1602 | | |
1603 | | static const Prefable<const JSFunctionSpec> sMethods[] = { |
1604 | | { nullptr, &sMethods_specs[0] }, |
1605 | | { nullptr, nullptr } |
1606 | | }; |
1607 | | |
1608 | | static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX, |
1609 | | "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)"); |
1610 | | static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX, |
1611 | | "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)"); |
1612 | | |
1613 | | // We deliberately use brace-elision to make Visual Studio produce better initalization code. |
1614 | | #if defined(__clang__) |
1615 | | #pragma clang diagnostic push |
1616 | | #pragma clang diagnostic ignored "-Wmissing-braces" |
1617 | | #endif |
1618 | | static const JSPropertySpec sAttributes_specs[] = { |
1619 | | { "alt", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &alt_getterinfo, GenericSetter<NormalThisPolicy>, &alt_setterinfo }, |
1620 | | { "coords", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &coords_getterinfo, GenericSetter<NormalThisPolicy>, &coords_setterinfo }, |
1621 | | { "shape", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &shape_getterinfo, GenericSetter<NormalThisPolicy>, &shape_setterinfo }, |
1622 | | { "target", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &target_getterinfo, GenericSetter<NormalThisPolicy>, &target_setterinfo }, |
1623 | | { "download", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &download_getterinfo, GenericSetter<NormalThisPolicy>, &download_setterinfo }, |
1624 | | { "ping", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ping_getterinfo, GenericSetter<NormalThisPolicy>, &ping_setterinfo }, |
1625 | | { "rel", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &rel_getterinfo, GenericSetter<NormalThisPolicy>, &rel_setterinfo }, |
1626 | | { "referrerPolicy", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &referrerPolicy_getterinfo, GenericSetter<NormalThisPolicy>, &referrerPolicy_setterinfo }, |
1627 | | { "relList", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &relList_getterinfo, GenericSetter<NormalThisPolicy>, &relList_setterinfo }, |
1628 | | { "noHref", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &noHref_getterinfo, GenericSetter<NormalThisPolicy>, &noHref_setterinfo }, |
1629 | | { "href", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &href_getterinfo, GenericSetter<NormalThisPolicy>, &href_setterinfo }, |
1630 | | { "origin", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &origin_getterinfo, nullptr, nullptr }, |
1631 | | { "protocol", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &protocol_getterinfo, GenericSetter<NormalThisPolicy>, &protocol_setterinfo }, |
1632 | | { "username", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &username_getterinfo, GenericSetter<NormalThisPolicy>, &username_setterinfo }, |
1633 | | { "password", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &password_getterinfo, GenericSetter<NormalThisPolicy>, &password_setterinfo }, |
1634 | | { "host", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &host_getterinfo, GenericSetter<NormalThisPolicy>, &host_setterinfo }, |
1635 | | { "hostname", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &hostname_getterinfo, GenericSetter<NormalThisPolicy>, &hostname_setterinfo }, |
1636 | | { "port", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &port_getterinfo, GenericSetter<NormalThisPolicy>, &port_setterinfo }, |
1637 | | { "pathname", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &pathname_getterinfo, GenericSetter<NormalThisPolicy>, &pathname_setterinfo }, |
1638 | | { "search", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &search_getterinfo, GenericSetter<NormalThisPolicy>, &search_setterinfo }, |
1639 | | { "hash", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &hash_getterinfo, GenericSetter<NormalThisPolicy>, &hash_setterinfo }, |
1640 | | { nullptr, 0, nullptr, nullptr, nullptr, nullptr } |
1641 | | }; |
1642 | | #if defined(__clang__) |
1643 | | #pragma clang diagnostic pop |
1644 | | #endif |
1645 | | |
1646 | | |
1647 | | static const Prefable<const JSPropertySpec> sAttributes[] = { |
1648 | | { nullptr, &sAttributes_specs[0] }, |
1649 | | { nullptr, nullptr } |
1650 | | }; |
1651 | | |
1652 | | static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX, |
1653 | | "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)"); |
1654 | | static_assert(21 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX, |
1655 | | "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)"); |
1656 | | |
1657 | | |
1658 | | static uint16_t sNativeProperties_sortedPropertyIndices[22]; |
1659 | | static PropertyInfo sNativeProperties_propertyInfos[22]; |
1660 | | |
1661 | | static const NativePropertiesN<2> sNativeProperties = { |
1662 | | false, 0, |
1663 | | false, 0, |
1664 | | true, 0 /* sMethods */, |
1665 | | true, 1 /* sAttributes */, |
1666 | | false, 0, |
1667 | | false, 0, |
1668 | | false, 0, |
1669 | | -1, |
1670 | | 22, |
1671 | | sNativeProperties_sortedPropertyIndices, |
1672 | | { |
1673 | | { sMethods, &sNativeProperties_propertyInfos[0] }, |
1674 | | { sAttributes, &sNativeProperties_propertyInfos[1] } |
1675 | | } |
1676 | | }; |
1677 | | static_assert(22 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount), |
1678 | | "We have a property info count that is oversized"); |
1679 | | |
1680 | | static bool |
1681 | | _constructor(JSContext* cx, unsigned argc, JS::Value* vp) |
1682 | 0 | { |
1683 | 0 | AUTO_PROFILER_LABEL_FAST("HTMLAreaElement constructor", DOM, cx); |
1684 | 0 |
|
1685 | 0 | return HTMLConstructor(cx, argc, vp, |
1686 | 0 | constructors::id::HTMLAreaElement, |
1687 | 0 | prototypes::id::HTMLAreaElement, |
1688 | 0 | CreateInterfaceObjects); |
1689 | 0 | } |
1690 | | |
1691 | | static const js::ClassOps sInterfaceObjectClassOps = { |
1692 | | nullptr, /* addProperty */ |
1693 | | nullptr, /* delProperty */ |
1694 | | nullptr, /* enumerate */ |
1695 | | nullptr, /* newEnumerate */ |
1696 | | nullptr, /* resolve */ |
1697 | | nullptr, /* mayResolve */ |
1698 | | nullptr, /* finalize */ |
1699 | | _constructor, /* call */ |
1700 | | nullptr, /* hasInstance */ |
1701 | | _constructor, /* construct */ |
1702 | | nullptr, /* trace */ |
1703 | | }; |
1704 | | |
1705 | | static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = { |
1706 | | { |
1707 | | "Function", |
1708 | | JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE), |
1709 | | &sInterfaceObjectClassOps, |
1710 | | JS_NULL_CLASS_SPEC, |
1711 | | JS_NULL_CLASS_EXT, |
1712 | | &sInterfaceObjectClassObjectOps |
1713 | | }, |
1714 | | eInterface, |
1715 | | true, |
1716 | | prototypes::id::HTMLAreaElement, |
1717 | | PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth, |
1718 | | sNativePropertyHooks, |
1719 | | "function HTMLAreaElement() {\n [native code]\n}", |
1720 | | HTMLElement_Binding::GetConstructorObject |
1721 | | }; |
1722 | | |
1723 | | static const DOMIfaceAndProtoJSClass sPrototypeClass = { |
1724 | | { |
1725 | | "HTMLAreaElementPrototype", |
1726 | | JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE), |
1727 | | JS_NULL_CLASS_OPS, |
1728 | | JS_NULL_CLASS_SPEC, |
1729 | | JS_NULL_CLASS_EXT, |
1730 | | JS_NULL_OBJECT_OPS |
1731 | | }, |
1732 | | eInterfacePrototype, |
1733 | | false, |
1734 | | prototypes::id::HTMLAreaElement, |
1735 | | PrototypeTraits<prototypes::id::HTMLAreaElement>::Depth, |
1736 | | sNativePropertyHooks, |
1737 | | "[object HTMLAreaElementPrototype]", |
1738 | | HTMLElement_Binding::GetProtoObject |
1739 | | }; |
1740 | | |
1741 | | static const js::ClassOps sClassOps = { |
1742 | | _addProperty, /* addProperty */ |
1743 | | nullptr, /* delProperty */ |
1744 | | nullptr, /* enumerate */ |
1745 | | nullptr, /* newEnumerate */ |
1746 | | nullptr, /* resolve */ |
1747 | | nullptr, /* mayResolve */ |
1748 | | _finalize, /* finalize */ |
1749 | | nullptr, /* call */ |
1750 | | nullptr, /* hasInstance */ |
1751 | | nullptr, /* construct */ |
1752 | | nullptr, /* trace */ |
1753 | | }; |
1754 | | |
1755 | | static const js::ClassExtension sClassExtension = { |
1756 | | nullptr, /* weakmapKeyDelegateOp */ |
1757 | | _objectMoved /* objectMovedOp */ |
1758 | | }; |
1759 | | |
1760 | | static const DOMJSClass sClass = { |
1761 | | { "HTMLAreaElement", |
1762 | | JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1), |
1763 | | &sClassOps, |
1764 | | JS_NULL_CLASS_SPEC, |
1765 | | &sClassExtension, |
1766 | | JS_NULL_OBJECT_OPS |
1767 | | }, |
1768 | | { prototypes::id::EventTarget, prototypes::id::Node, prototypes::id::Element, prototypes::id::HTMLElement, prototypes::id::HTMLAreaElement, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count }, |
1769 | | IsBaseOf<nsISupports, mozilla::dom::HTMLAreaElement >::value, |
1770 | | sNativePropertyHooks, |
1771 | | FindAssociatedGlobalForNative<mozilla::dom::HTMLAreaElement>::Get, |
1772 | | GetProtoObjectHandle, |
1773 | | GetCCParticipant<mozilla::dom::HTMLAreaElement>::Get() |
1774 | | }; |
1775 | | static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS, |
1776 | | "Must have the right minimal number of reserved slots."); |
1777 | | static_assert(1 >= 1, |
1778 | | "Must have enough reserved slots."); |
1779 | | |
1780 | | const JSClass* |
1781 | | GetJSClass() |
1782 | 0 | { |
1783 | 0 | return sClass.ToJSClass(); |
1784 | 0 | } |
1785 | | |
1786 | | bool |
1787 | | Wrap(JSContext* aCx, mozilla::dom::HTMLAreaElement* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector) |
1788 | 0 | { |
1789 | 0 | static_assert(!IsBaseOf<NonRefcountedDOMObject, mozilla::dom::HTMLAreaElement>::value, |
1790 | 0 | "Shouldn't have wrappercached things that are not refcounted."); |
1791 | 0 | MOZ_ASSERT(static_cast<mozilla::dom::HTMLAreaElement*>(aObject) == |
1792 | 0 | reinterpret_cast<mozilla::dom::HTMLAreaElement*>(aObject), |
1793 | 0 | "Multiple inheritance for mozilla::dom::HTMLAreaElement is broken."); |
1794 | 0 | MOZ_ASSERT(static_cast<nsGenericHTMLElement*>(aObject) == |
1795 | 0 | reinterpret_cast<nsGenericHTMLElement*>(aObject), |
1796 | 0 | "Multiple inheritance for nsGenericHTMLElement is broken."); |
1797 | 0 | MOZ_ASSERT(static_cast<mozilla::dom::Element*>(aObject) == |
1798 | 0 | reinterpret_cast<mozilla::dom::Element*>(aObject), |
1799 | 0 | "Multiple inheritance for mozilla::dom::Element is broken."); |
1800 | 0 | MOZ_ASSERT(static_cast<nsINode*>(aObject) == |
1801 | 0 | reinterpret_cast<nsINode*>(aObject), |
1802 | 0 | "Multiple inheritance for nsINode is broken."); |
1803 | 0 | MOZ_ASSERT(static_cast<mozilla::dom::EventTarget*>(aObject) == |
1804 | 0 | reinterpret_cast<mozilla::dom::EventTarget*>(aObject), |
1805 | 0 | "Multiple inheritance for mozilla::dom::EventTarget is broken."); |
1806 | 0 | MOZ_ASSERT(ToSupportsIsCorrect(aObject)); |
1807 | 0 | MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx)); |
1808 | 0 | MOZ_ASSERT(!aCache->GetWrapper(), |
1809 | 0 | "You should probably not be using Wrap() directly; use " |
1810 | 0 | "GetOrCreateDOMReflector instead"); |
1811 | 0 |
|
1812 | 0 | MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache), |
1813 | 0 | "nsISupports must be on our primary inheritance chain"); |
1814 | 0 |
|
1815 | 0 | JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject())); |
1816 | 0 | if (!global) { |
1817 | 0 | return false; |
1818 | 0 | } |
1819 | 0 | MOZ_ASSERT(JS_IsGlobalObject(global)); |
1820 | 0 | MOZ_ASSERT(JS::ObjectIsNotGray(global)); |
1821 | 0 |
|
1822 | 0 | // That might have ended up wrapping us already, due to the wonders |
1823 | 0 | // of XBL. Check for that, and bail out as needed. |
1824 | 0 | aReflector.set(aCache->GetWrapper()); |
1825 | 0 | if (aReflector) { |
1826 | | #ifdef DEBUG |
1827 | | AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto); |
1828 | | #endif // DEBUG |
1829 | | return true; |
1830 | 0 | } |
1831 | 0 |
|
1832 | 0 | JSAutoRealm ar(aCx, global); |
1833 | 0 | JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx); |
1834 | 0 | if (!canonicalProto) { |
1835 | 0 | return false; |
1836 | 0 | } |
1837 | 0 | JS::Rooted<JSObject*> proto(aCx); |
1838 | 0 | if (aGivenProto) { |
1839 | 0 | proto = aGivenProto; |
1840 | 0 | // Unfortunately, while aGivenProto was in the compartment of aCx |
1841 | 0 | // coming in, we changed compartments to that of "parent" so may need |
1842 | 0 | // to wrap the proto here. |
1843 | 0 | if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) { |
1844 | 0 | if (!JS_WrapObject(aCx, &proto)) { |
1845 | 0 | return false; |
1846 | 0 | } |
1847 | 0 | } |
1848 | 0 | } else { |
1849 | 0 | proto = canonicalProto; |
1850 | 0 | } |
1851 | 0 |
|
1852 | 0 | BindingJSObjectCreator<mozilla::dom::HTMLAreaElement> creator(aCx); |
1853 | 0 | creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector); |
1854 | 0 | if (!aReflector) { |
1855 | 0 | return false; |
1856 | 0 | } |
1857 | 0 | |
1858 | 0 | aCache->SetWrapper(aReflector); |
1859 | 0 | creator.InitializationSucceeded(); |
1860 | 0 |
|
1861 | 0 | MOZ_ASSERT(aCache->GetWrapperPreserveColor() && |
1862 | 0 | aCache->GetWrapperPreserveColor() == aReflector); |
1863 | 0 | // If proto != canonicalProto, we have to preserve our wrapper; |
1864 | 0 | // otherwise we won't be able to properly recreate it later, since |
1865 | 0 | // we won't know what proto to use. Note that we don't check |
1866 | 0 | // aGivenProto here, since it's entirely possible (and even |
1867 | 0 | // somewhat common) to have a non-null aGivenProto which is the |
1868 | 0 | // same as canonicalProto. |
1869 | 0 | if (proto != canonicalProto) { |
1870 | 0 | PreserveWrapper(aObject); |
1871 | 0 | } |
1872 | 0 |
|
1873 | 0 | return true; |
1874 | 0 | } |
1875 | | |
1876 | | const NativePropertyHooks sNativePropertyHooks[] = { { |
1877 | | nullptr, |
1878 | | nullptr, |
1879 | | nullptr, |
1880 | | { sNativeProperties.Upcast(), nullptr }, |
1881 | | prototypes::id::HTMLAreaElement, |
1882 | | constructors::id::HTMLAreaElement, |
1883 | | HTMLElement_Binding::sNativePropertyHooks, |
1884 | | &DefaultXrayExpandoObjectClass |
1885 | | } }; |
1886 | | |
1887 | | void |
1888 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal) |
1889 | 0 | { |
1890 | 0 | JS::Handle<JSObject*> parentProto(HTMLElement_Binding::GetProtoObjectHandle(aCx)); |
1891 | 0 | if (!parentProto) { |
1892 | 0 | return; |
1893 | 0 | } |
1894 | 0 | |
1895 | 0 | JS::Handle<JSObject*> constructorProto(HTMLElement_Binding::GetConstructorObjectHandle(aCx)); |
1896 | 0 | if (!constructorProto) { |
1897 | 0 | return; |
1898 | 0 | } |
1899 | 0 | |
1900 | 0 | static bool sIdsInited = false; |
1901 | 0 | if (!sIdsInited && NS_IsMainThread()) { |
1902 | 0 | if (!InitIds(aCx, sNativeProperties.Upcast())) { |
1903 | 0 | return; |
1904 | 0 | } |
1905 | 0 | sIdsInited = true; |
1906 | 0 | } |
1907 | 0 |
|
1908 | 0 | JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::HTMLAreaElement); |
1909 | 0 | JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::HTMLAreaElement); |
1910 | 0 | dom::CreateInterfaceObjects(aCx, aGlobal, parentProto, |
1911 | 0 | &sPrototypeClass.mBase, protoCache, |
1912 | 0 | nullptr, |
1913 | 0 | constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr, |
1914 | 0 | interfaceCache, |
1915 | 0 | sNativeProperties.Upcast(), |
1916 | 0 | nullptr, |
1917 | 0 | "HTMLAreaElement", aDefineOnGlobal, |
1918 | 0 | nullptr, |
1919 | 0 | false); |
1920 | 0 | } |
1921 | | |
1922 | | JSObject* |
1923 | | GetConstructorObject(JSContext* aCx) |
1924 | 0 | { |
1925 | 0 | return GetConstructorObjectHandle(aCx); |
1926 | 0 | } |
1927 | | |
1928 | | } // namespace HTMLAreaElement_Binding |
1929 | | |
1930 | | |
1931 | | |
1932 | | } // namespace dom |
1933 | | } // namespace mozilla |