Use the conversion traits from js.

This commit is contained in:
Ms2ger 2015-11-09 16:55:58 +01:00
parent acb24e80b8
commit 6d2ae85c1f
15 changed files with 285 additions and 647 deletions

View file

@ -574,8 +574,9 @@ impl WindowMethods for Window {
breakpoint();
}
#[allow(unsafe_code)]
fn WebdriverCallback(&self, cx: *mut JSContext, val: HandleValue) {
let rv = jsval_to_webdriver(cx, val);
let rv = unsafe { jsval_to_webdriver(cx, val) };
let opt_chan = self.webdriver_script_chan.borrow_mut().take();
if let Some(chan) = opt_chan {
chan.send(rv).unwrap();