Remove DerivedWrapper.

This commit is contained in:
Ms2ger 2013-11-03 12:19:31 +01:00
parent 4074412107
commit ccd9306681
4 changed files with 6 additions and 57 deletions

View file

@ -4,7 +4,6 @@
use dom::bindings::codegen::PrototypeList;
use dom::bindings::codegen::PrototypeList::MAX_PROTO_CHAIN_LENGTH;
use dom::node::{AbstractNode, ScriptView};
use dom::window;
use std::libc::c_uint;
@ -730,20 +729,6 @@ pub fn InitIds(cx: *JSContext, specs: &[JSPropertySpec], ids: &mut [jsid]) -> bo
true
}
pub trait DerivedWrapper {
fn wrap(&mut self, cx: *JSContext, scope: *JSObject, vp: *mut JSVal) -> i32;
}
impl DerivedWrapper for AbstractNode<ScriptView> {
#[fixed_stack_segment]
fn wrap(&mut self, _cx: *JSContext, _scope: *JSObject, vp: *mut JSVal) -> i32 {
let obj = self.reflector().get_jsobject();
assert!(obj.is_not_null());
unsafe { *vp = RUST_OBJECT_TO_JSVAL(obj) };
return true as i32;
}
}
#[deriving(ToStr)]
pub enum Error {
FailureUnknown,