script_bindings/home/runner/work/servo/servo/target/debug/build/script_bindings-d55f55d5af1efaee/out/Bindings/
HTMLTableRowElementBinding.rs

1/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */
2
3#![allow(non_camel_case_types,non_upper_case_globals,unsafe_op_in_unsafe_fn,unused_imports,unused_variables,unused_assignments,unused_mut,clippy::approx_constant,clippy::enum_variant_names,clippy::let_unit_value,clippy::needless_return,clippy::too_many_arguments,clippy::unnecessary_cast,clippy::upper_case_acronyms)]
4
5use crate::codegen::GenericBindings::ElementBinding::Element_Binding;
6use crate::codegen::GenericBindings::EventTargetBinding::EventTarget_Binding;
7use crate::codegen::GenericBindings::HTMLElementBinding::HTMLElement_Binding;
8use crate::codegen::GenericBindings::NodeBinding::Node_Binding;
9use crate::import::base::*;
10
11pub use self::HTMLTableRowElement_Binding::{Wrap, HTMLTableRowElementMethods, GetProtoObject, GetConstructorObject, DefineDOMInterface};
12pub mod HTMLTableRowElement_Binding {
13use crate::codegen::GenericBindings::ElementBinding::Element_Binding;
14use crate::codegen::GenericBindings::EventTargetBinding::EventTarget_Binding;
15use crate::codegen::GenericBindings::HTMLElementBinding::HTMLElement_Binding;
16use crate::codegen::GenericBindings::NodeBinding::Node_Binding;
17use crate::import::module::*;
18
19unsafe extern "C" fn get_rowIndex<D: DomTypes>
20(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
21    let mut result = false;
22    wrap_panic(&mut || result = (|| {
23        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
24        let this = &*(this as *const D::HTMLTableRowElement);
25        let result: i32 = this.RowIndex();
26
27        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
28        return true;
29    })());
30    result
31}
32
33
34static rowIndex_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
35
36pub(crate) fn init_rowIndex_getterinfo<D: DomTypes>() {
37    rowIndex_getterinfo.set(JSJitInfo {
38    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
39        getter: Some(get_rowIndex::<D>)
40    },
41    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
42        protoID: PrototypeList::ID::HTMLTableRowElement as u16,
43    },
44    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
45    _bitfield_align_1: [],
46    _bitfield_1: __BindgenBitfieldUnit::new(
47        new_jsjitinfo_bitfield_1!(
48            JSJitInfo_OpType::Getter as u8,
49            JSJitInfo_AliasSet::AliasEverything as u8,
50            JSValueType::JSVAL_TYPE_INT32 as u8,
51            true,
52            false,
53            false,
54            false,
55            false,
56            false,
57            0,
58        ).to_ne_bytes()
59    ),
60});
61}
62unsafe extern "C" fn get_sectionRowIndex<D: DomTypes>
63(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
64    let mut result = false;
65    wrap_panic(&mut || result = (|| {
66        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
67        let this = &*(this as *const D::HTMLTableRowElement);
68        let result: i32 = this.SectionRowIndex();
69
70        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
71        return true;
72    })());
73    result
74}
75
76
77static sectionRowIndex_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
78
79pub(crate) fn init_sectionRowIndex_getterinfo<D: DomTypes>() {
80    sectionRowIndex_getterinfo.set(JSJitInfo {
81    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
82        getter: Some(get_sectionRowIndex::<D>)
83    },
84    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
85        protoID: PrototypeList::ID::HTMLTableRowElement as u16,
86    },
87    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
88    _bitfield_align_1: [],
89    _bitfield_1: __BindgenBitfieldUnit::new(
90        new_jsjitinfo_bitfield_1!(
91            JSJitInfo_OpType::Getter as u8,
92            JSJitInfo_AliasSet::AliasEverything as u8,
93            JSValueType::JSVAL_TYPE_INT32 as u8,
94            true,
95            false,
96            false,
97            false,
98            false,
99            false,
100            0,
101        ).to_ne_bytes()
102    ),
103});
104}
105unsafe extern "C" fn get_cells<D: DomTypes>
106(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
107    let mut result = false;
108    wrap_panic(&mut || result = (|| {
109        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
110        let this = &*(this as *const D::HTMLTableRowElement);
111        let result: DomRoot<D::HTMLCollection> = this.Cells();
112
113        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
114        return true;
115    })());
116    result
117}
118
119
120static cells_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
121
122pub(crate) fn init_cells_getterinfo<D: DomTypes>() {
123    cells_getterinfo.set(JSJitInfo {
124    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
125        getter: Some(get_cells::<D>)
126    },
127    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
128        protoID: PrototypeList::ID::HTMLTableRowElement as u16,
129    },
130    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
131    _bitfield_align_1: [],
132    _bitfield_1: __BindgenBitfieldUnit::new(
133        new_jsjitinfo_bitfield_1!(
134            JSJitInfo_OpType::Getter as u8,
135            JSJitInfo_AliasSet::AliasEverything as u8,
136            JSValueType::JSVAL_TYPE_OBJECT as u8,
137            true,
138            false,
139            false,
140            false,
141            false,
142            false,
143            0,
144        ).to_ne_bytes()
145    ),
146});
147}
148unsafe extern "C" fn insertCell<D: DomTypes>
149(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: *const JSJitMethodCallArgs) -> bool{
150    let mut result = false;
151    wrap_panic(&mut || result = (|| {
152        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
153        let this = &*(this as *const D::HTMLTableRowElement);
154        let args = &*args;
155        let argc = args.argc_;
156        let arg0: i32 = if args.get(0).is_undefined() {
157            -1
158        } else {
159            match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), ConversionBehavior::Default) {
160                Ok(ConversionResult::Success(value)) => value,
161                Ok(ConversionResult::Failure(error)) => {
162                    throw_type_error(cx.raw_cx(), &error);
163            return false;
164
165                }
166                _ => {
167                    return false;
168
169                },
170            }
171
172        };
173        let result: Result<DomRoot<D::HTMLElement>, Error> = this.InsertCell(arg0, CanGc::note());
174        let result = match result {
175            Ok(result) => result,
176            Err(e) => {
177                <D as DomHelpers<D>>::throw_dom_exception(SafeJSContext::from_ptr(cx.raw_cx()), &this.global_(InRealm::already(&AlreadyInRealm::assert_for_cx(SafeJSContext::from_ptr(cx.raw_cx())))), e, CanGc::note());
178                return false;
179            },
180        };
181
182        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
183        return true;
184    })());
185    result
186}
187
188
189static insertCell_methodinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
190
191pub(crate) fn init_insertCell_methodinfo<D: DomTypes>() {
192    insertCell_methodinfo.set(JSJitInfo {
193    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
194        method: Some(insertCell::<D>)
195    },
196    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
197        protoID: PrototypeList::ID::HTMLTableRowElement as u16,
198    },
199    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
200    _bitfield_align_1: [],
201    _bitfield_1: __BindgenBitfieldUnit::new(
202        new_jsjitinfo_bitfield_1!(
203            JSJitInfo_OpType::Method as u8,
204            JSJitInfo_AliasSet::AliasEverything as u8,
205            JSValueType::JSVAL_TYPE_OBJECT as u8,
206            false,
207            false,
208            false,
209            false,
210            false,
211            false,
212            0,
213        ).to_ne_bytes()
214    ),
215});
216}
217unsafe extern "C" fn deleteCell<D: DomTypes>
218(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: *const JSJitMethodCallArgs) -> bool{
219    let mut result = false;
220    wrap_panic(&mut || result = (|| {
221        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
222        let this = &*(this as *const D::HTMLTableRowElement);
223        let args = &*args;
224        let argc = args.argc_;
225
226        if argc < 1 {
227            throw_type_error(cx.raw_cx(), "Not enough arguments to \"HTMLTableRowElement.deleteCell\".");
228            return false;
229        }
230        let arg0: i32 = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), ConversionBehavior::Default) {
231            Ok(ConversionResult::Success(value)) => value,
232            Ok(ConversionResult::Failure(error)) => {
233                throw_type_error(cx.raw_cx(), &error);
234        return false;
235
236            }
237            _ => {
238                return false;
239
240            },
241        }
242        ;
243        <D as DomHelpers<D>>::push_new_element_queue();
244
245        let result: Result<(), Error> = this.DeleteCell(arg0);
246        <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
247
248        let result = match result {
249            Ok(result) => result,
250            Err(e) => {
251                <D as DomHelpers<D>>::throw_dom_exception(SafeJSContext::from_ptr(cx.raw_cx()), &this.global_(InRealm::already(&AlreadyInRealm::assert_for_cx(SafeJSContext::from_ptr(cx.raw_cx())))), e, CanGc::note());
252                return false;
253            },
254        };
255
256        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
257        return true;
258    })());
259    result
260}
261
262
263static deleteCell_methodinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
264
265pub(crate) fn init_deleteCell_methodinfo<D: DomTypes>() {
266    deleteCell_methodinfo.set(JSJitInfo {
267    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
268        method: Some(deleteCell::<D>)
269    },
270    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
271        protoID: PrototypeList::ID::HTMLTableRowElement as u16,
272    },
273    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
274    _bitfield_align_1: [],
275    _bitfield_1: __BindgenBitfieldUnit::new(
276        new_jsjitinfo_bitfield_1!(
277            JSJitInfo_OpType::Method as u8,
278            JSJitInfo_AliasSet::AliasEverything as u8,
279            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
280            false,
281            false,
282            false,
283            false,
284            false,
285            false,
286            0,
287        ).to_ne_bytes()
288    ),
289});
290}
291unsafe extern "C" fn get_bgColor<D: DomTypes>
292(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
293    let mut result = false;
294    wrap_panic(&mut || result = (|| {
295        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
296        let this = &*(this as *const D::HTMLTableRowElement);
297        <D as DomHelpers<D>>::push_new_element_queue();
298
299        let result: DOMString = this.BgColor();
300        <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
301
302
303        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
304        return true;
305    })());
306    result
307}
308
309unsafe extern "C" fn set_bgColor<D: DomTypes>
310(cx: *mut RawJSContext, obj: RawHandleObject, this: *mut libc::c_void, args: JSJitSetterCallArgs) -> bool{
311    let mut result = false;
312    wrap_panic(&mut || result = (|| {
313        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
314        let this = &*(this as *const D::HTMLTableRowElement);
315        let arg0: DOMString = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), StringificationBehavior::Empty) {
316            Ok(ConversionResult::Success(value)) => value,
317            Ok(ConversionResult::Failure(error)) => {
318                throw_type_error(cx.raw_cx(), &error);
319        return false;
320
321            }
322            _ => {
323                return false;
324
325            },
326        }
327        ;
328        <D as DomHelpers<D>>::push_new_element_queue();
329
330        let result: () = this.SetBgColor(arg0);
331        <D as DomHelpers<D>>::pop_current_element_queue(CanGc::note());
332
333
334        true
335    })());
336    result
337}
338
339
340static bgColor_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
341
342pub(crate) fn init_bgColor_getterinfo<D: DomTypes>() {
343    bgColor_getterinfo.set(JSJitInfo {
344    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
345        getter: Some(get_bgColor::<D>)
346    },
347    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
348        protoID: PrototypeList::ID::HTMLTableRowElement as u16,
349    },
350    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
351    _bitfield_align_1: [],
352    _bitfield_1: __BindgenBitfieldUnit::new(
353        new_jsjitinfo_bitfield_1!(
354            JSJitInfo_OpType::Getter as u8,
355            JSJitInfo_AliasSet::AliasEverything as u8,
356            JSValueType::JSVAL_TYPE_STRING as u8,
357            true,
358            false,
359            false,
360            false,
361            false,
362            false,
363            0,
364        ).to_ne_bytes()
365    ),
366});
367}
368static bgColor_setterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
369
370pub(crate) fn init_bgColor_setterinfo<D: DomTypes>() {
371    bgColor_setterinfo.set(JSJitInfo {
372    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
373        setter: Some(set_bgColor::<D>)
374    },
375    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
376        protoID: PrototypeList::ID::HTMLTableRowElement as u16,
377    },
378    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 4 },
379    _bitfield_align_1: [],
380    _bitfield_1: __BindgenBitfieldUnit::new(
381        new_jsjitinfo_bitfield_1!(
382            JSJitInfo_OpType::Setter as u8,
383            JSJitInfo_AliasSet::AliasEverything as u8,
384            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
385            false,
386            false,
387            false,
388            false,
389            false,
390            false,
391            0,
392        ).to_ne_bytes()
393    ),
394});
395}
396unsafe extern "C" fn _finalize<D: DomTypes>
397(_cx: *mut GCContext, obj: *mut JSObject){
398    wrap_panic(&mut || {
399
400        let this = native_from_object_static::<D::HTMLTableRowElement>(obj).unwrap();
401        finalize_common(this);
402    })
403}
404
405unsafe extern "C" fn _trace<D: DomTypes>
406(trc: *mut JSTracer, obj: *mut JSObject){
407    wrap_panic(&mut || {
408
409        let this = native_from_object_static::<D::HTMLTableRowElement>(obj).unwrap();
410        if this.is_null() { return; } // GC during obj creation
411        (*this).trace(trc);
412    })
413}
414
415
416static CLASS_OPS: ThreadUnsafeOnceLock<JSClassOps> = ThreadUnsafeOnceLock::new();
417
418pub(crate) fn init_class_ops<D: DomTypes>() {
419    CLASS_OPS.set(JSClassOps {
420        addProperty: None,
421        delProperty: None,
422        enumerate: None,
423        newEnumerate: None,
424        resolve: None,
425        mayResolve: None,
426        finalize: Some(_finalize::<D>),
427        call: None,
428        construct: None,
429        trace: Some(_trace::<D>),
430    });
431}
432
433pub static Class: ThreadUnsafeOnceLock<DOMJSClass> = ThreadUnsafeOnceLock::new();
434
435pub(crate) fn init_domjs_class<D: DomTypes>() {
436    init_class_ops::<D>();
437    Class.set(DOMJSClass {
438        base: JSClass {
439            name: c"HTMLTableRowElement".as_ptr(),
440            flags: JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE |
441                   (((1) & JSCLASS_RESERVED_SLOTS_MASK) << JSCLASS_RESERVED_SLOTS_SHIFT)
442                   /* JSCLASS_HAS_RESERVED_SLOTS(1) */,
443            cOps: unsafe { CLASS_OPS.get() },
444            spec: ptr::null(),
445            ext: ptr::null(),
446            oOps: ptr::null(),
447        },
448        dom_class:
449DOMClass {
450    interface_chain: [ PrototypeList::ID::EventTarget, PrototypeList::ID::Node, PrototypeList::ID::Element, PrototypeList::ID::HTMLElement, PrototypeList::ID::HTMLTableRowElement, PrototypeList::ID::Last ],
451    depth: 4,
452    type_id: crate::codegen::InheritTypes::TopTypeId { eventtarget: (crate::codegen::InheritTypes::EventTargetTypeId::Node(crate::codegen::InheritTypes::NodeTypeId::Element(crate::codegen::InheritTypes::ElementTypeId::HTMLElement(crate::codegen::InheritTypes::HTMLElementTypeId::HTMLTableRowElement)))) },
453    malloc_size_of: malloc_size_of_including_raw_self::<D::HTMLTableRowElement> as unsafe fn(&mut _, _) -> _,
454    global: Globals::EMPTY,
455},
456    });
457}
458
459#[cfg_attr(crown, allow(crown::unrooted_must_root))] pub unsafe fn Wrap<D: DomTypes>
460(cx: SafeJSContext, scope: &D::GlobalScope, given_proto: Option<HandleObject>, object: Box<D::HTMLTableRowElement>, _can_gc: CanGc) -> DomRoot<D::HTMLTableRowElement>{
461
462    let raw = Root::new(MaybeUnreflectedDom::from_box(object));
463
464    let scope = scope.reflector().get_jsobject();
465    assert!(!scope.get().is_null());
466    assert!(((*get_object_class(scope.get())).flags & JSCLASS_IS_GLOBAL) != 0);
467    let _ac = JSAutoRealm::new(cx.raw_cx(), scope.get());
468
469    rooted!(&in(cx) let mut canonical_proto = ptr::null_mut::<JSObject>());
470    GetProtoObject::<D>(cx, scope, canonical_proto.handle_mut());
471    assert!(!canonical_proto.is_null());
472
473
474    rooted!(&in(cx) let mut proto = ptr::null_mut::<JSObject>());
475    if let Some(given) = given_proto {
476        proto.set(*given);
477        if get_context_realm(cx.raw_cx()) != get_object_realm(*given) {
478            assert!(JS_WrapObject(cx.raw_cx(), proto.handle_mut()));
479        }
480    } else {
481        proto.set(*canonical_proto);
482    }
483    rooted!(&in(cx) let obj = JS_NewObjectWithGivenProto(
484        cx.raw_cx(),
485        &Class.get().base,
486        proto.handle(),
487    ));
488    assert!(!obj.is_null());
489    JS_SetReservedSlot(
490        obj.get(),
491        DOM_OBJECT_SLOT,
492        &PrivateValue(raw.as_ptr() as *const libc::c_void),
493    );
494
495    let root = raw.reflect_with(obj.get());
496
497
498
499    DomRoot::from_ref(&*root)
500}
501
502pub trait HTMLTableRowElementMethods<D: DomTypes> {
503    fn RowIndex(&self, ) -> i32;
504    fn SectionRowIndex(&self, ) -> i32;
505    fn Cells(&self, ) -> DomRoot<D::HTMLCollection>;
506    fn InsertCell(&self, r#index: i32, r#_can_gc: CanGc) -> Fallible<DomRoot<D::HTMLElement>>;
507    fn DeleteCell(&self, r#index: i32) -> Fallible<()>;
508    fn BgColor(&self, ) -> DOMString;
509    fn SetBgColor(&self, r#value: DOMString);
510}
511static sMethods_specs: ThreadUnsafeOnceLock<&[&[JSFunctionSpec]]> = ThreadUnsafeOnceLock::new();
512
513pub(crate) fn init_sMethods_specs<D: DomTypes>() {
514    sMethods_specs.set(Box::leak(Box::new([&Box::leak(Box::new([
515    JSFunctionSpec {
516        name: JSPropertySpec_Name { string_: c"insertCell".as_ptr() },
517        call: JSNativeWrapper { op: Some(generic_method::<false>), info: unsafe { insertCell_methodinfo.get() } as *const _ as *const JSJitInfo },
518        nargs: 0,
519        flags: (JSPROP_ENUMERATE) as u16,
520        selfHostedName: ptr::null()
521    },
522    JSFunctionSpec {
523        name: JSPropertySpec_Name { string_: c"deleteCell".as_ptr() },
524        call: JSNativeWrapper { op: Some(generic_method::<false>), info: unsafe { deleteCell_methodinfo.get() } as *const _ as *const JSJitInfo },
525        nargs: 1,
526        flags: (JSPROP_ENUMERATE) as u16,
527        selfHostedName: ptr::null()
528    },
529    JSFunctionSpec {
530        name: JSPropertySpec_Name { string_: ptr::null() },
531        call: JSNativeWrapper { op: None, info: ptr::null() },
532        nargs: 0,
533        flags: 0,
534        selfHostedName: ptr::null()
535    }]))[..]
536])));
537}static sMethods: ThreadUnsafeOnceLock<&[Guard<&[JSFunctionSpec]>]> = ThreadUnsafeOnceLock::new();
538
539pub(crate) fn init_sMethods_prefs<D: DomTypes>() {
540    sMethods.set(Box::leak(Box::new([    Guard::new(&[Condition::Exposed(Globals::WINDOW)], (unsafe { sMethods_specs.get() })[0])])));
541}static sAttributes_specs: ThreadUnsafeOnceLock<&[&[JSPropertySpec]]> = ThreadUnsafeOnceLock::new();
542
543pub(crate) fn init_sAttributes_specs<D: DomTypes>() {
544    sAttributes_specs.set(Box::leak(Box::new([&Box::leak(Box::new([
545    JSPropertySpec {
546                    name: JSPropertySpec_Name { string_: c"rowIndex".as_ptr() },
547                    attributes_: (JSPROP_ENUMERATE),
548                    kind_: (JSPropertySpec_Kind::NativeAccessor),
549                    u: JSPropertySpec_AccessorsOrValue {
550                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
551                            getter: JSPropertySpec_Accessor {
552                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { rowIndex_getterinfo.get() } },
553                            },
554                            setter: JSPropertySpec_Accessor {
555                                native: JSNativeWrapper { op: None, info: ptr::null() },
556                            }
557                        }
558                    }
559                }
560,
561    JSPropertySpec {
562                    name: JSPropertySpec_Name { string_: c"sectionRowIndex".as_ptr() },
563                    attributes_: (JSPROP_ENUMERATE),
564                    kind_: (JSPropertySpec_Kind::NativeAccessor),
565                    u: JSPropertySpec_AccessorsOrValue {
566                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
567                            getter: JSPropertySpec_Accessor {
568                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { sectionRowIndex_getterinfo.get() } },
569                            },
570                            setter: JSPropertySpec_Accessor {
571                                native: JSNativeWrapper { op: None, info: ptr::null() },
572                            }
573                        }
574                    }
575                }
576,
577    JSPropertySpec {
578                    name: JSPropertySpec_Name { string_: c"cells".as_ptr() },
579                    attributes_: (JSPROP_ENUMERATE),
580                    kind_: (JSPropertySpec_Kind::NativeAccessor),
581                    u: JSPropertySpec_AccessorsOrValue {
582                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
583                            getter: JSPropertySpec_Accessor {
584                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { cells_getterinfo.get() } },
585                            },
586                            setter: JSPropertySpec_Accessor {
587                                native: JSNativeWrapper { op: None, info: ptr::null() },
588                            }
589                        }
590                    }
591                }
592,
593    JSPropertySpec {
594                    name: JSPropertySpec_Name { string_: c"bgColor".as_ptr() },
595                    attributes_: (JSPROP_ENUMERATE),
596                    kind_: (JSPropertySpec_Kind::NativeAccessor),
597                    u: JSPropertySpec_AccessorsOrValue {
598                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
599                            getter: JSPropertySpec_Accessor {
600                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { bgColor_getterinfo.get() } },
601                            },
602                            setter: JSPropertySpec_Accessor {
603                                native: JSNativeWrapper { op: Some(generic_setter), info: unsafe { bgColor_setterinfo.get() } },
604                            }
605                        }
606                    }
607                }
608,
609    JSPropertySpec::ZERO]))[..]
610,
611&Box::leak(Box::new([
612    JSPropertySpec {
613                    name: JSPropertySpec_Name { symbol_: SymbolCode::toStringTag as usize + 1 },
614                    attributes_: (JSPROP_READONLY),
615                    kind_: (JSPropertySpec_Kind::Value),
616                    u: JSPropertySpec_AccessorsOrValue {
617                        value: JSPropertySpec_ValueWrapper {
618                            type_: JSPropertySpec_ValueWrapper_Type::String,
619                            __bindgen_anon_1: JSPropertySpec_ValueWrapper__bindgen_ty_1 {
620                                string: c"HTMLTableRowElement".as_ptr(),
621                            }
622                        }
623                    }
624                }
625,
626    JSPropertySpec::ZERO]))[..]
627])));
628}static sAttributes: ThreadUnsafeOnceLock<&[Guard<&[JSPropertySpec]>]> = ThreadUnsafeOnceLock::new();
629
630pub(crate) fn init_sAttributes_prefs<D: DomTypes>() {
631    sAttributes.set(Box::leak(Box::new([    Guard::new(&[Condition::Exposed(Globals::WINDOW)], (unsafe { sAttributes_specs.get() })[0]),
632    Guard::new(&[Condition::Satisfied], (unsafe { sAttributes_specs.get() })[1])])));
633}
634pub fn GetProtoObject<D: DomTypes>
635(cx: SafeJSContext, global: HandleObject, mut rval: MutableHandleObject){
636    /* Get the interface prototype object for this class.  This will create the
637       object as needed. */get_per_interface_object_handle(cx, global, ProtoOrIfaceIndex::ID(PrototypeList::ID::HTMLTableRowElement), CreateInterfaceObjects::<D>, rval)
638}
639
640
641static PrototypeClass: JSClass = JSClass {
642    name: c"HTMLTableRowElementPrototype".as_ptr(),
643    flags:
644        // JSCLASS_HAS_RESERVED_SLOTS()
645        (0 ) << JSCLASS_RESERVED_SLOTS_SHIFT,
646    cOps: ptr::null(),
647    spec: ptr::null(),
648    ext: ptr::null(),
649    oOps: ptr::null(),
650};
651
652unsafe extern "C" fn _constructor<D: DomTypes>
653(cx: *mut RawJSContext, argc: u32, vp: *mut JSVal) -> bool{
654    let mut result = false;
655    wrap_panic(&mut || result = {
656        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
657        let args = CallArgs::from_vp(vp, argc);
658        let global = D::GlobalScope::from_object(JS_CALLEE(cx.raw_cx(), vp).to_object());
659
660                        <D as DomHelpers<D>>::call_html_constructor::<D::HTMLTableRowElement>(
661                            SafeJSContext::from_ptr(cx.raw_cx()),
662                            &args,
663                            &global,
664                            PrototypeList::ID::HTMLTableRowElement,
665                            CreateInterfaceObjects::<D>,
666                            CanGc::note()
667                        )
668
669    });
670    result
671}
672
673
674static INTERFACE_OBJECT_CLASS: ThreadUnsafeOnceLock<NonCallbackInterfaceObjectClass> = ThreadUnsafeOnceLock::new();
675
676pub(crate) fn init_interface_object<D: DomTypes>() {
677    INTERFACE_OBJECT_CLASS.set(NonCallbackInterfaceObjectClass::new(
678        Box::leak(Box::new(InterfaceConstructorBehavior::call(_constructor::<D>))),
679        b"function HTMLTableRowElement() {\n    [native code]\n}",
680        PrototypeList::ID::HTMLTableRowElement,
681        4,
682    ));
683}
684
685pub fn GetConstructorObject<D: DomTypes>
686(cx: SafeJSContext, global: HandleObject, mut rval: MutableHandleObject){
687    /* Get the interface object for this class.  This will create the object as
688       needed. */get_per_interface_object_handle(cx, global, ProtoOrIfaceIndex::Constructor(PrototypeList::Constructor::HTMLTableRowElement), CreateInterfaceObjects::<D>, rval)
689}
690
691pub fn DefineDOMInterface<D: DomTypes>
692(cx: SafeJSContext, global: HandleObject){
693    define_dom_interface(cx, global, ProtoOrIfaceIndex::ID(PrototypeList::ID::HTMLTableRowElement),CreateInterfaceObjects::<D>, ConstructorEnabled::<D>)
694}
695
696pub fn ConstructorEnabled<D: DomTypes>
697(aCx: SafeJSContext, aObj: HandleObject) -> bool{
698    is_exposed_in(aObj, Globals::WINDOW)
699}
700
701unsafe fn CreateInterfaceObjects<D: DomTypes>
702(cx: SafeJSContext, global: HandleObject, cache: *mut ProtoOrIfaceArray){
703
704    rooted!(&in(cx) let mut prototype_proto = ptr::null_mut::<JSObject>());
705    HTMLElement_Binding::GetProtoObject::<D>(cx, global, prototype_proto.handle_mut());
706    assert!(!prototype_proto.is_null());
707
708    rooted!(&in(cx) let mut prototype = ptr::null_mut::<JSObject>());
709    create_interface_prototype_object::<D>(cx,
710                                      global,
711                                      prototype_proto.handle(),
712                                      &PrototypeClass,
713                                      sMethods.get(),
714                                      sAttributes.get(),
715                                      &[],
716                                      &[],
717                                      prototype.handle_mut());
718    assert!(!prototype.is_null());
719    assert!((*cache)[PrototypeList::ID::HTMLTableRowElement as usize].is_null());
720    (*cache)[PrototypeList::ID::HTMLTableRowElement as usize] = prototype.get();
721    <*mut JSObject>::post_barrier((*cache).as_mut_ptr().offset(PrototypeList::ID::HTMLTableRowElement as isize),
722                                  ptr::null_mut(),
723                                  prototype.get());
724
725    rooted!(&in(cx) let mut interface_proto = ptr::null_mut::<JSObject>());
726
727    HTMLElement_Binding::GetConstructorObject::<D>(cx, global, interface_proto.handle_mut());
728
729    assert!(!interface_proto.is_null());
730
731    rooted!(&in(cx) let mut interface = ptr::null_mut::<JSObject>());
732    create_noncallback_interface_object::<D>(cx,
733                                        global,
734                                        interface_proto.handle(),
735                                        INTERFACE_OBJECT_CLASS.get(),
736                                        &[],
737                                        &[],
738                                        &[],
739                                        prototype.handle(),
740                                        c"HTMLTableRowElement",
741                                        0,
742                                        &[],
743                                        interface.handle_mut());
744    assert!(!interface.is_null());
745
746    assert!((*cache)[PrototypeList::Constructor::HTMLTableRowElement as usize].is_null());
747    (*cache)[PrototypeList::Constructor::HTMLTableRowElement as usize] = interface.get();
748    <*mut JSObject>::post_barrier((*cache).as_mut_ptr().offset(PrototypeList::Constructor::HTMLTableRowElement as isize),
749                                  ptr::null_mut(),
750                                  interface.get());
751
752}
753
754
755        pub(crate) fn init_statics<D: DomTypes>() {
756            init_interface_object::<D>();
757            init_domjs_class::<D>();
758            crate::codegen::GenericBindings::HTMLTableRowElementBinding::HTMLTableRowElement_Binding::init_insertCell_methodinfo::<D>();
759crate::codegen::GenericBindings::HTMLTableRowElementBinding::HTMLTableRowElement_Binding::init_deleteCell_methodinfo::<D>();
760            init_rowIndex_getterinfo::<D>();
761init_sectionRowIndex_getterinfo::<D>();
762init_cells_getterinfo::<D>();
763init_bgColor_getterinfo::<D>();
764            init_bgColor_setterinfo::<D>();
765
766            init_sMethods_specs::<D>();
767init_sMethods_prefs::<D>();
768init_sAttributes_specs::<D>();
769init_sAttributes_prefs::<D>();
770        }
771        } // mod HTMLTableRowElement_Binding
772
773