mirror of
https://github.com/servo/servo.git
synced 2025-06-20 07:08:59 +01:00
Remove DerivedWrapper.
This commit is contained in:
parent
4074412107
commit
ccd9306681
4 changed files with 6 additions and 57 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue