Remove DerivedWrapper::wrap_shared, as it's unused.

This commit is contained in:
Ms2ger 2013-10-18 15:56:35 +02:00
parent 38cea1b2d5
commit 3da1a206d8
9 changed files with 0 additions and 96 deletions

View file

@ -8,7 +8,6 @@ use dom::bindings::utils::{BindingObject, DerivedWrapper};
use dom::domparser::DOMParser;
use js::jsapi::{JSContext, JSObject, JSVal};
use js::glue::{RUST_OBJECT_TO_JSVAL};
impl Reflectable for DOMParser {
fn reflector<'a>(&'a self) -> &'a Reflector {
@ -34,15 +33,4 @@ impl DerivedWrapper for DOMParser {
fn wrap(&mut self, _cx: *JSContext, _scope: *JSObject, _vp: *mut JSVal) -> i32 {
fail!(~"nyi")
}
#[fixed_stack_segment]
fn wrap_shared(@mut self, cx: *JSContext, scope: *JSObject, vp: *mut JSVal) -> i32 {
let obj = self.wrap_object_shared(cx, scope);
if obj.is_null() {
return 0;
} else {
unsafe { *vp = RUST_OBJECT_TO_JSVAL(obj) };
return 1;
}
}
}

View file

@ -738,7 +738,6 @@ pub fn InitIds(cx: *JSContext, specs: &[JSPropertySpec], ids: &mut [jsid]) -> bo
pub trait DerivedWrapper {
fn wrap(&mut self, cx: *JSContext, scope: *JSObject, vp: *mut JSVal) -> i32;
fn wrap_shared(@mut self, cx: *JSContext, scope: *JSObject, vp: *mut JSVal) -> i32;
}
impl DerivedWrapper for AbstractNode<ScriptView> {
@ -752,10 +751,6 @@ impl DerivedWrapper for AbstractNode<ScriptView> {
unsafe { *vp = RUST_OBJECT_TO_JSVAL(node::create(cx, self)) };
return 1;
}
fn wrap_shared(@mut self, _cx: *JSContext, _scope: *JSObject, _vp: *mut JSVal) -> i32 {
fail!(~"nyi")
}
}
#[deriving(ToStr)]

View file

@ -7,7 +7,6 @@ use dom::bindings::codegen::ClientRectBinding;
use script_task::page_from_context;
use js::jsapi::{JSObject, JSContext, JSVal};
use js::glue::RUST_OBJECT_TO_JSVAL;
pub struct ClientRect {
reflector_: Reflector,
@ -86,15 +85,4 @@ impl DerivedWrapper for ClientRect {
fn wrap(&mut self, _cx: *JSContext, _scope: *JSObject, _vp: *mut JSVal) -> i32 {
fail!(~"nyi")
}
#[fixed_stack_segment]
fn wrap_shared(@mut self, cx: *JSContext, scope: *JSObject, vp: *mut JSVal) -> i32 {
let obj = self.wrap_object_shared(cx, scope);
if obj.is_null() {
return 0;
} else {
unsafe { *vp = RUST_OBJECT_TO_JSVAL(obj) };
return 1;
}
}
}

View file

@ -192,10 +192,6 @@ impl DerivedWrapper for AbstractDocument {
unsafe { *vp = RUST_OBJECT_TO_JSVAL(self.reflector().get_jsobject()) };
return 1;
}
fn wrap_shared(@mut self, _cx: *JSContext, _scope: *JSObject, _vp: *mut JSVal) -> i32 {
fail!(~"nyi")
}
}

View file

@ -9,7 +9,6 @@ use dom::bindings::utils::{Reflectable, BindingObject, DerivedWrapper};
use dom::bindings::utils::{DOMString, ErrorResult, Fallible, Reflector};
use geom::point::Point2D;
use js::glue::RUST_OBJECT_TO_JSVAL;
use js::jsapi::{JSObject, JSContext, JSVal};
use script_task::page_from_context;
@ -137,15 +136,4 @@ impl DerivedWrapper for Event {
fn wrap(&mut self, _cx: *JSContext, _scope: *JSObject, _vp: *mut JSVal) -> i32 {
fail!(~"nyi")
}
#[fixed_stack_segment]
fn wrap_shared(@mut self, cx: *JSContext, scope: *JSObject, vp: *mut JSVal) -> i32 {
let obj = self.wrap_object_shared(cx, scope);
if obj.is_null() {
return 0;
} else {
unsafe { *vp = RUST_OBJECT_TO_JSVAL(obj) };
return 1;
}
}
}

