mirror of
https://github.com/servo/servo.git
synced 2025-06-21 15:49:04 +01:00
Replace GetReflector by an implementation of ToJSValConvertible.
This commit is contained in:
parent
d004e43331
commit
256a5cbf9f
3 changed files with 20 additions and 48 deletions
|
@ -21,7 +21,7 @@ use std::unstable::raw::Box;
|
|||
use js::glue::*;
|
||||
use js::glue::{js_IsObjectProxyClass, js_IsFunctionProxyClass, IsProxyHandlerFamily};
|
||||
use js::jsapi::{JS_AlreadyHasOwnProperty, JS_NewFunction};
|
||||
use js::jsapi::{JS_DefineProperties, JS_WrapValue, JS_ForwardGetPropertyTo};
|
||||
use js::jsapi::{JS_DefineProperties, JS_ForwardGetPropertyTo};
|
||||
use js::jsapi::{JS_GetClass, JS_LinkConstructorAndPrototype, JS_GetStringCharsAndLength};
|
||||
use js::jsapi::{JS_ObjectIsRegExp, JS_ObjectIsDate};
|
||||
use js::jsapi::{JS_InternString, JS_GetFunctionObject};
|
||||
|
@ -460,16 +460,6 @@ impl Reflector {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn GetReflector(cx: *JSContext, reflector: &Reflector,
|
||||
vp: *mut JSVal) -> JSBool {
|
||||
let obj = reflector.get_jsobject();
|
||||
assert!(obj.is_not_null());
|
||||
unsafe {
|
||||
*vp = ObjectValue(&*obj);
|
||||
return JS_WrapValue(cx, cast::transmute(vp));
|
||||
}
|
||||
}
|
||||
|
||||
pub fn GetPropertyOnPrototype(cx: *JSContext, proxy: *JSObject, id: jsid, found: *mut bool,
|
||||
vp: *JSVal) -> bool {
|
||||
unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue