diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2015-11-30 19:27:57 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2015-11-30 19:27:57 +0530 |
commit | 29c42a9f78a20ddeb5aa89b79d578a039c087967 (patch) | |
tree | 2e1ad2648d9dfff8a78b5d750f05393b8e603a01 /components/script/dom/bindings/utils.rs | |
parent | a27a15f94bc26fdc62d6faee591dfbd81838acfc (diff) | |
parent | 7547bcac2494980c2a577ebf12c7870621cc4da9 (diff) | |
download | servo-29c42a9f78a20ddeb5aa89b79d578a039c087967.tar.gz servo-29c42a9f78a20ddeb5aa89b79d578a039c087967.zip |
Auto merge of #8751 - nox:rm-prototype-slot, r=Ms2ger
Remove unused slot in prototype object (fixes #8588)
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8751)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/utils.rs')
-rw-r--r-- | components/script/dom/bindings/utils.rs | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/components/script/dom/bindings/utils.rs b/components/script/dom/bindings/utils.rs index 775df6a45aa..97d5bb12eba 100644 --- a/components/script/dom/bindings/utils.rs +++ b/components/script/dom/bindings/utils.rs @@ -78,11 +78,6 @@ impl GlobalStaticData { } } -// NOTE: This is baked into the Ion JIT as 0 in codegen for LGetDOMProperty and -// LSetDOMProperty. Those constants need to be changed accordingly if this value -// changes. -const DOM_PROTO_INSTANCE_CLASS_SLOT: u32 = 0; - /// The index of the slot that contains a reference to the ProtoOrIfaceArray. // All DOM globals must have a slot at DOM_PROTOTYPE_SLOT. pub const DOM_PROTOTYPE_SLOT: u32 = js::JSCLASS_GLOBAL_SLOT_COUNT; @@ -210,25 +205,11 @@ pub fn do_create_interface_objects(cx: *mut JSContext, proto_class: Option<&'static JSClass>, constructor: Option<(NonNullJSNative, &'static str, u32)>, named_constructors: &[(NonNullJSNative, &'static str, u32)], - dom_class: Option<&'static DOMClass>, members: &'static NativeProperties, rval: MutableHandleObject) { assert!(rval.get().is_null()); if let Some(proto_class) = proto_class { create_interface_prototype_object(cx, proto_proto, proto_class, members, rval); - - if !rval.get().is_null() { - let dom_class_ptr = match dom_class { - Some(dom_class) => dom_class as *const DOMClass as *const libc::c_void, - None => ptr::null() as *const libc::c_void, - }; - - unsafe { - JS_SetReservedSlot(rval.get(), - DOM_PROTO_INSTANCE_CLASS_SLOT, - PrivateValue(dom_class_ptr)); - } - } } if let Some((native, name, nargs)) = constructor { |