View file

@ -6,7 +6,6 @@ use dom::bindings::codegen::EventTargetBinding;
use dom::bindings::utils::{Reflectable, Reflector, BindingObject, DerivedWrapper};
use script_task::page_from_context;
use js::glue::RUST_OBJECT_TO_JSVAL;
use js::jsapi::{JSObject, JSContext, JSVal};
pub struct EventTarget {
@ -53,17 +52,4 @@ impl DerivedWrapper for EventTarget {
fn wrap(&mut self, _cx: *JSContext, _scope: *JSObject, _vp: *mut JSVal) -> i32 {
fail!(~"nyi")
}
#[fixed_stack_segment]
fn wrap_shared(@mut self, cx: *JSContext, scope: *JSObject, vp: *mut JSVal) -> i32 {
let obj = self.wrap_object_shared(cx, scope);
if obj.is_null() {
return 0;
} else {
unsafe {
*vp = RUST_OBJECT_TO_JSVAL(obj)
};
return 1;
}
}
}

View file

@ -9,7 +9,6 @@ use dom::blob::Blob;
use script_task::{page_from_context};
use js::jsapi::{JSObject, JSContext, JSVal};
use js::glue::RUST_OBJECT_TO_JSVAL;
use std::hashmap::HashMap;
@ -75,15 +74,4 @@ impl DerivedWrapper for FormData {
fn wrap(&mut self, _cx: *JSContext, _scope: *JSObject, _vp: *mut JSVal) -> i32 {
fail!(~"nyi")
}
#[fixed_stack_segment]
fn wrap_shared(@mut self, cx: *JSContext, scope: *JSObject, vp: *mut JSVal) -> i32 {
let obj = self.wrap_object_shared(cx, scope);
if obj.is_null() {
return 0;
} else {
unsafe { *vp = RUST_OBJECT_TO_JSVAL(obj) };
return 1;
}
}
}

View file

@ -10,7 +10,6 @@ use dom::uievent::UIEvent;
use dom::window::Window;
use dom::windowproxy::WindowProxy;
use js::glue::RUST_OBJECT_TO_JSVAL;
use js::jsapi::{JSObject, JSContext, JSVal};
pub struct MouseEvent {
@ -166,16 +165,4 @@ impl DerivedWrapper for MouseEvent {
fn wrap(&mut self, _cx: *JSContext, _scope: *JSObject, _vp: *mut JSVal) -> i32 {
fail!(~"nyi")
}
#[fixed_stack_segment]
fn wrap_shared(@mut self, cx: *JSContext, scope: *JSObject, vp: *mut JSVal) -> i32 {
let obj = self.wrap_object_shared(cx, scope);
if obj.is_null() {
return 0;
} else {
unsafe { *vp = RUST_OBJECT_TO_JSVAL(obj) };
return 1;
}
}
}

View file

@ -10,7 +10,6 @@ use dom::event::Event;
use dom::window::Window;
use dom::windowproxy::WindowProxy;
use js::glue::RUST_OBJECT_TO_JSVAL;
use js::jsapi::{JSObject, JSContext, JSVal};
pub struct UIEvent {
@ -139,15 +138,4 @@ impl DerivedWrapper for UIEvent {
fn wrap(&mut self, _cx: *JSContext, _scope: *JSObject, _vp: *mut JSVal) -> i32 {
fail!(~"nyi")
}
#[fixed_stack_segment]
fn wrap_shared(@mut self, cx: *JSContext, scope: *JSObject, vp: *mut JSVal) -> i32 {
let obj = self.wrap_object_shared(cx, scope);
if obj.is_null() {
return 0;
} else {
unsafe { *vp = RUST_OBJECT_TO_JSVAL(obj) };
return 1;
}
}
}