mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Use the JSVal member functions to replace JSVAL_IS_* and JSVAL_TO_*.
This commit is contained in:
parent
84b0f45ed5
commit
9709dce07a
7 changed files with 32 additions and 57 deletions
|
@ -6,7 +6,7 @@ use dom::bindings::utils::Reflectable;
|
|||
use js::jsapi::{JSContext, JSObject, JS_WrapObject, JS_ObjectIsCallable};
|
||||
use js::jsapi::{JS_GetProperty, JSTracer, JS_CallTracer};
|
||||
use js::jsval::JSVal;
|
||||
use js::{JSVAL_IS_OBJECT, JSVAL_TO_OBJECT, JSTRACE_OBJECT};
|
||||
use js::JSTRACE_OBJECT;
|
||||
|
||||
use std::cast;
|
||||
use std::libc;
|
||||
|
@ -67,8 +67,8 @@ impl CallbackInterface {
|
|||
return false;
|
||||
}
|
||||
|
||||
if !JSVAL_IS_OBJECT(*callable) ||
|
||||
JS_ObjectIsCallable(cx, JSVAL_TO_OBJECT(*callable)) == 0 {
|
||||
if !callable.is_object() ||
|
||||
JS_ObjectIsCallable(cx, callable.to_object()) == 0 {
|
||||
//ThrowErrorMessage(cx, MSG_NOT_CALLABLE, description.get());
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue