Use the JSVal member functions to replace JSVAL_IS_* and JSVAL_TO_*.

This commit is contained in:
Ms2ger 2014-03-09 11:29:23 +01:00
parent 84b0f45ed5
commit 9709dce07a
7 changed files with 32 additions and 57 deletions

View file

@ -33,7 +33,6 @@ use extra::url::Url;
use geom::point::Point2D;
use geom::size::Size2D;
use js::global::DEBUG_FNS;
use js::glue::RUST_JSVAL_TO_OBJECT;
use js::jsapi::{JSObject, JS_InhibitGC, JS_AllowGC, JS_CallFunctionValue};
use js::jsval::NullValue;
use js::rust::{Compartment, Cx, CxUtils, RtUtils};
@ -651,9 +650,7 @@ impl ScriptTask {
window.get_mut().active_timers.remove(&TimerHandle { handle: timer_data.handle, cancel_chan: None });
let js_info = page.js_info();
let this_value = if timer_data.args.len() > 0 {
unsafe {
RUST_JSVAL_TO_OBJECT(timer_data.args[0])
}
fail!("NYI")
} else {
js_info.get().get_ref().js_compartment.borrow().global_obj.borrow().ptr
};