Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM HTMLIFrameElement.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #include "BrowserElementBinding.h"
4 : #include "HTMLElementBinding.h"
5 : #include "HTMLIFrameElementBinding.h"
6 : #include "TouchEvent.h"
7 : #include "WrapperFactory.h"
8 : #include "mozilla/FloatingPoint.h"
9 : #include "mozilla/OwningNonNull.h"
10 : #include "mozilla/Preferences.h"
11 : #include "mozilla/dom/BindingUtils.h"
12 : #include "mozilla/dom/CustomElementRegistry.h"
13 : #include "mozilla/dom/DOMJSClass.h"
14 : #include "mozilla/dom/DOMRequest.h"
15 : #include "mozilla/dom/HTMLIFrameElement.h"
16 : #include "mozilla/dom/NonRefcountedDOMObject.h"
17 : #include "mozilla/dom/Nullable.h"
18 : #include "mozilla/dom/PrimitiveConversions.h"
19 : #include "mozilla/dom/XrayExpandoClass.h"
20 : #include "nsContentUtils.h"
21 : #include "nsDOMTokenList.h"
22 : #include "nsIDocument.h"
23 : #include "nsIFrameLoader.h"
24 : #include "nsPIDOMWindow.h"
25 : #include "nsXULElement.h"
26 :
27 : namespace mozilla {
28 : namespace dom {
29 :
30 : namespace HTMLIFrameElementBinding {
31 :
32 : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<HTMLElementBinding::NativeType>::value,
33 : "Can't inherit from an interface with a different ownership model.");
34 :
35 : static bool
36 0 : get_src(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitGetterCallArgs args)
37 : {
38 0 : DOMString result;
39 0 : self->GetSrc(result);
40 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
41 0 : if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
42 0 : return false;
43 : }
44 0 : return true;
45 : }
46 :
47 : static bool
48 0 : set_src(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitSetterCallArgs args)
49 : {
50 0 : binding_detail::FakeString arg0;
51 0 : if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
52 0 : return false;
53 : }
54 0 : CustomElementReactionsStack* reactionsStack = GetCustomElementReactionsStack(obj);
55 0 : Maybe<AutoCEReaction> ceReaction;
56 0 : if (reactionsStack) {
57 0 : ceReaction.emplace(reactionsStack);
58 : }
59 0 : binding_detail::FastErrorResult rv;
60 0 : self->SetSrc(NonNullHelper(Constify(arg0)), rv);
61 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
62 0 : return false;
63 : }
64 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
65 :
66 0 : return true;
67 : }
68 :
69 : static const JSJitInfo src_getterinfo = {
70 : { (JSJitGetterOp)get_src },
71 : { prototypes::id::HTMLIFrameElement },
72 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
73 : JSJitInfo::Getter,
74 : JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
75 : JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
76 : false, /* isInfallible. False in setters. */
77 : true, /* isMovable. Not relevant for setters. */
78 : true, /* 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 src_setterinfo = {
87 : { (JSJitGetterOp)set_src },
88 : { prototypes::id::HTMLIFrameElement },
89 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::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 : static bool
105 0 : get_srcdoc(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitGetterCallArgs args)
106 : {
107 0 : DOMString result;
108 0 : self->GetSrcdoc(result);
109 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
110 0 : if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
111 0 : return false;
112 : }
113 0 : return true;
114 : }
115 :
116 : static bool
117 0 : set_srcdoc(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitSetterCallArgs args)
118 : {
119 0 : binding_detail::FakeString arg0;
120 0 : if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
121 0 : return false;
122 : }
123 0 : CustomElementReactionsStack* reactionsStack = GetCustomElementReactionsStack(obj);
124 0 : Maybe<AutoCEReaction> ceReaction;
125 0 : if (reactionsStack) {
126 0 : ceReaction.emplace(reactionsStack);
127 : }
128 0 : binding_detail::FastErrorResult rv;
129 0 : self->SetSrcdoc(NonNullHelper(Constify(arg0)), rv);
130 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
131 0 : return false;
132 : }
133 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
134 :
135 0 : return true;
136 : }
137 :
138 : static const JSJitInfo srcdoc_getterinfo = {
139 : { (JSJitGetterOp)get_srcdoc },
140 : { prototypes::id::HTMLIFrameElement },
141 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
142 : JSJitInfo::Getter,
143 : JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
144 : JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
145 : false, /* isInfallible. False in setters. */
146 : true, /* isMovable. Not relevant for setters. */
147 : true, /* isEliminatable. Not relevant for setters. */
148 : false, /* isAlwaysInSlot. Only relevant for getters. */
149 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
150 : false, /* isTypedMethod. Only relevant for methods. */
151 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
152 : };
153 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
154 : static_assert(0 < 1, "There is no slot for us");
155 : static const JSJitInfo srcdoc_setterinfo = {
156 : { (JSJitGetterOp)set_srcdoc },
157 : { prototypes::id::HTMLIFrameElement },
158 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
159 : JSJitInfo::Setter,
160 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
161 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
162 : false, /* isInfallible. False in setters. */
163 : false, /* isMovable. Not relevant for setters. */
164 : false, /* isEliminatable. Not relevant for setters. */
165 : false, /* isAlwaysInSlot. Only relevant for getters. */
166 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
167 : false, /* isTypedMethod. Only relevant for methods. */
168 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
169 : };
170 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
171 : static_assert(0 < 1, "There is no slot for us");
172 :
173 : static bool
174 0 : get_name(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitGetterCallArgs args)
175 : {
176 0 : DOMString result;
177 0 : self->GetName(result);
178 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
179 0 : if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
180 0 : return false;
181 : }
182 0 : return true;
183 : }
184 :
185 : static bool
186 0 : set_name(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitSetterCallArgs args)
187 : {
188 0 : binding_detail::FakeString arg0;
189 0 : if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
190 0 : return false;
191 : }
192 0 : CustomElementReactionsStack* reactionsStack = GetCustomElementReactionsStack(obj);
193 0 : Maybe<AutoCEReaction> ceReaction;
194 0 : if (reactionsStack) {
195 0 : ceReaction.emplace(reactionsStack);
196 : }
197 0 : binding_detail::FastErrorResult rv;
198 0 : self->SetName(NonNullHelper(Constify(arg0)), rv);
199 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
200 0 : return false;
201 : }
202 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
203 :
204 0 : return true;
205 : }
206 :
207 : static const JSJitInfo name_getterinfo = {
208 : { (JSJitGetterOp)get_name },
209 : { prototypes::id::HTMLIFrameElement },
210 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
211 : JSJitInfo::Getter,
212 : JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
213 : JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
214 : false, /* isInfallible. False in setters. */
215 : true, /* isMovable. Not relevant for setters. */
216 : true, /* isEliminatable. Not relevant for setters. */
217 : false, /* isAlwaysInSlot. Only relevant for getters. */
218 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
219 : false, /* isTypedMethod. Only relevant for methods. */
220 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
221 : };
222 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
223 : static_assert(0 < 1, "There is no slot for us");
224 : static const JSJitInfo name_setterinfo = {
225 : { (JSJitGetterOp)set_name },
226 : { prototypes::id::HTMLIFrameElement },
227 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
228 : JSJitInfo::Setter,
229 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
230 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
231 : false, /* isInfallible. False in setters. */
232 : false, /* isMovable. Not relevant for setters. */
233 : false, /* isEliminatable. Not relevant for setters. */
234 : false, /* isAlwaysInSlot. Only relevant for getters. */
235 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
236 : false, /* isTypedMethod. Only relevant for methods. */
237 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
238 : };
239 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
240 : static_assert(0 < 1, "There is no slot for us");
241 :
242 : static bool
243 0 : get_sandbox(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitGetterCallArgs args)
244 : {
245 0 : auto result(StrongOrRawPtr<nsDOMTokenList>(self->Sandbox()));
246 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
247 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
248 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
249 0 : return false;
250 : }
251 0 : return true;
252 : }
253 :
254 : static bool
255 0 : set_sandbox(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitSetterCallArgs args)
256 : {
257 0 : JS::Rooted<JS::Value> v(cx);
258 0 : if (!JS_GetProperty(cx, obj, "sandbox", &v)) {
259 0 : return false;
260 : }
261 :
262 0 : if (!v.isObject()) {
263 0 : return ThrowErrorMessage(cx, MSG_NOT_OBJECT, "HTMLIFrameElement.sandbox");
264 : }
265 :
266 0 : JS::Rooted<JSObject*> targetObj(cx, &v.toObject());
267 0 : return JS_SetProperty(cx, targetObj, "value", args[0]);
268 : }
269 :
270 : static const JSJitInfo sandbox_getterinfo = {
271 : { (JSJitGetterOp)get_sandbox },
272 : { prototypes::id::HTMLIFrameElement },
273 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
274 : JSJitInfo::Getter,
275 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
276 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
277 : false, /* isInfallible. False in setters. */
278 : false, /* isMovable. Not relevant for setters. */
279 : false, /* isEliminatable. Not relevant for setters. */
280 : false, /* isAlwaysInSlot. Only relevant for getters. */
281 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
282 : false, /* isTypedMethod. Only relevant for methods. */
283 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
284 : };
285 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
286 : static_assert(0 < 1, "There is no slot for us");
287 : static const JSJitInfo sandbox_setterinfo = {
288 : { (JSJitGetterOp)set_sandbox },
289 : { prototypes::id::HTMLIFrameElement },
290 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
291 : JSJitInfo::Setter,
292 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
293 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
294 : false, /* isInfallible. False in setters. */
295 : false, /* isMovable. Not relevant for setters. */
296 : false, /* isEliminatable. Not relevant for setters. */
297 : false, /* isAlwaysInSlot. Only relevant for getters. */
298 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
299 : false, /* isTypedMethod. Only relevant for methods. */
300 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
301 : };
302 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
303 : static_assert(0 < 1, "There is no slot for us");
304 :
305 : static bool
306 0 : get_allowFullscreen(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitGetterCallArgs args)
307 : {
308 0 : bool result(self->AllowFullscreen());
309 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
310 0 : args.rval().setBoolean(result);
311 0 : return true;
312 : }
313 :
314 : static bool
315 0 : set_allowFullscreen(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitSetterCallArgs args)
316 : {
317 : bool arg0;
318 0 : if (!ValueToPrimitive<bool, eDefault>(cx, args[0], &arg0)) {
319 0 : return false;
320 : }
321 0 : CustomElementReactionsStack* reactionsStack = GetCustomElementReactionsStack(obj);
322 0 : Maybe<AutoCEReaction> ceReaction;
323 0 : if (reactionsStack) {
324 0 : ceReaction.emplace(reactionsStack);
325 : }
326 0 : binding_detail::FastErrorResult rv;
327 0 : self->SetAllowFullscreen(arg0, rv);
328 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
329 0 : return false;
330 : }
331 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
332 :
333 0 : return true;
334 : }
335 :
336 : static const JSJitInfo allowFullscreen_getterinfo = {
337 : { (JSJitGetterOp)get_allowFullscreen },
338 : { prototypes::id::HTMLIFrameElement },
339 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
340 : JSJitInfo::Getter,
341 : JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
342 : JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
343 : true, /* isInfallible. False in setters. */
344 : true, /* isMovable. Not relevant for setters. */
345 : true, /* isEliminatable. Not relevant for setters. */
346 : false, /* isAlwaysInSlot. Only relevant for getters. */
347 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
348 : false, /* isTypedMethod. Only relevant for methods. */
349 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
350 : };
351 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
352 : static_assert(0 < 1, "There is no slot for us");
353 : static const JSJitInfo allowFullscreen_setterinfo = {
354 : { (JSJitGetterOp)set_allowFullscreen },
355 : { prototypes::id::HTMLIFrameElement },
356 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
357 : JSJitInfo::Setter,
358 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
359 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
360 : false, /* isInfallible. False in setters. */
361 : false, /* isMovable. Not relevant for setters. */
362 : false, /* isEliminatable. Not relevant for setters. */
363 : false, /* isAlwaysInSlot. Only relevant for getters. */
364 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
365 : false, /* isTypedMethod. Only relevant for methods. */
366 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
367 : };
368 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
369 : static_assert(0 < 1, "There is no slot for us");
370 :
371 : static bool
372 0 : get_width(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitGetterCallArgs args)
373 : {
374 0 : DOMString result;
375 0 : self->GetWidth(result);
376 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
377 0 : if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
378 0 : return false;
379 : }
380 0 : return true;
381 : }
382 :
383 : static bool
384 0 : set_width(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitSetterCallArgs args)
385 : {
386 0 : binding_detail::FakeString arg0;
387 0 : if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
388 0 : return false;
389 : }
390 0 : CustomElementReactionsStack* reactionsStack = GetCustomElementReactionsStack(obj);
391 0 : Maybe<AutoCEReaction> ceReaction;
392 0 : if (reactionsStack) {
393 0 : ceReaction.emplace(reactionsStack);
394 : }
395 0 : binding_detail::FastErrorResult rv;
396 0 : self->SetWidth(NonNullHelper(Constify(arg0)), rv);
397 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
398 0 : return false;
399 : }
400 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
401 :
402 0 : return true;
403 : }
404 :
405 : static const JSJitInfo width_getterinfo = {
406 : { (JSJitGetterOp)get_width },
407 : { prototypes::id::HTMLIFrameElement },
408 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
409 : JSJitInfo::Getter,
410 : JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
411 : JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
412 : false, /* isInfallible. False in setters. */
413 : true, /* isMovable. Not relevant for setters. */
414 : true, /* isEliminatable. Not relevant for setters. */
415 : false, /* isAlwaysInSlot. Only relevant for getters. */
416 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
417 : false, /* isTypedMethod. Only relevant for methods. */
418 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
419 : };
420 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
421 : static_assert(0 < 1, "There is no slot for us");
422 : static const JSJitInfo width_setterinfo = {
423 : { (JSJitGetterOp)set_width },
424 : { prototypes::id::HTMLIFrameElement },
425 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
426 : JSJitInfo::Setter,
427 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
428 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
429 : false, /* isInfallible. False in setters. */
430 : false, /* isMovable. Not relevant for setters. */
431 : false, /* isEliminatable. Not relevant for setters. */
432 : false, /* isAlwaysInSlot. Only relevant for getters. */
433 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
434 : false, /* isTypedMethod. Only relevant for methods. */
435 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
436 : };
437 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
438 : static_assert(0 < 1, "There is no slot for us");
439 :
440 : static bool
441 0 : get_height(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitGetterCallArgs args)
442 : {
443 0 : DOMString result;
444 0 : self->GetHeight(result);
445 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
446 0 : if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
447 0 : return false;
448 : }
449 0 : return true;
450 : }
451 :
452 : static bool
453 0 : set_height(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitSetterCallArgs args)
454 : {
455 0 : binding_detail::FakeString arg0;
456 0 : if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
457 0 : return false;
458 : }
459 0 : CustomElementReactionsStack* reactionsStack = GetCustomElementReactionsStack(obj);
460 0 : Maybe<AutoCEReaction> ceReaction;
461 0 : if (reactionsStack) {
462 0 : ceReaction.emplace(reactionsStack);
463 : }
464 0 : binding_detail::FastErrorResult rv;
465 0 : self->SetHeight(NonNullHelper(Constify(arg0)), rv);
466 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
467 0 : return false;
468 : }
469 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
470 :
471 0 : return true;
472 : }
473 :
474 : static const JSJitInfo height_getterinfo = {
475 : { (JSJitGetterOp)get_height },
476 : { prototypes::id::HTMLIFrameElement },
477 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
478 : JSJitInfo::Getter,
479 : JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
480 : JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
481 : false, /* isInfallible. False in setters. */
482 : true, /* isMovable. Not relevant for setters. */
483 : true, /* isEliminatable. Not relevant for setters. */
484 : false, /* isAlwaysInSlot. Only relevant for getters. */
485 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
486 : false, /* isTypedMethod. Only relevant for methods. */
487 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
488 : };
489 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
490 : static_assert(0 < 1, "There is no slot for us");
491 : static const JSJitInfo height_setterinfo = {
492 : { (JSJitGetterOp)set_height },
493 : { prototypes::id::HTMLIFrameElement },
494 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
495 : JSJitInfo::Setter,
496 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
497 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
498 : false, /* isInfallible. False in setters. */
499 : false, /* isMovable. Not relevant for setters. */
500 : false, /* isEliminatable. Not relevant for setters. */
501 : false, /* isAlwaysInSlot. Only relevant for getters. */
502 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
503 : false, /* isTypedMethod. Only relevant for methods. */
504 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
505 : };
506 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
507 : static_assert(0 < 1, "There is no slot for us");
508 :
509 : static bool
510 0 : get_referrerPolicy(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitGetterCallArgs args)
511 : {
512 0 : DOMString result;
513 0 : self->GetReferrerPolicy(result);
514 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
515 0 : if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
516 0 : return false;
517 : }
518 0 : return true;
519 : }
520 :
521 : static bool
522 0 : set_referrerPolicy(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitSetterCallArgs args)
523 : {
524 0 : binding_detail::FakeString arg0;
525 0 : if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
526 0 : return false;
527 : }
528 0 : CustomElementReactionsStack* reactionsStack = GetCustomElementReactionsStack(obj);
529 0 : Maybe<AutoCEReaction> ceReaction;
530 0 : if (reactionsStack) {
531 0 : ceReaction.emplace(reactionsStack);
532 : }
533 0 : binding_detail::FastErrorResult rv;
534 0 : self->SetReferrerPolicy(NonNullHelper(Constify(arg0)), rv);
535 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
536 0 : return false;
537 : }
538 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
539 :
540 0 : return true;
541 : }
542 :
543 : static const JSJitInfo referrerPolicy_getterinfo = {
544 : { (JSJitGetterOp)get_referrerPolicy },
545 : { prototypes::id::HTMLIFrameElement },
546 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
547 : JSJitInfo::Getter,
548 : JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
549 : JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
550 : false, /* isInfallible. False in setters. */
551 : true, /* isMovable. Not relevant for setters. */
552 : true, /* isEliminatable. Not relevant for setters. */
553 : false, /* isAlwaysInSlot. Only relevant for getters. */
554 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
555 : false, /* isTypedMethod. Only relevant for methods. */
556 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
557 : };
558 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
559 : static_assert(0 < 1, "There is no slot for us");
560 : static const JSJitInfo referrerPolicy_setterinfo = {
561 : { (JSJitGetterOp)set_referrerPolicy },
562 : { prototypes::id::HTMLIFrameElement },
563 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
564 : JSJitInfo::Setter,
565 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
566 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
567 : false, /* isInfallible. False in setters. */
568 : false, /* isMovable. Not relevant for setters. */
569 : false, /* isEliminatable. Not relevant for setters. */
570 : false, /* isAlwaysInSlot. Only relevant for getters. */
571 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
572 : false, /* isTypedMethod. Only relevant for methods. */
573 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
574 : };
575 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
576 : static_assert(0 < 1, "There is no slot for us");
577 :
578 : static bool
579 0 : get_contentDocument(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitGetterCallArgs args)
580 : {
581 0 : JSCompartment* compartment = js::GetContextCompartment(cx);
582 0 : MOZ_ASSERT(compartment);
583 0 : JSPrincipals* principals = JS_GetCompartmentPrincipals(compartment);
584 : // Initializing a nonnull is pretty darn annoying...
585 0 : NonNull<nsIPrincipal> subjectPrincipal;
586 0 : subjectPrincipal = static_cast<nsIPrincipal*>(nsJSPrincipals::get(principals));
587 0 : auto result(StrongOrRawPtr<nsIDocument>(self->GetContentDocument(subjectPrincipal)));
588 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
589 0 : if (!result) {
590 0 : args.rval().setNull();
591 0 : return true;
592 : }
593 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
594 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
595 0 : return false;
596 : }
597 0 : return true;
598 : }
599 :
600 : static const JSJitInfo contentDocument_getterinfo = {
601 : { (JSJitGetterOp)get_contentDocument },
602 : { prototypes::id::HTMLIFrameElement },
603 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
604 : JSJitInfo::Getter,
605 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
606 : JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
607 : false, /* isInfallible. False in setters. */
608 : false, /* isMovable. Not relevant for setters. */
609 : false, /* isEliminatable. Not relevant for setters. */
610 : false, /* isAlwaysInSlot. Only relevant for getters. */
611 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
612 : false, /* isTypedMethod. Only relevant for methods. */
613 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
614 : };
615 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
616 : static_assert(0 < 1, "There is no slot for us");
617 :
618 : static bool
619 0 : get_contentWindow(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitGetterCallArgs args)
620 : {
621 0 : auto result(StrongOrRawPtr<nsPIDOMWindowOuter>(self->GetContentWindow()));
622 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
623 0 : if (!result) {
624 0 : args.rval().setNull();
625 0 : return true;
626 : }
627 0 : if (!WrapObject(cx, result, args.rval())) {
628 0 : return false;
629 : }
630 0 : return true;
631 : }
632 :
633 : static const JSJitInfo contentWindow_getterinfo = {
634 : { (JSJitGetterOp)get_contentWindow },
635 : { prototypes::id::HTMLIFrameElement },
636 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
637 : JSJitInfo::Getter,
638 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
639 : JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
640 : false, /* isInfallible. False in setters. */
641 : false, /* isMovable. Not relevant for setters. */
642 : false, /* isEliminatable. Not relevant for setters. */
643 : false, /* isAlwaysInSlot. Only relevant for getters. */
644 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
645 : false, /* isTypedMethod. Only relevant for methods. */
646 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
647 : };
648 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
649 : static_assert(0 < 1, "There is no slot for us");
650 :
651 : static bool
652 0 : get_align(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitGetterCallArgs args)
653 : {
654 0 : DOMString result;
655 0 : self->GetAlign(result);
656 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
657 0 : if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
658 0 : return false;
659 : }
660 0 : return true;
661 : }
662 :
663 : static bool
664 0 : set_align(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitSetterCallArgs args)
665 : {
666 0 : binding_detail::FakeString arg0;
667 0 : if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
668 0 : return false;
669 : }
670 0 : CustomElementReactionsStack* reactionsStack = GetCustomElementReactionsStack(obj);
671 0 : Maybe<AutoCEReaction> ceReaction;
672 0 : if (reactionsStack) {
673 0 : ceReaction.emplace(reactionsStack);
674 : }
675 0 : binding_detail::FastErrorResult rv;
676 0 : self->SetAlign(NonNullHelper(Constify(arg0)), rv);
677 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
678 0 : return false;
679 : }
680 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
681 :
682 0 : return true;
683 : }
684 :
685 : static const JSJitInfo align_getterinfo = {
686 : { (JSJitGetterOp)get_align },
687 : { prototypes::id::HTMLIFrameElement },
688 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
689 : JSJitInfo::Getter,
690 : JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
691 : JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
692 : false, /* isInfallible. False in setters. */
693 : true, /* isMovable. Not relevant for setters. */
694 : true, /* isEliminatable. Not relevant for setters. */
695 : false, /* isAlwaysInSlot. Only relevant for getters. */
696 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
697 : false, /* isTypedMethod. Only relevant for methods. */
698 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
699 : };
700 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
701 : static_assert(0 < 1, "There is no slot for us");
702 : static const JSJitInfo align_setterinfo = {
703 : { (JSJitGetterOp)set_align },
704 : { prototypes::id::HTMLIFrameElement },
705 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
706 : JSJitInfo::Setter,
707 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
708 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
709 : false, /* isInfallible. False in setters. */
710 : false, /* isMovable. Not relevant for setters. */
711 : false, /* isEliminatable. Not relevant for setters. */
712 : false, /* isAlwaysInSlot. Only relevant for getters. */
713 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
714 : false, /* isTypedMethod. Only relevant for methods. */
715 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
716 : };
717 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
718 : static_assert(0 < 1, "There is no slot for us");
719 :
720 : static bool
721 0 : get_scrolling(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitGetterCallArgs args)
722 : {
723 0 : DOMString result;
724 0 : self->GetScrolling(result);
725 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
726 0 : if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
727 0 : return false;
728 : }
729 0 : return true;
730 : }
731 :
732 : static bool
733 0 : set_scrolling(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitSetterCallArgs args)
734 : {
735 0 : binding_detail::FakeString arg0;
736 0 : if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
737 0 : return false;
738 : }
739 0 : CustomElementReactionsStack* reactionsStack = GetCustomElementReactionsStack(obj);
740 0 : Maybe<AutoCEReaction> ceReaction;
741 0 : if (reactionsStack) {
742 0 : ceReaction.emplace(reactionsStack);
743 : }
744 0 : binding_detail::FastErrorResult rv;
745 0 : self->SetScrolling(NonNullHelper(Constify(arg0)), rv);
746 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
747 0 : return false;
748 : }
749 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
750 :
751 0 : return true;
752 : }
753 :
754 : static const JSJitInfo scrolling_getterinfo = {
755 : { (JSJitGetterOp)get_scrolling },
756 : { prototypes::id::HTMLIFrameElement },
757 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
758 : JSJitInfo::Getter,
759 : JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
760 : JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
761 : false, /* isInfallible. False in setters. */
762 : true, /* isMovable. Not relevant for setters. */
763 : true, /* isEliminatable. Not relevant for setters. */
764 : false, /* isAlwaysInSlot. Only relevant for getters. */
765 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
766 : false, /* isTypedMethod. Only relevant for methods. */
767 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
768 : };
769 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
770 : static_assert(0 < 1, "There is no slot for us");
771 : static const JSJitInfo scrolling_setterinfo = {
772 : { (JSJitGetterOp)set_scrolling },
773 : { prototypes::id::HTMLIFrameElement },
774 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
775 : JSJitInfo::Setter,
776 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
777 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
778 : false, /* isInfallible. False in setters. */
779 : false, /* isMovable. Not relevant for setters. */
780 : false, /* isEliminatable. Not relevant for setters. */
781 : false, /* isAlwaysInSlot. Only relevant for getters. */
782 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
783 : false, /* isTypedMethod. Only relevant for methods. */
784 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
785 : };
786 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
787 : static_assert(0 < 1, "There is no slot for us");
788 :
789 : static bool
790 0 : get_frameBorder(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitGetterCallArgs args)
791 : {
792 0 : DOMString result;
793 0 : self->GetFrameBorder(result);
794 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
795 0 : if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
796 0 : return false;
797 : }
798 0 : return true;
799 : }
800 :
801 : static bool
802 0 : set_frameBorder(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitSetterCallArgs args)
803 : {
804 0 : binding_detail::FakeString arg0;
805 0 : if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
806 0 : return false;
807 : }
808 0 : CustomElementReactionsStack* reactionsStack = GetCustomElementReactionsStack(obj);
809 0 : Maybe<AutoCEReaction> ceReaction;
810 0 : if (reactionsStack) {
811 0 : ceReaction.emplace(reactionsStack);
812 : }
813 0 : binding_detail::FastErrorResult rv;
814 0 : self->SetFrameBorder(NonNullHelper(Constify(arg0)), rv);
815 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
816 0 : return false;
817 : }
818 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
819 :
820 0 : return true;
821 : }
822 :
823 : static const JSJitInfo frameBorder_getterinfo = {
824 : { (JSJitGetterOp)get_frameBorder },
825 : { prototypes::id::HTMLIFrameElement },
826 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
827 : JSJitInfo::Getter,
828 : JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
829 : JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
830 : false, /* isInfallible. False in setters. */
831 : true, /* isMovable. Not relevant for setters. */
832 : true, /* isEliminatable. Not relevant for setters. */
833 : false, /* isAlwaysInSlot. Only relevant for getters. */
834 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
835 : false, /* isTypedMethod. Only relevant for methods. */
836 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
837 : };
838 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
839 : static_assert(0 < 1, "There is no slot for us");
840 : static const JSJitInfo frameBorder_setterinfo = {
841 : { (JSJitGetterOp)set_frameBorder },
842 : { prototypes::id::HTMLIFrameElement },
843 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
844 : JSJitInfo::Setter,
845 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
846 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
847 : false, /* isInfallible. False in setters. */
848 : false, /* isMovable. Not relevant for setters. */
849 : false, /* isEliminatable. Not relevant for setters. */
850 : false, /* isAlwaysInSlot. Only relevant for getters. */
851 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
852 : false, /* isTypedMethod. Only relevant for methods. */
853 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
854 : };
855 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
856 : static_assert(0 < 1, "There is no slot for us");
857 :
858 : static bool
859 0 : get_longDesc(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitGetterCallArgs args)
860 : {
861 0 : DOMString result;
862 0 : self->GetLongDesc(result);
863 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
864 0 : if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
865 0 : return false;
866 : }
867 0 : return true;
868 : }
869 :
870 : static bool
871 0 : set_longDesc(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitSetterCallArgs args)
872 : {
873 0 : binding_detail::FakeString arg0;
874 0 : if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
875 0 : return false;
876 : }
877 0 : CustomElementReactionsStack* reactionsStack = GetCustomElementReactionsStack(obj);
878 0 : Maybe<AutoCEReaction> ceReaction;
879 0 : if (reactionsStack) {
880 0 : ceReaction.emplace(reactionsStack);
881 : }
882 0 : binding_detail::FastErrorResult rv;
883 0 : self->SetLongDesc(NonNullHelper(Constify(arg0)), rv);
884 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
885 0 : return false;
886 : }
887 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
888 :
889 0 : return true;
890 : }
891 :
892 : static const JSJitInfo longDesc_getterinfo = {
893 : { (JSJitGetterOp)get_longDesc },
894 : { prototypes::id::HTMLIFrameElement },
895 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
896 : JSJitInfo::Getter,
897 : JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
898 : JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
899 : false, /* isInfallible. False in setters. */
900 : true, /* isMovable. Not relevant for setters. */
901 : true, /* isEliminatable. Not relevant for setters. */
902 : false, /* isAlwaysInSlot. Only relevant for getters. */
903 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
904 : false, /* isTypedMethod. Only relevant for methods. */
905 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
906 : };
907 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
908 : static_assert(0 < 1, "There is no slot for us");
909 : static const JSJitInfo longDesc_setterinfo = {
910 : { (JSJitGetterOp)set_longDesc },
911 : { prototypes::id::HTMLIFrameElement },
912 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
913 : JSJitInfo::Setter,
914 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
915 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
916 : false, /* isInfallible. False in setters. */
917 : false, /* isMovable. Not relevant for setters. */
918 : false, /* isEliminatable. Not relevant for setters. */
919 : false, /* isAlwaysInSlot. Only relevant for getters. */
920 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
921 : false, /* isTypedMethod. Only relevant for methods. */
922 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
923 : };
924 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
925 : static_assert(0 < 1, "There is no slot for us");
926 :
927 : static bool
928 0 : get_marginHeight(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitGetterCallArgs args)
929 : {
930 0 : DOMString result;
931 0 : self->GetMarginHeight(result);
932 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
933 0 : if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
934 0 : return false;
935 : }
936 0 : return true;
937 : }
938 :
939 : static bool
940 0 : set_marginHeight(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitSetterCallArgs args)
941 : {
942 0 : binding_detail::FakeString arg0;
943 0 : if (!ConvertJSValueToString(cx, args[0], eEmpty, eStringify, arg0)) {
944 0 : return false;
945 : }
946 0 : CustomElementReactionsStack* reactionsStack = GetCustomElementReactionsStack(obj);
947 0 : Maybe<AutoCEReaction> ceReaction;
948 0 : if (reactionsStack) {
949 0 : ceReaction.emplace(reactionsStack);
950 : }
951 0 : binding_detail::FastErrorResult rv;
952 0 : self->SetMarginHeight(NonNullHelper(Constify(arg0)), rv);
953 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
954 0 : return false;
955 : }
956 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
957 :
958 0 : return true;
959 : }
960 :
961 : static const JSJitInfo marginHeight_getterinfo = {
962 : { (JSJitGetterOp)get_marginHeight },
963 : { prototypes::id::HTMLIFrameElement },
964 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
965 : JSJitInfo::Getter,
966 : JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
967 : JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
968 : false, /* isInfallible. False in setters. */
969 : true, /* isMovable. Not relevant for setters. */
970 : true, /* isEliminatable. Not relevant for setters. */
971 : false, /* isAlwaysInSlot. Only relevant for getters. */
972 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
973 : false, /* isTypedMethod. Only relevant for methods. */
974 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
975 : };
976 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
977 : static_assert(0 < 1, "There is no slot for us");
978 : static const JSJitInfo marginHeight_setterinfo = {
979 : { (JSJitGetterOp)set_marginHeight },
980 : { prototypes::id::HTMLIFrameElement },
981 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
982 : JSJitInfo::Setter,
983 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
984 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
985 : false, /* isInfallible. False in setters. */
986 : false, /* isMovable. Not relevant for setters. */
987 : false, /* isEliminatable. Not relevant for setters. */
988 : false, /* isAlwaysInSlot. Only relevant for getters. */
989 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
990 : false, /* isTypedMethod. Only relevant for methods. */
991 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
992 : };
993 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
994 : static_assert(0 < 1, "There is no slot for us");
995 :
996 : static bool
997 0 : get_marginWidth(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitGetterCallArgs args)
998 : {
999 0 : DOMString result;
1000 0 : self->GetMarginWidth(result);
1001 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1002 0 : if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
1003 0 : return false;
1004 : }
1005 0 : return true;
1006 : }
1007 :
1008 : static bool
1009 0 : set_marginWidth(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitSetterCallArgs args)
1010 : {
1011 0 : binding_detail::FakeString arg0;
1012 0 : if (!ConvertJSValueToString(cx, args[0], eEmpty, eStringify, arg0)) {
1013 0 : return false;
1014 : }
1015 0 : CustomElementReactionsStack* reactionsStack = GetCustomElementReactionsStack(obj);
1016 0 : Maybe<AutoCEReaction> ceReaction;
1017 0 : if (reactionsStack) {
1018 0 : ceReaction.emplace(reactionsStack);
1019 : }
1020 0 : binding_detail::FastErrorResult rv;
1021 0 : self->SetMarginWidth(NonNullHelper(Constify(arg0)), rv);
1022 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
1023 0 : return false;
1024 : }
1025 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1026 :
1027 0 : return true;
1028 : }
1029 :
1030 : static const JSJitInfo marginWidth_getterinfo = {
1031 : { (JSJitGetterOp)get_marginWidth },
1032 : { prototypes::id::HTMLIFrameElement },
1033 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
1034 : JSJitInfo::Getter,
1035 : JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
1036 : JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
1037 : false, /* isInfallible. False in setters. */
1038 : true, /* isMovable. Not relevant for setters. */
1039 : true, /* isEliminatable. Not relevant for setters. */
1040 : false, /* isAlwaysInSlot. Only relevant for getters. */
1041 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1042 : false, /* isTypedMethod. Only relevant for methods. */
1043 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1044 : };
1045 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1046 : static_assert(0 < 1, "There is no slot for us");
1047 : static const JSJitInfo marginWidth_setterinfo = {
1048 : { (JSJitGetterOp)set_marginWidth },
1049 : { prototypes::id::HTMLIFrameElement },
1050 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
1051 : JSJitInfo::Setter,
1052 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1053 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1054 : false, /* isInfallible. False in setters. */
1055 : false, /* isMovable. Not relevant for setters. */
1056 : false, /* isEliminatable. Not relevant for setters. */
1057 : false, /* isAlwaysInSlot. Only relevant for getters. */
1058 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1059 : false, /* isTypedMethod. Only relevant for methods. */
1060 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1061 : };
1062 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1063 : static_assert(0 < 1, "There is no slot for us");
1064 :
1065 : static bool
1066 0 : getSVGDocument(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
1067 : {
1068 0 : JSCompartment* compartment = js::GetContextCompartment(cx);
1069 0 : MOZ_ASSERT(compartment);
1070 0 : JSPrincipals* principals = JS_GetCompartmentPrincipals(compartment);
1071 : // Initializing a nonnull is pretty darn annoying...
1072 0 : NonNull<nsIPrincipal> subjectPrincipal;
1073 0 : subjectPrincipal = static_cast<nsIPrincipal*>(nsJSPrincipals::get(principals));
1074 0 : auto result(StrongOrRawPtr<nsIDocument>(self->GetSVGDocument(subjectPrincipal)));
1075 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1076 0 : if (!result) {
1077 0 : args.rval().setNull();
1078 0 : return true;
1079 : }
1080 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
1081 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
1082 0 : return false;
1083 : }
1084 0 : return true;
1085 : }
1086 :
1087 : static const JSJitInfo getSVGDocument_methodinfo = {
1088 : { (JSJitGetterOp)getSVGDocument },
1089 : { prototypes::id::HTMLIFrameElement },
1090 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
1091 : JSJitInfo::Method,
1092 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1093 : JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
1094 : false, /* isInfallible. False in setters. */
1095 : false, /* isMovable. Not relevant for setters. */
1096 : false, /* isEliminatable. Not relevant for setters. */
1097 : false, /* isAlwaysInSlot. Only relevant for getters. */
1098 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1099 : false, /* isTypedMethod. Only relevant for methods. */
1100 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1101 : };
1102 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1103 : static_assert(0 < 1, "There is no slot for us");
1104 :
1105 : static bool
1106 0 : get_mozbrowser(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitGetterCallArgs args)
1107 : {
1108 0 : bool result(self->Mozbrowser());
1109 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1110 0 : args.rval().setBoolean(result);
1111 0 : return true;
1112 : }
1113 :
1114 : static bool
1115 0 : set_mozbrowser(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitSetterCallArgs args)
1116 : {
1117 : bool arg0;
1118 0 : if (!ValueToPrimitive<bool, eDefault>(cx, args[0], &arg0)) {
1119 0 : return false;
1120 : }
1121 0 : binding_detail::FastErrorResult rv;
1122 0 : self->SetMozbrowser(arg0, rv);
1123 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
1124 0 : return false;
1125 : }
1126 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1127 :
1128 0 : return true;
1129 : }
1130 :
1131 : static const JSJitInfo mozbrowser_getterinfo = {
1132 : { (JSJitGetterOp)get_mozbrowser },
1133 : { prototypes::id::HTMLIFrameElement },
1134 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
1135 : JSJitInfo::Getter,
1136 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1137 : JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
1138 : true, /* isInfallible. False in setters. */
1139 : false, /* isMovable. Not relevant for setters. */
1140 : false, /* isEliminatable. Not relevant for setters. */
1141 : false, /* isAlwaysInSlot. Only relevant for getters. */
1142 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1143 : false, /* isTypedMethod. Only relevant for methods. */
1144 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1145 : };
1146 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1147 : static_assert(0 < 1, "There is no slot for us");
1148 : static const JSJitInfo mozbrowser_setterinfo = {
1149 : { (JSJitGetterOp)set_mozbrowser },
1150 : { prototypes::id::HTMLIFrameElement },
1151 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
1152 : JSJitInfo::Setter,
1153 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1154 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1155 : false, /* isInfallible. False in setters. */
1156 : false, /* isMovable. Not relevant for setters. */
1157 : false, /* isEliminatable. Not relevant for setters. */
1158 : false, /* isAlwaysInSlot. Only relevant for getters. */
1159 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1160 : false, /* isTypedMethod. Only relevant for methods. */
1161 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1162 : };
1163 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1164 : static_assert(0 < 1, "There is no slot for us");
1165 :
1166 : static bool
1167 0 : addNextPaintListener(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
1168 : {
1169 0 : if (MOZ_UNLIKELY(args.length() < 1)) {
1170 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "HTMLIFrameElement.addNextPaintListener");
1171 : }
1172 0 : RootedCallback<OwningNonNull<binding_detail::FastBrowserElementNextPaintEventCallback>> arg0(cx);
1173 0 : if (args[0].isObject()) {
1174 0 : if (JS::IsCallable(&args[0].toObject())) {
1175 : { // scope for tempRoot
1176 0 : JS::Rooted<JSObject*> tempRoot(cx, &args[0].toObject());
1177 0 : arg0 = new binding_detail::FastBrowserElementNextPaintEventCallback(tempRoot);
1178 : }
1179 : } else {
1180 0 : ThrowErrorMessage(cx, MSG_NOT_CALLABLE, "Argument 1 of HTMLIFrameElement.addNextPaintListener");
1181 0 : return false;
1182 : }
1183 : } else {
1184 0 : ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Argument 1 of HTMLIFrameElement.addNextPaintListener");
1185 0 : return false;
1186 : }
1187 0 : binding_detail::FastErrorResult rv;
1188 0 : self->AddNextPaintListener(NonNullHelper(arg0), rv);
1189 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
1190 0 : return false;
1191 : }
1192 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1193 0 : args.rval().setUndefined();
1194 0 : return true;
1195 : }
1196 :
1197 : static const JSJitInfo addNextPaintListener_methodinfo = {
1198 : { (JSJitGetterOp)addNextPaintListener },
1199 : { prototypes::id::HTMLIFrameElement },
1200 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
1201 : JSJitInfo::Method,
1202 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1203 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1204 : false, /* isInfallible. False in setters. */
1205 : false, /* isMovable. Not relevant for setters. */
1206 : false, /* isEliminatable. Not relevant for setters. */
1207 : false, /* isAlwaysInSlot. Only relevant for getters. */
1208 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1209 : false, /* isTypedMethod. Only relevant for methods. */
1210 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1211 : };
1212 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1213 : static_assert(0 < 1, "There is no slot for us");
1214 :
1215 : static bool
1216 0 : removeNextPaintListener(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
1217 : {
1218 0 : if (MOZ_UNLIKELY(args.length() < 1)) {
1219 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "HTMLIFrameElement.removeNextPaintListener");
1220 : }
1221 0 : RootedCallback<OwningNonNull<binding_detail::FastBrowserElementNextPaintEventCallback>> arg0(cx);
1222 0 : if (args[0].isObject()) {
1223 0 : if (JS::IsCallable(&args[0].toObject())) {
1224 : { // scope for tempRoot
1225 0 : JS::Rooted<JSObject*> tempRoot(cx, &args[0].toObject());
1226 0 : arg0 = new binding_detail::FastBrowserElementNextPaintEventCallback(tempRoot);
1227 : }
1228 : } else {
1229 0 : ThrowErrorMessage(cx, MSG_NOT_CALLABLE, "Argument 1 of HTMLIFrameElement.removeNextPaintListener");
1230 0 : return false;
1231 : }
1232 : } else {
1233 0 : ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Argument 1 of HTMLIFrameElement.removeNextPaintListener");
1234 0 : return false;
1235 : }
1236 0 : binding_detail::FastErrorResult rv;
1237 0 : self->RemoveNextPaintListener(NonNullHelper(arg0), rv);
1238 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
1239 0 : return false;
1240 : }
1241 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1242 0 : args.rval().setUndefined();
1243 0 : return true;
1244 : }
1245 :
1246 : static const JSJitInfo removeNextPaintListener_methodinfo = {
1247 : { (JSJitGetterOp)removeNextPaintListener },
1248 : { prototypes::id::HTMLIFrameElement },
1249 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
1250 : JSJitInfo::Method,
1251 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1252 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1253 : false, /* isInfallible. False in setters. */
1254 : false, /* isMovable. Not relevant for setters. */
1255 : false, /* isEliminatable. Not relevant for setters. */
1256 : false, /* isAlwaysInSlot. Only relevant for getters. */
1257 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1258 : false, /* isTypedMethod. Only relevant for methods. */
1259 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1260 : };
1261 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1262 : static_assert(0 < 1, "There is no slot for us");
1263 :
1264 : static bool
1265 0 : sendMouseEvent(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
1266 : {
1267 0 : if (MOZ_UNLIKELY(args.length() < 6)) {
1268 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "HTMLIFrameElement.sendMouseEvent");
1269 : }
1270 0 : binding_detail::FakeString arg0;
1271 0 : if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
1272 0 : return false;
1273 : }
1274 : uint32_t arg1;
1275 0 : if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[1], &arg1)) {
1276 0 : return false;
1277 : }
1278 : uint32_t arg2;
1279 0 : if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[2], &arg2)) {
1280 0 : return false;
1281 : }
1282 : uint32_t arg3;
1283 0 : if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[3], &arg3)) {
1284 0 : return false;
1285 : }
1286 : uint32_t arg4;
1287 0 : if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[4], &arg4)) {
1288 0 : return false;
1289 : }
1290 : uint32_t arg5;
1291 0 : if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[5], &arg5)) {
1292 0 : return false;
1293 : }
1294 0 : binding_detail::FastErrorResult rv;
1295 0 : self->SendMouseEvent(NonNullHelper(Constify(arg0)), arg1, arg2, arg3, arg4, arg5, rv);
1296 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
1297 0 : return false;
1298 : }
1299 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1300 0 : args.rval().setUndefined();
1301 0 : return true;
1302 : }
1303 :
1304 : static const JSJitInfo sendMouseEvent_methodinfo = {
1305 : { (JSJitGetterOp)sendMouseEvent },
1306 : { prototypes::id::HTMLIFrameElement },
1307 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
1308 : JSJitInfo::Method,
1309 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1310 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1311 : false, /* isInfallible. False in setters. */
1312 : false, /* isMovable. Not relevant for setters. */
1313 : false, /* isEliminatable. Not relevant for setters. */
1314 : false, /* isAlwaysInSlot. Only relevant for getters. */
1315 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1316 : false, /* isTypedMethod. Only relevant for methods. */
1317 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1318 : };
1319 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1320 : static_assert(0 < 1, "There is no slot for us");
1321 :
1322 : static bool
1323 0 : sendTouchEvent(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
1324 : {
1325 0 : if (MOZ_UNLIKELY(args.length() < 10)) {
1326 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "HTMLIFrameElement.sendTouchEvent");
1327 : }
1328 0 : binding_detail::FakeString arg0;
1329 0 : if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
1330 0 : return false;
1331 : }
1332 0 : binding_detail::AutoSequence<uint32_t> arg1;
1333 0 : if (args[1].isObject()) {
1334 0 : JS::ForOfIterator iter(cx);
1335 0 : if (!iter.init(args[1], JS::ForOfIterator::AllowNonIterable)) {
1336 0 : return false;
1337 : }
1338 0 : if (!iter.valueIsIterable()) {
1339 0 : ThrowErrorMessage(cx, MSG_NOT_SEQUENCE, "Argument 2 of HTMLIFrameElement.sendTouchEvent");
1340 0 : return false;
1341 : }
1342 0 : binding_detail::AutoSequence<uint32_t> &arr = arg1;
1343 0 : JS::Rooted<JS::Value> temp(cx);
1344 : while (true) {
1345 : bool done;
1346 0 : if (!iter.next(&temp, &done)) {
1347 0 : return false;
1348 : }
1349 0 : if (done) {
1350 0 : break;
1351 : }
1352 0 : uint32_t* slotPtr = arr.AppendElement(mozilla::fallible);
1353 0 : if (!slotPtr) {
1354 0 : JS_ReportOutOfMemory(cx);
1355 0 : return false;
1356 : }
1357 0 : uint32_t& slot = *slotPtr;
1358 0 : if (!ValueToPrimitive<uint32_t, eDefault>(cx, temp, &slot)) {
1359 0 : return false;
1360 : }
1361 0 : }
1362 : } else {
1363 0 : ThrowErrorMessage(cx, MSG_NOT_SEQUENCE, "Argument 2 of HTMLIFrameElement.sendTouchEvent");
1364 0 : return false;
1365 : }
1366 0 : binding_detail::AutoSequence<int32_t> arg2;
1367 0 : if (args[2].isObject()) {
1368 0 : JS::ForOfIterator iter(cx);
1369 0 : if (!iter.init(args[2], JS::ForOfIterator::AllowNonIterable)) {
1370 0 : return false;
1371 : }
1372 0 : if (!iter.valueIsIterable()) {
1373 0 : ThrowErrorMessage(cx, MSG_NOT_SEQUENCE, "Argument 3 of HTMLIFrameElement.sendTouchEvent");
1374 0 : return false;
1375 : }
1376 0 : binding_detail::AutoSequence<int32_t> &arr = arg2;
1377 0 : JS::Rooted<JS::Value> temp(cx);
1378 : while (true) {
1379 : bool done;
1380 0 : if (!iter.next(&temp, &done)) {
1381 0 : return false;
1382 : }
1383 0 : if (done) {
1384 0 : break;
1385 : }
1386 0 : int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
1387 0 : if (!slotPtr) {
1388 0 : JS_ReportOutOfMemory(cx);
1389 0 : return false;
1390 : }
1391 0 : int32_t& slot = *slotPtr;
1392 0 : if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, &slot)) {
1393 0 : return false;
1394 : }
1395 0 : }
1396 : } else {
1397 0 : ThrowErrorMessage(cx, MSG_NOT_SEQUENCE, "Argument 3 of HTMLIFrameElement.sendTouchEvent");
1398 0 : return false;
1399 : }
1400 0 : binding_detail::AutoSequence<int32_t> arg3;
1401 0 : if (args[3].isObject()) {
1402 0 : JS::ForOfIterator iter(cx);
1403 0 : if (!iter.init(args[3], JS::ForOfIterator::AllowNonIterable)) {
1404 0 : return false;
1405 : }
1406 0 : if (!iter.valueIsIterable()) {
1407 0 : ThrowErrorMessage(cx, MSG_NOT_SEQUENCE, "Argument 4 of HTMLIFrameElement.sendTouchEvent");
1408 0 : return false;
1409 : }
1410 0 : binding_detail::AutoSequence<int32_t> &arr = arg3;
1411 0 : JS::Rooted<JS::Value> temp(cx);
1412 : while (true) {
1413 : bool done;
1414 0 : if (!iter.next(&temp, &done)) {
1415 0 : return false;
1416 : }
1417 0 : if (done) {
1418 0 : break;
1419 : }
1420 0 : int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
1421 0 : if (!slotPtr) {
1422 0 : JS_ReportOutOfMemory(cx);
1423 0 : return false;
1424 : }
1425 0 : int32_t& slot = *slotPtr;
1426 0 : if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, &slot)) {
1427 0 : return false;
1428 : }
1429 0 : }
1430 : } else {
1431 0 : ThrowErrorMessage(cx, MSG_NOT_SEQUENCE, "Argument 4 of HTMLIFrameElement.sendTouchEvent");
1432 0 : return false;
1433 : }
1434 0 : binding_detail::AutoSequence<uint32_t> arg4;
1435 0 : if (args[4].isObject()) {
1436 0 : JS::ForOfIterator iter(cx);
1437 0 : if (!iter.init(args[4], JS::ForOfIterator::AllowNonIterable)) {
1438 0 : return false;
1439 : }
1440 0 : if (!iter.valueIsIterable()) {
1441 0 : ThrowErrorMessage(cx, MSG_NOT_SEQUENCE, "Argument 5 of HTMLIFrameElement.sendTouchEvent");
1442 0 : return false;
1443 : }
1444 0 : binding_detail::AutoSequence<uint32_t> &arr = arg4;
1445 0 : JS::Rooted<JS::Value> temp(cx);
1446 : while (true) {
1447 : bool done;
1448 0 : if (!iter.next(&temp, &done)) {
1449 0 : return false;
1450 : }
1451 0 : if (done) {
1452 0 : break;
1453 : }
1454 0 : uint32_t* slotPtr = arr.AppendElement(mozilla::fallible);
1455 0 : if (!slotPtr) {
1456 0 : JS_ReportOutOfMemory(cx);
1457 0 : return false;
1458 : }
1459 0 : uint32_t& slot = *slotPtr;
1460 0 : if (!ValueToPrimitive<uint32_t, eDefault>(cx, temp, &slot)) {
1461 0 : return false;
1462 : }
1463 0 : }
1464 : } else {
1465 0 : ThrowErrorMessage(cx, MSG_NOT_SEQUENCE, "Argument 5 of HTMLIFrameElement.sendTouchEvent");
1466 0 : return false;
1467 : }
1468 0 : binding_detail::AutoSequence<uint32_t> arg5;
1469 0 : if (args[5].isObject()) {
1470 0 : JS::ForOfIterator iter(cx);
1471 0 : if (!iter.init(args[5], JS::ForOfIterator::AllowNonIterable)) {
1472 0 : return false;
1473 : }
1474 0 : if (!iter.valueIsIterable()) {
1475 0 : ThrowErrorMessage(cx, MSG_NOT_SEQUENCE, "Argument 6 of HTMLIFrameElement.sendTouchEvent");
1476 0 : return false;
1477 : }
1478 0 : binding_detail::AutoSequence<uint32_t> &arr = arg5;
1479 0 : JS::Rooted<JS::Value> temp(cx);
1480 : while (true) {
1481 : bool done;
1482 0 : if (!iter.next(&temp, &done)) {
1483 0 : return false;
1484 : }
1485 0 : if (done) {
1486 0 : break;
1487 : }
1488 0 : uint32_t* slotPtr = arr.AppendElement(mozilla::fallible);
1489 0 : if (!slotPtr) {
1490 0 : JS_ReportOutOfMemory(cx);
1491 0 : return false;
1492 : }
1493 0 : uint32_t& slot = *slotPtr;
1494 0 : if (!ValueToPrimitive<uint32_t, eDefault>(cx, temp, &slot)) {
1495 0 : return false;
1496 : }
1497 0 : }
1498 : } else {
1499 0 : ThrowErrorMessage(cx, MSG_NOT_SEQUENCE, "Argument 6 of HTMLIFrameElement.sendTouchEvent");
1500 0 : return false;
1501 : }
1502 0 : binding_detail::AutoSequence<float> arg6;
1503 0 : if (args[6].isObject()) {
1504 0 : JS::ForOfIterator iter(cx);
1505 0 : if (!iter.init(args[6], JS::ForOfIterator::AllowNonIterable)) {
1506 0 : return false;
1507 : }
1508 0 : if (!iter.valueIsIterable()) {
1509 0 : ThrowErrorMessage(cx, MSG_NOT_SEQUENCE, "Argument 7 of HTMLIFrameElement.sendTouchEvent");
1510 0 : return false;
1511 : }
1512 0 : binding_detail::AutoSequence<float> &arr = arg6;
1513 0 : JS::Rooted<JS::Value> temp(cx);
1514 : while (true) {
1515 : bool done;
1516 0 : if (!iter.next(&temp, &done)) {
1517 0 : return false;
1518 : }
1519 0 : if (done) {
1520 0 : break;
1521 : }
1522 0 : float* slotPtr = arr.AppendElement(mozilla::fallible);
1523 0 : if (!slotPtr) {
1524 0 : JS_ReportOutOfMemory(cx);
1525 0 : return false;
1526 : }
1527 0 : float& slot = *slotPtr;
1528 0 : if (!ValueToPrimitive<float, eDefault>(cx, temp, &slot)) {
1529 0 : return false;
1530 0 : } else if (!mozilla::IsFinite(slot)) {
1531 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Element of argument 7 of HTMLIFrameElement.sendTouchEvent");
1532 0 : return false;
1533 : }
1534 0 : }
1535 : } else {
1536 0 : ThrowErrorMessage(cx, MSG_NOT_SEQUENCE, "Argument 7 of HTMLIFrameElement.sendTouchEvent");
1537 0 : return false;
1538 : }
1539 0 : binding_detail::AutoSequence<float> arg7;
1540 0 : if (args[7].isObject()) {
1541 0 : JS::ForOfIterator iter(cx);
1542 0 : if (!iter.init(args[7], JS::ForOfIterator::AllowNonIterable)) {
1543 0 : return false;
1544 : }
1545 0 : if (!iter.valueIsIterable()) {
1546 0 : ThrowErrorMessage(cx, MSG_NOT_SEQUENCE, "Argument 8 of HTMLIFrameElement.sendTouchEvent");
1547 0 : return false;
1548 : }
1549 0 : binding_detail::AutoSequence<float> &arr = arg7;
1550 0 : JS::Rooted<JS::Value> temp(cx);
1551 : while (true) {
1552 : bool done;
1553 0 : if (!iter.next(&temp, &done)) {
1554 0 : return false;
1555 : }
1556 0 : if (done) {
1557 0 : break;
1558 : }
1559 0 : float* slotPtr = arr.AppendElement(mozilla::fallible);
1560 0 : if (!slotPtr) {
1561 0 : JS_ReportOutOfMemory(cx);
1562 0 : return false;
1563 : }
1564 0 : float& slot = *slotPtr;
1565 0 : if (!ValueToPrimitive<float, eDefault>(cx, temp, &slot)) {
1566 0 : return false;
1567 0 : } else if (!mozilla::IsFinite(slot)) {
1568 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Element of argument 8 of HTMLIFrameElement.sendTouchEvent");
1569 0 : return false;
1570 : }
1571 0 : }
1572 : } else {
1573 0 : ThrowErrorMessage(cx, MSG_NOT_SEQUENCE, "Argument 8 of HTMLIFrameElement.sendTouchEvent");
1574 0 : return false;
1575 : }
1576 : uint32_t arg8;
1577 0 : if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[8], &arg8)) {
1578 0 : return false;
1579 : }
1580 : uint32_t arg9;
1581 0 : if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[9], &arg9)) {
1582 0 : return false;
1583 : }
1584 0 : binding_detail::FastErrorResult rv;
1585 0 : self->SendTouchEvent(NonNullHelper(Constify(arg0)), Constify(arg1), Constify(arg2), Constify(arg3), Constify(arg4), Constify(arg5), Constify(arg6), Constify(arg7), arg8, arg9, rv);
1586 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
1587 0 : return false;
1588 : }
1589 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1590 0 : args.rval().setUndefined();
1591 0 : return true;
1592 : }
1593 :
1594 : static const JSJitInfo sendTouchEvent_methodinfo = {
1595 : { (JSJitGetterOp)sendTouchEvent },
1596 : { prototypes::id::HTMLIFrameElement },
1597 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
1598 : JSJitInfo::Method,
1599 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1600 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1601 : false, /* isInfallible. False in setters. */
1602 : false, /* isMovable. Not relevant for setters. */
1603 : false, /* isEliminatable. Not relevant for setters. */
1604 : false, /* isAlwaysInSlot. Only relevant for getters. */
1605 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1606 : false, /* isTypedMethod. Only relevant for methods. */
1607 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1608 : };
1609 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1610 : static_assert(0 < 1, "There is no slot for us");
1611 :
1612 : static bool
1613 0 : goBack(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
1614 : {
1615 0 : binding_detail::FastErrorResult rv;
1616 0 : self->GoBack(rv);
1617 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
1618 0 : return false;
1619 : }
1620 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1621 0 : args.rval().setUndefined();
1622 0 : return true;
1623 : }
1624 :
1625 : static const JSJitInfo goBack_methodinfo = {
1626 : { (JSJitGetterOp)goBack },
1627 : { prototypes::id::HTMLIFrameElement },
1628 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
1629 : JSJitInfo::Method,
1630 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1631 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1632 : false, /* isInfallible. False in setters. */
1633 : false, /* isMovable. Not relevant for setters. */
1634 : false, /* isEliminatable. Not relevant for setters. */
1635 : false, /* isAlwaysInSlot. Only relevant for getters. */
1636 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1637 : false, /* isTypedMethod. Only relevant for methods. */
1638 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1639 : };
1640 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1641 : static_assert(0 < 1, "There is no slot for us");
1642 :
1643 : static bool
1644 0 : goForward(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
1645 : {
1646 0 : binding_detail::FastErrorResult rv;
1647 0 : self->GoForward(rv);
1648 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
1649 0 : return false;
1650 : }
1651 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1652 0 : args.rval().setUndefined();
1653 0 : return true;
1654 : }
1655 :
1656 : static const JSJitInfo goForward_methodinfo = {
1657 : { (JSJitGetterOp)goForward },
1658 : { prototypes::id::HTMLIFrameElement },
1659 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
1660 : JSJitInfo::Method,
1661 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1662 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1663 : false, /* isInfallible. False in setters. */
1664 : false, /* isMovable. Not relevant for setters. */
1665 : false, /* isEliminatable. Not relevant for setters. */
1666 : false, /* isAlwaysInSlot. Only relevant for getters. */
1667 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1668 : false, /* isTypedMethod. Only relevant for methods. */
1669 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1670 : };
1671 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1672 : static_assert(0 < 1, "There is no slot for us");
1673 :
1674 : static bool
1675 0 : reload(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
1676 : {
1677 : bool arg0;
1678 0 : if (args.hasDefined(0)) {
1679 0 : if (!ValueToPrimitive<bool, eDefault>(cx, args[0], &arg0)) {
1680 0 : return false;
1681 : }
1682 : } else {
1683 0 : arg0 = false;
1684 : }
1685 0 : binding_detail::FastErrorResult rv;
1686 0 : self->Reload(arg0, rv);
1687 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
1688 0 : return false;
1689 : }
1690 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1691 0 : args.rval().setUndefined();
1692 0 : return true;
1693 : }
1694 :
1695 : static const JSJitInfo reload_methodinfo = {
1696 : { (JSJitGetterOp)reload },
1697 : { prototypes::id::HTMLIFrameElement },
1698 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
1699 : JSJitInfo::Method,
1700 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1701 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1702 : false, /* isInfallible. False in setters. */
1703 : false, /* isMovable. Not relevant for setters. */
1704 : false, /* isEliminatable. Not relevant for setters. */
1705 : false, /* isAlwaysInSlot. Only relevant for getters. */
1706 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1707 : false, /* isTypedMethod. Only relevant for methods. */
1708 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1709 : };
1710 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1711 : static_assert(0 < 1, "There is no slot for us");
1712 :
1713 : static bool
1714 0 : stop(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
1715 : {
1716 0 : binding_detail::FastErrorResult rv;
1717 0 : self->Stop(rv);
1718 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
1719 0 : return false;
1720 : }
1721 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1722 0 : args.rval().setUndefined();
1723 0 : return true;
1724 : }
1725 :
1726 : static const JSJitInfo stop_methodinfo = {
1727 : { (JSJitGetterOp)stop },
1728 : { prototypes::id::HTMLIFrameElement },
1729 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
1730 : JSJitInfo::Method,
1731 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1732 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1733 : false, /* isInfallible. False in setters. */
1734 : false, /* isMovable. Not relevant for setters. */
1735 : false, /* isEliminatable. Not relevant for setters. */
1736 : false, /* isAlwaysInSlot. Only relevant for getters. */
1737 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1738 : false, /* isTypedMethod. Only relevant for methods. */
1739 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1740 : };
1741 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1742 : static_assert(0 < 1, "There is no slot for us");
1743 :
1744 : static bool
1745 0 : download(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
1746 : {
1747 0 : if (MOZ_UNLIKELY(args.length() < 1)) {
1748 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "HTMLIFrameElement.download");
1749 : }
1750 0 : binding_detail::FakeString arg0;
1751 0 : if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
1752 0 : return false;
1753 : }
1754 0 : binding_detail::FastBrowserElementDownloadOptions arg1;
1755 0 : if (!arg1.Init(cx, (args.hasDefined(1)) ? args[1] : JS::NullHandleValue, "Argument 2 of HTMLIFrameElement.download", false)) {
1756 0 : return false;
1757 : }
1758 0 : binding_detail::FastErrorResult rv;
1759 0 : auto result(StrongOrRawPtr<mozilla::dom::DOMRequest>(self->Download(NonNullHelper(Constify(arg0)), Constify(arg1), rv)));
1760 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
1761 0 : return false;
1762 : }
1763 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1764 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
1765 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
1766 0 : return false;
1767 : }
1768 0 : return true;
1769 : }
1770 :
1771 : static const JSJitInfo download_methodinfo = {
1772 : { (JSJitGetterOp)download },
1773 : { prototypes::id::HTMLIFrameElement },
1774 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
1775 : JSJitInfo::Method,
1776 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1777 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
1778 : false, /* isInfallible. False in setters. */
1779 : false, /* isMovable. Not relevant for setters. */
1780 : false, /* isEliminatable. Not relevant for setters. */
1781 : false, /* isAlwaysInSlot. Only relevant for getters. */
1782 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1783 : false, /* isTypedMethod. Only relevant for methods. */
1784 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1785 : };
1786 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1787 : static_assert(0 < 1, "There is no slot for us");
1788 :
1789 : static bool
1790 0 : purgeHistory(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
1791 : {
1792 0 : binding_detail::FastErrorResult rv;
1793 0 : auto result(StrongOrRawPtr<mozilla::dom::DOMRequest>(self->PurgeHistory(rv)));
1794 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
1795 0 : return false;
1796 : }
1797 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1798 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
1799 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
1800 0 : return false;
1801 : }
1802 0 : return true;
1803 : }
1804 :
1805 : static const JSJitInfo purgeHistory_methodinfo = {
1806 : { (JSJitGetterOp)purgeHistory },
1807 : { prototypes::id::HTMLIFrameElement },
1808 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
1809 : JSJitInfo::Method,
1810 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1811 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
1812 : false, /* isInfallible. False in setters. */
1813 : false, /* isMovable. Not relevant for setters. */
1814 : false, /* isEliminatable. Not relevant for setters. */
1815 : false, /* isAlwaysInSlot. Only relevant for getters. */
1816 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1817 : false, /* isTypedMethod. Only relevant for methods. */
1818 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1819 : };
1820 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1821 : static_assert(0 < 1, "There is no slot for us");
1822 :
1823 : static bool
1824 0 : getScreenshot(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
1825 : {
1826 0 : if (MOZ_UNLIKELY(args.length() < 2)) {
1827 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "HTMLIFrameElement.getScreenshot");
1828 : }
1829 : uint32_t arg0;
1830 0 : if (!ValueToPrimitive<uint32_t, eEnforceRange>(cx, args[0], &arg0)) {
1831 0 : return false;
1832 : }
1833 : uint32_t arg1;
1834 0 : if (!ValueToPrimitive<uint32_t, eEnforceRange>(cx, args[1], &arg1)) {
1835 0 : return false;
1836 : }
1837 0 : binding_detail::FakeString arg2;
1838 0 : if (args.hasDefined(2)) {
1839 0 : if (!ConvertJSValueToString(cx, args[2], eStringify, eStringify, arg2)) {
1840 0 : return false;
1841 : }
1842 : } else {
1843 : static const char16_t data[] = { 0 };
1844 0 : arg2.Rebind(data, ArrayLength(data) - 1);
1845 : }
1846 0 : binding_detail::FastErrorResult rv;
1847 0 : auto result(StrongOrRawPtr<mozilla::dom::DOMRequest>(self->GetScreenshot(arg0, arg1, NonNullHelper(Constify(arg2)), rv)));
1848 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
1849 0 : return false;
1850 : }
1851 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1852 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
1853 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
1854 0 : return false;
1855 : }
1856 0 : return true;
1857 : }
1858 :
1859 : static const JSJitInfo getScreenshot_methodinfo = {
1860 : { (JSJitGetterOp)getScreenshot },
1861 : { prototypes::id::HTMLIFrameElement },
1862 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
1863 : JSJitInfo::Method,
1864 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1865 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
1866 : false, /* isInfallible. False in setters. */
1867 : false, /* isMovable. Not relevant for setters. */
1868 : false, /* isEliminatable. Not relevant for setters. */
1869 : false, /* isAlwaysInSlot. Only relevant for getters. */
1870 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1871 : false, /* isTypedMethod. Only relevant for methods. */
1872 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1873 : };
1874 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1875 : static_assert(0 < 1, "There is no slot for us");
1876 :
1877 : static bool
1878 0 : zoom(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
1879 : {
1880 0 : if (MOZ_UNLIKELY(args.length() < 1)) {
1881 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "HTMLIFrameElement.zoom");
1882 : }
1883 : float arg0;
1884 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
1885 0 : return false;
1886 0 : } else if (!mozilla::IsFinite(arg0)) {
1887 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 1 of HTMLIFrameElement.zoom");
1888 0 : return false;
1889 : }
1890 0 : binding_detail::FastErrorResult rv;
1891 0 : self->Zoom(arg0, rv);
1892 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
1893 0 : return false;
1894 : }
1895 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1896 0 : args.rval().setUndefined();
1897 0 : return true;
1898 : }
1899 :
1900 : static const JSJitInfo zoom_methodinfo = {
1901 : { (JSJitGetterOp)zoom },
1902 : { prototypes::id::HTMLIFrameElement },
1903 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
1904 : JSJitInfo::Method,
1905 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1906 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1907 : false, /* isInfallible. False in setters. */
1908 : false, /* isMovable. Not relevant for setters. */
1909 : false, /* isEliminatable. Not relevant for setters. */
1910 : false, /* isAlwaysInSlot. Only relevant for getters. */
1911 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1912 : false, /* isTypedMethod. Only relevant for methods. */
1913 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1914 : };
1915 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1916 : static_assert(0 < 1, "There is no slot for us");
1917 :
1918 : static bool
1919 0 : getCanGoBack(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
1920 : {
1921 0 : binding_detail::FastErrorResult rv;
1922 0 : auto result(StrongOrRawPtr<mozilla::dom::DOMRequest>(self->GetCanGoBack(rv)));
1923 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
1924 0 : return false;
1925 : }
1926 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1927 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
1928 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
1929 0 : return false;
1930 : }
1931 0 : return true;
1932 : }
1933 :
1934 : static const JSJitInfo getCanGoBack_methodinfo = {
1935 : { (JSJitGetterOp)getCanGoBack },
1936 : { prototypes::id::HTMLIFrameElement },
1937 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
1938 : JSJitInfo::Method,
1939 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1940 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
1941 : false, /* isInfallible. False in setters. */
1942 : false, /* isMovable. Not relevant for setters. */
1943 : false, /* isEliminatable. Not relevant for setters. */
1944 : false, /* isAlwaysInSlot. Only relevant for getters. */
1945 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1946 : false, /* isTypedMethod. Only relevant for methods. */
1947 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1948 : };
1949 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1950 : static_assert(0 < 1, "There is no slot for us");
1951 :
1952 : static bool
1953 0 : getCanGoForward(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
1954 : {
1955 0 : binding_detail::FastErrorResult rv;
1956 0 : auto result(StrongOrRawPtr<mozilla::dom::DOMRequest>(self->GetCanGoForward(rv)));
1957 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
1958 0 : return false;
1959 : }
1960 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1961 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
1962 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
1963 0 : return false;
1964 : }
1965 0 : return true;
1966 : }
1967 :
1968 : static const JSJitInfo getCanGoForward_methodinfo = {
1969 : { (JSJitGetterOp)getCanGoForward },
1970 : { prototypes::id::HTMLIFrameElement },
1971 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
1972 : JSJitInfo::Method,
1973 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1974 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
1975 : false, /* isInfallible. False in setters. */
1976 : false, /* isMovable. Not relevant for setters. */
1977 : false, /* isEliminatable. Not relevant for setters. */
1978 : false, /* isAlwaysInSlot. Only relevant for getters. */
1979 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1980 : false, /* isTypedMethod. Only relevant for methods. */
1981 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1982 : };
1983 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1984 : static_assert(0 < 1, "There is no slot for us");
1985 :
1986 : static bool
1987 0 : getContentDimensions(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
1988 : {
1989 0 : binding_detail::FastErrorResult rv;
1990 0 : auto result(StrongOrRawPtr<mozilla::dom::DOMRequest>(self->GetContentDimensions(rv)));
1991 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
1992 0 : return false;
1993 : }
1994 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1995 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
1996 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
1997 0 : return false;
1998 : }
1999 0 : return true;
2000 : }
2001 :
2002 : static const JSJitInfo getContentDimensions_methodinfo = {
2003 : { (JSJitGetterOp)getContentDimensions },
2004 : { prototypes::id::HTMLIFrameElement },
2005 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
2006 : JSJitInfo::Method,
2007 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2008 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
2009 : false, /* isInfallible. False in setters. */
2010 : false, /* isMovable. Not relevant for setters. */
2011 : false, /* isEliminatable. Not relevant for setters. */
2012 : false, /* isAlwaysInSlot. Only relevant for getters. */
2013 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
2014 : false, /* isTypedMethod. Only relevant for methods. */
2015 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2016 : };
2017 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
2018 : static_assert(0 < 1, "There is no slot for us");
2019 :
2020 : static bool
2021 0 : findAll(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
2022 : {
2023 0 : if (MOZ_UNLIKELY(args.length() < 2)) {
2024 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "HTMLIFrameElement.findAll");
2025 : }
2026 0 : binding_detail::FakeString arg0;
2027 0 : if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
2028 0 : return false;
2029 : }
2030 : BrowserFindCaseSensitivity arg1;
2031 : {
2032 : int index;
2033 0 : if (!FindEnumStringIndex<true>(cx, args[1], BrowserFindCaseSensitivityValues::strings, "BrowserFindCaseSensitivity", "Argument 2 of HTMLIFrameElement.findAll", &index)) {
2034 0 : return false;
2035 : }
2036 0 : MOZ_ASSERT(index >= 0);
2037 0 : arg1 = static_cast<BrowserFindCaseSensitivity>(index);
2038 : }
2039 0 : binding_detail::FastErrorResult rv;
2040 0 : self->FindAll(NonNullHelper(Constify(arg0)), arg1, rv);
2041 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
2042 0 : return false;
2043 : }
2044 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
2045 0 : args.rval().setUndefined();
2046 0 : return true;
2047 : }
2048 :
2049 : static const JSJitInfo findAll_methodinfo = {
2050 : { (JSJitGetterOp)findAll },
2051 : { prototypes::id::HTMLIFrameElement },
2052 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
2053 : JSJitInfo::Method,
2054 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2055 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2056 : false, /* isInfallible. False in setters. */
2057 : false, /* isMovable. Not relevant for setters. */
2058 : false, /* isEliminatable. Not relevant for setters. */
2059 : false, /* isAlwaysInSlot. Only relevant for getters. */
2060 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
2061 : false, /* isTypedMethod. Only relevant for methods. */
2062 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2063 : };
2064 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
2065 : static_assert(0 < 1, "There is no slot for us");
2066 :
2067 : static bool
2068 0 : findNext(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
2069 : {
2070 0 : if (MOZ_UNLIKELY(args.length() < 1)) {
2071 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "HTMLIFrameElement.findNext");
2072 : }
2073 : BrowserFindDirection arg0;
2074 : {
2075 : int index;
2076 0 : if (!FindEnumStringIndex<true>(cx, args[0], BrowserFindDirectionValues::strings, "BrowserFindDirection", "Argument 1 of HTMLIFrameElement.findNext", &index)) {
2077 0 : return false;
2078 : }
2079 0 : MOZ_ASSERT(index >= 0);
2080 0 : arg0 = static_cast<BrowserFindDirection>(index);
2081 : }
2082 0 : binding_detail::FastErrorResult rv;
2083 0 : self->FindNext(arg0, rv);
2084 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
2085 0 : return false;
2086 : }
2087 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
2088 0 : args.rval().setUndefined();
2089 0 : return true;
2090 : }
2091 :
2092 : static const JSJitInfo findNext_methodinfo = {
2093 : { (JSJitGetterOp)findNext },
2094 : { prototypes::id::HTMLIFrameElement },
2095 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
2096 : JSJitInfo::Method,
2097 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2098 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2099 : false, /* isInfallible. False in setters. */
2100 : false, /* isMovable. Not relevant for setters. */
2101 : false, /* isEliminatable. Not relevant for setters. */
2102 : false, /* isAlwaysInSlot. Only relevant for getters. */
2103 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
2104 : false, /* isTypedMethod. Only relevant for methods. */
2105 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2106 : };
2107 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
2108 : static_assert(0 < 1, "There is no slot for us");
2109 :
2110 : static bool
2111 0 : clearMatch(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
2112 : {
2113 0 : binding_detail::FastErrorResult rv;
2114 0 : self->ClearMatch(rv);
2115 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
2116 0 : return false;
2117 : }
2118 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
2119 0 : args.rval().setUndefined();
2120 0 : return true;
2121 : }
2122 :
2123 : static const JSJitInfo clearMatch_methodinfo = {
2124 : { (JSJitGetterOp)clearMatch },
2125 : { prototypes::id::HTMLIFrameElement },
2126 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
2127 : JSJitInfo::Method,
2128 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2129 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2130 : false, /* isInfallible. False in setters. */
2131 : false, /* isMovable. Not relevant for setters. */
2132 : false, /* isEliminatable. Not relevant for setters. */
2133 : false, /* isAlwaysInSlot. Only relevant for getters. */
2134 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
2135 : false, /* isTypedMethod. Only relevant for methods. */
2136 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2137 : };
2138 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
2139 : static_assert(0 < 1, "There is no slot for us");
2140 :
2141 : static bool
2142 0 : executeScript(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
2143 : {
2144 0 : if (MOZ_UNLIKELY(args.length() < 1)) {
2145 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "HTMLIFrameElement.executeScript");
2146 : }
2147 0 : binding_detail::FakeString arg0;
2148 0 : if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
2149 0 : return false;
2150 : }
2151 0 : binding_detail::FastBrowserElementExecuteScriptOptions arg1;
2152 0 : if (!arg1.Init(cx, (args.hasDefined(1)) ? args[1] : JS::NullHandleValue, "Argument 2 of HTMLIFrameElement.executeScript", false)) {
2153 0 : return false;
2154 : }
2155 0 : binding_detail::FastErrorResult rv;
2156 0 : auto result(StrongOrRawPtr<mozilla::dom::DOMRequest>(self->ExecuteScript(NonNullHelper(Constify(arg0)), Constify(arg1), rv)));
2157 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
2158 0 : return false;
2159 : }
2160 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
2161 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
2162 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
2163 0 : return false;
2164 : }
2165 0 : return true;
2166 : }
2167 :
2168 : static const JSJitInfo executeScript_methodinfo = {
2169 : { (JSJitGetterOp)executeScript },
2170 : { prototypes::id::HTMLIFrameElement },
2171 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
2172 : JSJitInfo::Method,
2173 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2174 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
2175 : false, /* isInfallible. False in setters. */
2176 : false, /* isMovable. Not relevant for setters. */
2177 : false, /* isEliminatable. Not relevant for setters. */
2178 : false, /* isAlwaysInSlot. Only relevant for getters. */
2179 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
2180 : false, /* isTypedMethod. Only relevant for methods. */
2181 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2182 : };
2183 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
2184 : static_assert(0 < 1, "There is no slot for us");
2185 :
2186 : static bool
2187 0 : getWebManifest(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
2188 : {
2189 0 : binding_detail::FastErrorResult rv;
2190 0 : auto result(StrongOrRawPtr<mozilla::dom::DOMRequest>(self->GetWebManifest(rv)));
2191 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
2192 0 : return false;
2193 : }
2194 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
2195 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
2196 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
2197 0 : return false;
2198 : }
2199 0 : return true;
2200 : }
2201 :
2202 : static const JSJitInfo getWebManifest_methodinfo = {
2203 : { (JSJitGetterOp)getWebManifest },
2204 : { prototypes::id::HTMLIFrameElement },
2205 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
2206 : JSJitInfo::Method,
2207 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2208 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
2209 : false, /* isInfallible. False in setters. */
2210 : false, /* isMovable. Not relevant for setters. */
2211 : false, /* isEliminatable. Not relevant for setters. */
2212 : false, /* isAlwaysInSlot. Only relevant for getters. */
2213 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
2214 : false, /* isTypedMethod. Only relevant for methods. */
2215 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2216 : };
2217 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
2218 : static_assert(0 < 1, "There is no slot for us");
2219 :
2220 : static bool
2221 0 : get_frameLoader(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, JSJitGetterCallArgs args)
2222 : {
2223 0 : auto result(StrongOrRawPtr<nsIFrameLoader>(self->GetFrameLoader()));
2224 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
2225 0 : if (!result) {
2226 0 : args.rval().setNull();
2227 0 : return true;
2228 : }
2229 0 : if (!WrapObject(cx, result, &NS_GET_IID(nsIFrameLoader), args.rval())) {
2230 0 : return false;
2231 : }
2232 0 : return true;
2233 : }
2234 :
2235 : static const JSJitInfo frameLoader_getterinfo = {
2236 : { (JSJitGetterOp)get_frameLoader },
2237 : { prototypes::id::HTMLIFrameElement },
2238 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
2239 : JSJitInfo::Getter,
2240 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2241 : JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
2242 : false, /* isInfallible. False in setters. */
2243 : false, /* isMovable. Not relevant for setters. */
2244 : false, /* isEliminatable. Not relevant for setters. */
2245 : false, /* isAlwaysInSlot. Only relevant for getters. */
2246 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
2247 : false, /* isTypedMethod. Only relevant for methods. */
2248 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2249 : };
2250 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
2251 : static_assert(0 < 1, "There is no slot for us");
2252 :
2253 : static bool
2254 0 : setIsPrerendered(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
2255 : {
2256 0 : self->SetIsPrerendered();
2257 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
2258 0 : args.rval().setUndefined();
2259 0 : return true;
2260 : }
2261 :
2262 : static const JSJitInfo setIsPrerendered_methodinfo = {
2263 : { (JSJitGetterOp)setIsPrerendered },
2264 : { prototypes::id::HTMLIFrameElement },
2265 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
2266 : JSJitInfo::Method,
2267 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2268 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2269 : true, /* isInfallible. False in setters. */
2270 : false, /* isMovable. Not relevant for setters. */
2271 : false, /* isEliminatable. Not relevant for setters. */
2272 : false, /* isAlwaysInSlot. Only relevant for getters. */
2273 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
2274 : false, /* isTypedMethod. Only relevant for methods. */
2275 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2276 : };
2277 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
2278 : static_assert(0 < 1, "There is no slot for us");
2279 :
2280 : static bool
2281 0 : presetOpenerWindow(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
2282 : {
2283 0 : if (MOZ_UNLIKELY(args.length() < 1)) {
2284 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "HTMLIFrameElement.presetOpenerWindow");
2285 : }
2286 : nsPIDOMWindowOuter* arg0;
2287 0 : RefPtr<nsPIDOMWindowOuter> arg0_holder;
2288 0 : if (args[0].isObject()) {
2289 0 : JS::Rooted<JSObject*> source(cx, &args[0].toObject());
2290 0 : if (NS_FAILED(UnwrapArg<nsPIDOMWindowOuter>(cx, source, getter_AddRefs(arg0_holder)))) {
2291 0 : ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 1 of HTMLIFrameElement.presetOpenerWindow", "WindowProxy");
2292 0 : return false;
2293 : }
2294 0 : MOZ_ASSERT(arg0_holder);
2295 0 : arg0 = arg0_holder;
2296 0 : } else if (args[0].isNullOrUndefined()) {
2297 0 : arg0 = nullptr;
2298 : } else {
2299 0 : ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Argument 1 of HTMLIFrameElement.presetOpenerWindow");
2300 0 : return false;
2301 : }
2302 0 : binding_detail::FastErrorResult rv;
2303 0 : self->PresetOpenerWindow(Constify(arg0), rv);
2304 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
2305 0 : return false;
2306 : }
2307 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
2308 0 : args.rval().setUndefined();
2309 0 : return true;
2310 : }
2311 :
2312 : static const JSJitInfo presetOpenerWindow_methodinfo = {
2313 : { (JSJitGetterOp)presetOpenerWindow },
2314 : { prototypes::id::HTMLIFrameElement },
2315 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
2316 : JSJitInfo::Method,
2317 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2318 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2319 : false, /* isInfallible. False in setters. */
2320 : false, /* isMovable. Not relevant for setters. */
2321 : false, /* isEliminatable. Not relevant for setters. */
2322 : false, /* isAlwaysInSlot. Only relevant for getters. */
2323 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
2324 : false, /* isTypedMethod. Only relevant for methods. */
2325 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2326 : };
2327 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
2328 : static_assert(0 < 1, "There is no slot for us");
2329 :
2330 : static bool
2331 0 : swapFrameLoaders(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::HTMLIFrameElement* self, const JSJitMethodCallArgs& args)
2332 : {
2333 0 : unsigned argcount = std::min(args.length(), 1u);
2334 0 : switch (argcount) {
2335 : case 1: {
2336 0 : if (args[0].isObject()) {
2337 : do {
2338 0 : NonNull<nsXULElement> arg0;
2339 : {
2340 0 : nsresult rv = UnwrapObject<prototypes::id::XULElement, nsXULElement>(args[0], arg0);
2341 0 : if (NS_FAILED(rv)) {
2342 0 : break;
2343 : }
2344 : }
2345 0 : binding_detail::FastErrorResult rv;
2346 0 : self->SwapFrameLoaders(NonNullHelper(arg0), rv);
2347 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
2348 0 : return false;
2349 : }
2350 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
2351 0 : args.rval().setUndefined();
2352 0 : return true;
2353 : } while (0);
2354 : do {
2355 0 : NonNull<mozilla::dom::HTMLIFrameElement> arg0;
2356 : {
2357 0 : nsresult rv = UnwrapObject<prototypes::id::HTMLIFrameElement, mozilla::dom::HTMLIFrameElement>(args[0], arg0);
2358 0 : if (NS_FAILED(rv)) {
2359 0 : break;
2360 : }
2361 : }
2362 0 : binding_detail::FastErrorResult rv;
2363 0 : self->SwapFrameLoaders(NonNullHelper(arg0), rv);
2364 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
2365 0 : return false;
2366 : }
2367 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
2368 0 : args.rval().setUndefined();
2369 0 : return true;
2370 : } while (0);
2371 : }
2372 0 : return ThrowErrorMessage(cx, MSG_OVERLOAD_RESOLUTION_FAILED, "1", "1", "HTMLIFrameElement.swapFrameLoaders");
2373 : break;
2374 : }
2375 : default: {
2376 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "HTMLIFrameElement.swapFrameLoaders");
2377 : break;
2378 : }
2379 : }
2380 : MOZ_CRASH("We have an always-returning default case");
2381 : return false;
2382 : }
2383 :
2384 : static const JSJitInfo swapFrameLoaders_methodinfo = {
2385 : { (JSJitGetterOp)swapFrameLoaders },
2386 : { prototypes::id::HTMLIFrameElement },
2387 : { PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth },
2388 : JSJitInfo::Method,
2389 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2390 : JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2391 : false, /* isInfallible. False in setters. */
2392 : false, /* isMovable. Not relevant for setters. */
2393 : false, /* isEliminatable. Not relevant for setters. */
2394 : false, /* isAlwaysInSlot. Only relevant for getters. */
2395 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
2396 : false, /* isTypedMethod. Only relevant for methods. */
2397 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2398 : };
2399 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
2400 : static_assert(0 < 1, "There is no slot for us");
2401 :
2402 : static bool
2403 0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
2404 : {
2405 0 : mozilla::dom::HTMLIFrameElement* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::HTMLIFrameElement>(obj);
2406 : // We don't want to preserve if we don't have a wrapper, and we
2407 : // obviously can't preserve if we're not initialized.
2408 0 : if (self && self->GetWrapperPreserveColor()) {
2409 0 : PreserveWrapper(self);
2410 : }
2411 0 : return true;
2412 : }
2413 :
2414 : static void
2415 0 : _finalize(js::FreeOp* fop, JSObject* obj)
2416 : {
2417 0 : mozilla::dom::HTMLIFrameElement* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::HTMLIFrameElement>(obj);
2418 0 : if (self) {
2419 0 : ClearWrapper(self, self, obj);
2420 0 : AddForDeferredFinalization<mozilla::dom::HTMLIFrameElement>(self);
2421 : }
2422 0 : }
2423 :
2424 : static void
2425 0 : _objectMoved(JSObject* obj, const JSObject* old)
2426 : {
2427 0 : mozilla::dom::HTMLIFrameElement* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::HTMLIFrameElement>(obj);
2428 0 : if (self) {
2429 0 : UpdateWrapper(self, self, obj, old);
2430 : }
2431 0 : }
2432 :
2433 : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
2434 : #if defined(__clang__)
2435 : #pragma clang diagnostic push
2436 : #pragma clang diagnostic ignored "-Wmissing-braces"
2437 : #endif
2438 : static const JSFunctionSpec sMethods_specs[] = {
2439 : JS_FNSPEC("getSVGDocument", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&getSVGDocument_methodinfo), 0, JSPROP_ENUMERATE, nullptr),
2440 : JS_FS_END
2441 : };
2442 : #if defined(__clang__)
2443 : #pragma clang diagnostic pop
2444 : #endif
2445 :
2446 :
2447 : // Can't be const because the pref-enabled boolean needs to be writable
2448 : static Prefable<const JSFunctionSpec> sMethods[] = {
2449 : { nullptr, &sMethods_specs[0] },
2450 : { nullptr, nullptr }
2451 : };
2452 :
2453 : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
2454 : "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
2455 : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
2456 : "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
2457 :
2458 : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
2459 : #if defined(__clang__)
2460 : #pragma clang diagnostic push
2461 : #pragma clang diagnostic ignored "-Wmissing-braces"
2462 : #endif
2463 : static const JSFunctionSpec sChromeMethods_specs[] = {
2464 : JS_FNSPEC("addNextPaintListener", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&addNextPaintListener_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
2465 : JS_FNSPEC("removeNextPaintListener", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&removeNextPaintListener_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
2466 : JS_FNSPEC("sendMouseEvent", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&sendMouseEvent_methodinfo), 6, JSPROP_ENUMERATE, nullptr),
2467 : JS_FS_END,
2468 : JS_FNSPEC("sendTouchEvent", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&sendTouchEvent_methodinfo), 10, JSPROP_ENUMERATE, nullptr),
2469 : JS_FS_END,
2470 : JS_FNSPEC("goBack", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&goBack_methodinfo), 0, JSPROP_ENUMERATE, nullptr),
2471 : JS_FNSPEC("goForward", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&goForward_methodinfo), 0, JSPROP_ENUMERATE, nullptr),
2472 : JS_FNSPEC("reload", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&reload_methodinfo), 0, JSPROP_ENUMERATE, nullptr),
2473 : JS_FNSPEC("stop", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&stop_methodinfo), 0, JSPROP_ENUMERATE, nullptr),
2474 : JS_FNSPEC("download", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&download_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
2475 : JS_FNSPEC("purgeHistory", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&purgeHistory_methodinfo), 0, JSPROP_ENUMERATE, nullptr),
2476 : JS_FNSPEC("getScreenshot", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&getScreenshot_methodinfo), 2, JSPROP_ENUMERATE, nullptr),
2477 : JS_FNSPEC("zoom", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&zoom_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
2478 : JS_FNSPEC("getCanGoBack", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&getCanGoBack_methodinfo), 0, JSPROP_ENUMERATE, nullptr),
2479 : JS_FNSPEC("getCanGoForward", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&getCanGoForward_methodinfo), 0, JSPROP_ENUMERATE, nullptr),
2480 : JS_FNSPEC("getContentDimensions", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&getContentDimensions_methodinfo), 0, JSPROP_ENUMERATE, nullptr),
2481 : JS_FNSPEC("findAll", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&findAll_methodinfo), 2, JSPROP_ENUMERATE, nullptr),
2482 : JS_FNSPEC("findNext", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&findNext_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
2483 : JS_FNSPEC("clearMatch", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&clearMatch_methodinfo), 0, JSPROP_ENUMERATE, nullptr),
2484 : JS_FNSPEC("executeScript", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&executeScript_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
2485 : JS_FNSPEC("getWebManifest", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&getWebManifest_methodinfo), 0, JSPROP_ENUMERATE, nullptr),
2486 : JS_FS_END,
2487 : JS_FNSPEC("setIsPrerendered", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&setIsPrerendered_methodinfo), 0, JSPROP_ENUMERATE, nullptr),
2488 : JS_FNSPEC("presetOpenerWindow", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&presetOpenerWindow_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
2489 : JS_FNSPEC("swapFrameLoaders", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&swapFrameLoaders_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
2490 : JS_FS_END
2491 : };
2492 : #if defined(__clang__)
2493 : #pragma clang diagnostic pop
2494 : #endif
2495 :
2496 : static PrefableDisablers sChromeMethods_disablers0 = {
2497 : true, false, 0, nullptr
2498 : };
2499 :
2500 : static PrefableDisablers sChromeMethods_disablers4 = {
2501 : true, false, 0, &TouchEvent::PrefEnabled
2502 : };
2503 :
2504 : static PrefableDisablers sChromeMethods_disablers6 = {
2505 : true, false, 0, nullptr
2506 : };
2507 :
2508 : // Can't be const because the pref-enabled boolean needs to be writable
2509 : static Prefable<const JSFunctionSpec> sChromeMethods[] = {
2510 : { &sChromeMethods_disablers0, &sChromeMethods_specs[0] },
2511 : { &sChromeMethods_disablers4, &sChromeMethods_specs[4] },
2512 : { &sChromeMethods_disablers6, &sChromeMethods_specs[6] },
2513 : { nullptr, &sChromeMethods_specs[23] },
2514 : { nullptr, nullptr }
2515 : };
2516 :
2517 : static_assert(4 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
2518 : "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
2519 : static_assert(16 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
2520 : "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
2521 :
2522 : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
2523 : #if defined(__clang__)
2524 : #pragma clang diagnostic push
2525 : #pragma clang diagnostic ignored "-Wmissing-braces"
2526 : #endif
2527 : static const JSPropertySpec sAttributes_specs[] = {
2528 : { "src", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &src_getterinfo, GenericBindingSetter, &src_setterinfo },
2529 : { "srcdoc", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &srcdoc_getterinfo, GenericBindingSetter, &srcdoc_setterinfo },
2530 : { "name", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &name_getterinfo, GenericBindingSetter, &name_setterinfo },
2531 : { "sandbox", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &sandbox_getterinfo, GenericBindingSetter, &sandbox_setterinfo },
2532 : { "allowFullscreen", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &allowFullscreen_getterinfo, GenericBindingSetter, &allowFullscreen_setterinfo },
2533 : { "width", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &width_getterinfo, GenericBindingSetter, &width_setterinfo },
2534 : { "height", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &height_getterinfo, GenericBindingSetter, &height_setterinfo },
2535 : { "referrerPolicy", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &referrerPolicy_getterinfo, GenericBindingSetter, &referrerPolicy_setterinfo },
2536 : { "contentDocument", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &contentDocument_getterinfo, nullptr, nullptr },
2537 : { "contentWindow", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &contentWindow_getterinfo, nullptr, nullptr },
2538 : { "align", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &align_getterinfo, GenericBindingSetter, &align_setterinfo },
2539 : { "scrolling", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &scrolling_getterinfo, GenericBindingSetter, &scrolling_setterinfo },
2540 : { "frameBorder", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &frameBorder_getterinfo, GenericBindingSetter, &frameBorder_setterinfo },
2541 : { "longDesc", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &longDesc_getterinfo, GenericBindingSetter, &longDesc_setterinfo },
2542 : { "marginHeight", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &marginHeight_getterinfo, GenericBindingSetter, &marginHeight_setterinfo },
2543 : { "marginWidth", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &marginWidth_getterinfo, GenericBindingSetter, &marginWidth_setterinfo },
2544 : { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
2545 : };
2546 : #if defined(__clang__)
2547 : #pragma clang diagnostic pop
2548 : #endif
2549 :
2550 :
2551 : // Can't be const because the pref-enabled boolean needs to be writable
2552 : static Prefable<const JSPropertySpec> sAttributes[] = {
2553 : { nullptr, &sAttributes_specs[0] },
2554 : { nullptr, nullptr }
2555 : };
2556 :
2557 : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
2558 : "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
2559 : static_assert(16 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
2560 : "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
2561 :
2562 : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
2563 : #if defined(__clang__)
2564 : #pragma clang diagnostic push
2565 : #pragma clang diagnostic ignored "-Wmissing-braces"
2566 : #endif
2567 : static const JSPropertySpec sChromeAttributes_specs[] = {
2568 : { "mozbrowser", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &mozbrowser_getterinfo, GenericBindingSetter, &mozbrowser_setterinfo },
2569 : { "frameLoader", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &frameLoader_getterinfo, nullptr, nullptr },
2570 : { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
2571 : };
2572 : #if defined(__clang__)
2573 : #pragma clang diagnostic pop
2574 : #endif
2575 :
2576 :
2577 : // Can't be const because the pref-enabled boolean needs to be writable
2578 : static Prefable<const JSPropertySpec> sChromeAttributes[] = {
2579 : { nullptr, &sChromeAttributes_specs[0] },
2580 : { nullptr, nullptr }
2581 : };
2582 :
2583 : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
2584 : "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
2585 : static_assert(2 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
2586 : "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
2587 :
2588 :
2589 : static uint16_t sNativeProperties_sortedPropertyIndices[17];
2590 : static PropertyInfo sNativeProperties_propertyInfos[17];
2591 :
2592 : static const NativePropertiesN<2> sNativeProperties = {
2593 : false, 0,
2594 : false, 0,
2595 : true, 0 /* sMethods */,
2596 : true, 1 /* sAttributes */,
2597 : false, 0,
2598 : false, 0,
2599 : false, 0,
2600 : -1,
2601 : 17,
2602 : sNativeProperties_sortedPropertyIndices,
2603 : {
2604 : { sMethods, &sNativeProperties_propertyInfos[0] },
2605 : { sAttributes, &sNativeProperties_propertyInfos[1] }
2606 : }
2607 : };
2608 : static_assert(17 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
2609 : "We have a property info count that is oversized");
2610 :
2611 : static uint16_t sChromeOnlyNativeProperties_sortedPropertyIndices[25];
2612 : static PropertyInfo sChromeOnlyNativeProperties_propertyInfos[25];
2613 :
2614 : static const NativePropertiesN<2> sChromeOnlyNativeProperties = {
2615 : false, 0,
2616 : false, 0,
2617 : true, 0 /* sChromeMethods */,
2618 : true, 1 /* sChromeAttributes */,
2619 : false, 0,
2620 : false, 0,
2621 : false, 0,
2622 : -1,
2623 : 25,
2624 : sChromeOnlyNativeProperties_sortedPropertyIndices,
2625 : {
2626 : { sChromeMethods, &sChromeOnlyNativeProperties_propertyInfos[0] },
2627 : { sChromeAttributes, &sChromeOnlyNativeProperties_propertyInfos[23] }
2628 : }
2629 : };
2630 : static_assert(25 < 1ull << CHAR_BIT * sizeof(sChromeOnlyNativeProperties.propertyInfoCount),
2631 : "We have a property info count that is oversized");
2632 :
2633 : static bool
2634 0 : _constructor(JSContext* cx, unsigned argc, JS::Value* vp)
2635 : {
2636 0 : JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
2637 0 : JS::Rooted<JSObject*> obj(cx, &args.callee());
2638 0 : if (!args.isConstructing()) {
2639 : // XXXbz wish I could get the name from the callee instead of
2640 : // Adding more relocations
2641 0 : return ThrowConstructorWithoutNew(cx, "HTMLIFrameElement");
2642 : }
2643 :
2644 0 : GlobalObject global(cx, obj);
2645 0 : if (global.Failed()) {
2646 0 : return false;
2647 : }
2648 :
2649 : // The newTarget might be a cross-compartment wrapper. Get the underlying object
2650 : // so we can do the spec's object-identity checks.
2651 0 : JS::Rooted<JSObject*> newTarget(cx, js::CheckedUnwrap(&args.newTarget().toObject()));
2652 0 : if (!newTarget) {
2653 0 : return ThrowErrorMessage(cx, MSG_ILLEGAL_CONSTRUCTOR);
2654 : }
2655 :
2656 : // Step 2 of https://html.spec.whatwg.org/multipage/dom.html#htmlconstructor.
2657 : // Enter the compartment of our underlying newTarget object, so we end
2658 : // up comparing to the constructor object for our interface from that global.
2659 : {
2660 0 : JSAutoCompartment ac(cx, newTarget);
2661 0 : JS::Handle<JSObject*> constructor(GetConstructorObjectHandle(cx));
2662 0 : if (!constructor) {
2663 0 : return false;
2664 : }
2665 0 : if (newTarget == constructor) {
2666 0 : return ThrowErrorMessage(cx, MSG_ILLEGAL_CONSTRUCTOR);
2667 : }
2668 : }
2669 :
2670 0 : JS::Rooted<JSObject*> desiredProto(cx);
2671 0 : if (!GetDesiredProto(cx, args, &desiredProto)) {
2672 0 : return false;
2673 : }
2674 0 : if (!desiredProto) {
2675 : // Step 7 of https://html.spec.whatwg.org/multipage/dom.html#htmlconstructor.
2676 : // This fallback behavior is designed to match analogous behavior for the
2677 : // JavaScript built-ins. So we enter the compartment of our underlying
2678 : // newTarget object and fall back to the prototype object from that global.
2679 : // XXX The spec says to use GetFunctionRealm(), which is not actually
2680 : // the same thing as what we have here (e.g. in the case of scripted callable proxies
2681 : // whose target is not same-compartment with the proxy, or bound functions, etc).
2682 : // https://bugzilla.mozilla.org/show_bug.cgi?id=1317658
2683 : {
2684 0 : JSAutoCompartment ac(cx, newTarget);
2685 0 : desiredProto = GetProtoObjectHandle(cx);
2686 0 : if (!desiredProto) {
2687 0 : return false;
2688 : }
2689 : }
2690 :
2691 : // desiredProto is in the compartment of the underlying newTarget object.
2692 : // Wrap it into the context compartment.
2693 0 : if (!JS_WrapObject(cx, &desiredProto)) {
2694 0 : return false;
2695 : }
2696 : }
2697 :
2698 0 : bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
2699 0 : Maybe<JSAutoCompartment> ac;
2700 0 : if (objIsXray) {
2701 0 : obj = js::CheckedUnwrap(obj);
2702 0 : if (!obj) {
2703 0 : return false;
2704 : }
2705 0 : ac.emplace(cx, obj);
2706 0 : if (!JS_WrapObject(cx, &desiredProto)) {
2707 0 : return false;
2708 : }
2709 : }
2710 0 : binding_detail::FastErrorResult rv;
2711 0 : auto result(StrongOrRawPtr<mozilla::dom::HTMLIFrameElement>(CreateHTMLElement(global, args, rv)));
2712 0 : if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
2713 0 : return false;
2714 : }
2715 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
2716 : static_assert(!IsPointer<decltype(result)>::value,
2717 : "NewObject implies that we need to keep the object alive with a strong reference.");
2718 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
2719 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
2720 0 : return false;
2721 : }
2722 0 : return true;
2723 : }
2724 :
2725 : static const js::ClassOps sInterfaceObjectClassOps = {
2726 : nullptr, /* addProperty */
2727 : nullptr, /* delProperty */
2728 : nullptr, /* getProperty */
2729 : nullptr, /* setProperty */
2730 : nullptr, /* enumerate */
2731 : nullptr, /* newEnumerate */
2732 : nullptr, /* resolve */
2733 : nullptr, /* mayResolve */
2734 : nullptr, /* finalize */
2735 : _constructor, /* call */
2736 : nullptr, /* hasInstance */
2737 : _constructor, /* construct */
2738 : nullptr, /* trace */
2739 : };
2740 :
2741 : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
2742 : {
2743 : "Function",
2744 : JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
2745 : &sInterfaceObjectClassOps,
2746 : JS_NULL_CLASS_SPEC,
2747 : JS_NULL_CLASS_EXT,
2748 : &sInterfaceObjectClassObjectOps
2749 : },
2750 : eInterface,
2751 : true,
2752 : prototypes::id::HTMLIFrameElement,
2753 : PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth,
2754 : sNativePropertyHooks,
2755 : "function HTMLIFrameElement() {\n [native code]\n}",
2756 : HTMLElementBinding::GetConstructorObject
2757 : };
2758 :
2759 : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
2760 : {
2761 : "HTMLIFrameElementPrototype",
2762 : JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
2763 : JS_NULL_CLASS_OPS,
2764 : JS_NULL_CLASS_SPEC,
2765 : JS_NULL_CLASS_EXT,
2766 : JS_NULL_OBJECT_OPS
2767 : },
2768 : eInterfacePrototype,
2769 : false,
2770 : prototypes::id::HTMLIFrameElement,
2771 : PrototypeTraits<prototypes::id::HTMLIFrameElement>::Depth,
2772 : sNativePropertyHooks,
2773 : "[object HTMLIFrameElementPrototype]",
2774 : HTMLElementBinding::GetProtoObject
2775 : };
2776 :
2777 : JSObject*
2778 0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
2779 : {
2780 0 : return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
2781 : }
2782 :
2783 : static const js::ClassOps sClassOps = {
2784 : _addProperty, /* addProperty */
2785 : nullptr, /* delProperty */
2786 : nullptr, /* getProperty */
2787 : nullptr, /* setProperty */
2788 : nullptr, /* enumerate */
2789 : nullptr, /* newEnumerate */
2790 : nullptr, /* resolve */
2791 : nullptr, /* mayResolve */
2792 : _finalize, /* finalize */
2793 : nullptr, /* call */
2794 : nullptr, /* hasInstance */
2795 : nullptr, /* construct */
2796 : nullptr, /* trace */
2797 : };
2798 :
2799 : static const js::ClassExtension sClassExtension = {
2800 : nullptr, /* weakmapKeyDelegateOp */
2801 : _objectMoved /* objectMovedOp */
2802 : };
2803 :
2804 : static const DOMJSClass sClass = {
2805 : { "HTMLIFrameElement",
2806 : JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
2807 : &sClassOps,
2808 : JS_NULL_CLASS_SPEC,
2809 : &sClassExtension,
2810 : JS_NULL_OBJECT_OPS
2811 : },
2812 : { prototypes::id::EventTarget, prototypes::id::Node, prototypes::id::Element, prototypes::id::HTMLElement, prototypes::id::HTMLIFrameElement, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
2813 : IsBaseOf<nsISupports, mozilla::dom::HTMLIFrameElement >::value,
2814 : sNativePropertyHooks,
2815 : FindAssociatedGlobalForNative<mozilla::dom::HTMLIFrameElement>::Get,
2816 : GetProtoObjectHandle,
2817 : GetCCParticipant<mozilla::dom::HTMLIFrameElement>::Get()
2818 : };
2819 : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
2820 : "Must have the right minimal number of reserved slots.");
2821 : static_assert(1 >= 1,
2822 : "Must have enough reserved slots.");
2823 :
2824 : const JSClass*
2825 0 : GetJSClass()
2826 : {
2827 0 : return sClass.ToJSClass();
2828 : }
2829 :
2830 : bool
2831 0 : Wrap(JSContext* aCx, mozilla::dom::HTMLIFrameElement* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
2832 : {
2833 : MOZ_ASSERT(static_cast<mozilla::dom::HTMLIFrameElement*>(aObject) ==
2834 : reinterpret_cast<mozilla::dom::HTMLIFrameElement*>(aObject),
2835 : "Multiple inheritance for mozilla::dom::HTMLIFrameElement is broken.");
2836 : MOZ_ASSERT(static_cast<nsGenericHTMLElement*>(aObject) ==
2837 : reinterpret_cast<nsGenericHTMLElement*>(aObject),
2838 : "Multiple inheritance for nsGenericHTMLElement is broken.");
2839 : MOZ_ASSERT(static_cast<mozilla::dom::Element*>(aObject) ==
2840 : reinterpret_cast<mozilla::dom::Element*>(aObject),
2841 : "Multiple inheritance for mozilla::dom::Element is broken.");
2842 : MOZ_ASSERT(static_cast<nsINode*>(aObject) ==
2843 : reinterpret_cast<nsINode*>(aObject),
2844 : "Multiple inheritance for nsINode is broken.");
2845 : MOZ_ASSERT(static_cast<mozilla::dom::EventTarget*>(aObject) ==
2846 : reinterpret_cast<mozilla::dom::EventTarget*>(aObject),
2847 : "Multiple inheritance for mozilla::dom::EventTarget is broken.");
2848 0 : MOZ_ASSERT(ToSupportsIsCorrect(aObject));
2849 0 : MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
2850 0 : MOZ_ASSERT(!aCache->GetWrapper(),
2851 : "You should probably not be using Wrap() directly; use "
2852 : "GetOrCreateDOMReflector instead");
2853 :
2854 0 : MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
2855 : "nsISupports must be on our primary inheritance chain");
2856 :
2857 0 : JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
2858 0 : if (!global) {
2859 0 : return false;
2860 : }
2861 0 : MOZ_ASSERT(JS_IsGlobalObject(global));
2862 0 : MOZ_ASSERT(JS::ObjectIsNotGray(global));
2863 :
2864 : // That might have ended up wrapping us already, due to the wonders
2865 : // of XBL. Check for that, and bail out as needed.
2866 0 : aReflector.set(aCache->GetWrapper());
2867 0 : if (aReflector) {
2868 : #ifdef DEBUG
2869 0 : binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
2870 : #endif // DEBUG
2871 0 : return true;
2872 : }
2873 :
2874 0 : JSAutoCompartment ac(aCx, global);
2875 0 : JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
2876 0 : if (!canonicalProto) {
2877 0 : return false;
2878 : }
2879 0 : JS::Rooted<JSObject*> proto(aCx);
2880 0 : if (aGivenProto) {
2881 0 : proto = aGivenProto;
2882 : // Unfortunately, while aGivenProto was in the compartment of aCx
2883 : // coming in, we changed compartments to that of "parent" so may need
2884 : // to wrap the proto here.
2885 0 : if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
2886 0 : if (!JS_WrapObject(aCx, &proto)) {
2887 0 : return false;
2888 : }
2889 : }
2890 : } else {
2891 0 : proto = canonicalProto;
2892 : }
2893 :
2894 0 : BindingJSObjectCreator<mozilla::dom::HTMLIFrameElement> creator(aCx);
2895 0 : creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
2896 0 : if (!aReflector) {
2897 0 : return false;
2898 : }
2899 :
2900 0 : aCache->SetWrapper(aReflector);
2901 0 : creator.InitializationSucceeded();
2902 :
2903 0 : MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
2904 : aCache->GetWrapperPreserveColor() == aReflector);
2905 : // If proto != canonicalProto, we have to preserve our wrapper;
2906 : // otherwise we won't be able to properly recreate it later, since
2907 : // we won't know what proto to use. Note that we don't check
2908 : // aGivenProto here, since it's entirely possible (and even
2909 : // somewhat common) to have a non-null aGivenProto which is the
2910 : // same as canonicalProto.
2911 0 : if (proto != canonicalProto) {
2912 0 : PreserveWrapper(aObject);
2913 : }
2914 :
2915 0 : return true;
2916 : }
2917 :
2918 : const NativePropertyHooks sNativePropertyHooks[] = { {
2919 : nullptr,
2920 : nullptr,
2921 : nullptr,
2922 : { sNativeProperties.Upcast(), sChromeOnlyNativeProperties.Upcast() },
2923 : prototypes::id::HTMLIFrameElement,
2924 : constructors::id::HTMLIFrameElement,
2925 : HTMLElementBinding::sNativePropertyHooks,
2926 : &DefaultXrayExpandoObjectClass
2927 : } };
2928 :
2929 : void
2930 0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
2931 : {
2932 0 : JS::Handle<JSObject*> parentProto(HTMLElementBinding::GetProtoObjectHandle(aCx));
2933 0 : if (!parentProto) {
2934 0 : return;
2935 : }
2936 :
2937 0 : JS::Handle<JSObject*> constructorProto(HTMLElementBinding::GetConstructorObjectHandle(aCx));
2938 0 : if (!constructorProto) {
2939 0 : return;
2940 : }
2941 :
2942 : static bool sIdsInited = false;
2943 0 : if (!sIdsInited && NS_IsMainThread()) {
2944 0 : if (!InitIds(aCx, sNativeProperties.Upcast())) {
2945 0 : return;
2946 : }
2947 0 : if (!InitIds(aCx, sChromeOnlyNativeProperties.Upcast())) {
2948 0 : return;
2949 : }
2950 0 : sIdsInited = true;
2951 : }
2952 :
2953 : static bool sPrefCachesInited = false;
2954 0 : if (!sPrefCachesInited && NS_IsMainThread()) {
2955 0 : sPrefCachesInited = true;
2956 0 : Preferences::AddBoolVarCache(&sChromeMethods[0].disablers->enabled, "dom.mozBrowserFramesEnabled");
2957 0 : Preferences::AddBoolVarCache(&sChromeMethods[1].disablers->enabled, "dom.mozBrowserFramesEnabled");
2958 0 : Preferences::AddBoolVarCache(&sChromeMethods[2].disablers->enabled, "dom.mozBrowserFramesEnabled");
2959 : }
2960 :
2961 0 : JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::HTMLIFrameElement);
2962 0 : JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::HTMLIFrameElement);
2963 0 : dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
2964 : &sPrototypeClass.mBase, protoCache,
2965 : constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
2966 : interfaceCache,
2967 : sNativeProperties.Upcast(),
2968 0 : nsContentUtils::ThreadsafeIsSystemCaller(aCx) ? sChromeOnlyNativeProperties.Upcast() : nullptr,
2969 : "HTMLIFrameElement", aDefineOnGlobal,
2970 : nullptr,
2971 0 : false);
2972 : }
2973 :
2974 : JS::Handle<JSObject*>
2975 0 : GetProtoObjectHandle(JSContext* aCx)
2976 : {
2977 : /* Get the interface prototype object for this class. This will create the
2978 : object as needed. */
2979 0 : bool aDefineOnGlobal = true;
2980 :
2981 : /* Make sure our global is sane. Hopefully we can remove this sometime */
2982 0 : JSObject* global = JS::CurrentGlobalOrNull(aCx);
2983 0 : if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
2984 0 : return nullptr;
2985 : }
2986 :
2987 : /* Check to see whether the interface objects are already installed */
2988 0 : ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
2989 0 : if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::HTMLIFrameElement)) {
2990 0 : JS::Rooted<JSObject*> rootedGlobal(aCx, global);
2991 0 : CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
2992 : }
2993 :
2994 : /*
2995 : * The object might _still_ be null, but that's OK.
2996 : *
2997 : * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
2998 : * traced by TraceProtoAndIfaceCache() and its contents are never
2999 : * changed after they have been set.
3000 : *
3001 : * Calling address() avoids the read read barrier that does gray
3002 : * unmarking, but it's not possible for the object to be gray here.
3003 : */
3004 :
3005 0 : const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::HTMLIFrameElement);
3006 0 : MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
3007 0 : return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
3008 : }
3009 :
3010 : JS::Handle<JSObject*>
3011 0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
3012 : {
3013 : /* Get the interface object for this class. This will create the object as
3014 : needed. */
3015 :
3016 : /* Make sure our global is sane. Hopefully we can remove this sometime */
3017 0 : JSObject* global = JS::CurrentGlobalOrNull(aCx);
3018 0 : if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
3019 0 : return nullptr;
3020 : }
3021 :
3022 : /* Check to see whether the interface objects are already installed */
3023 0 : ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
3024 0 : if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::HTMLIFrameElement)) {
3025 0 : JS::Rooted<JSObject*> rootedGlobal(aCx, global);
3026 0 : CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
3027 : }
3028 :
3029 : /*
3030 : * The object might _still_ be null, but that's OK.
3031 : *
3032 : * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
3033 : * traced by TraceProtoAndIfaceCache() and its contents are never
3034 : * changed after they have been set.
3035 : *
3036 : * Calling address() avoids the read read barrier that does gray
3037 : * unmarking, but it's not possible for the object to be gray here.
3038 : */
3039 :
3040 0 : const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::HTMLIFrameElement);
3041 0 : MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
3042 0 : return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
3043 : }
3044 :
3045 : JSObject*
3046 0 : GetConstructorObject(JSContext* aCx)
3047 : {
3048 0 : return GetConstructorObjectHandle(aCx);
3049 : }
3050 :
3051 : } // namespace HTMLIFrameElementBinding
3052 :
3053 :
3054 :
3055 : } // namespace dom
3056 : } // namespace mozilla
|