mirror of
https://github.com/servo/servo.git
synced 2025-06-24 17:14:33 +01:00
Use FooValue() functions.
This commit is contained in:
parent
9fbfb1909c
commit
84b0f45ed5
9 changed files with 72 additions and 87 deletions
|
@ -22,7 +22,8 @@ use servo_util::task::{spawn_named};
|
|||
use js::glue::*;
|
||||
use js::jsapi::{JSObject, JSContext, JS_DefineProperty};
|
||||
use js::jsval::JSVal;
|
||||
use js::{JSVAL_NULL, JSPROP_ENUMERATE};
|
||||
use js::jsval::{NullValue, ObjectValue};
|
||||
use js::JSPROP_ENUMERATE;
|
||||
|
||||
use std::cast;
|
||||
use std::comm::SharedChan;
|
||||
|
@ -209,7 +210,7 @@ impl Window {
|
|||
}
|
||||
|
||||
pub fn ShowModalDialog(&self, _cx: *JSContext, _url: DOMString, _argument: Option<JSVal>) -> JSVal {
|
||||
JSVAL_NULL
|
||||
NullValue()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -318,7 +319,7 @@ impl Window {
|
|||
for str in fn_names.iter() {
|
||||
(*str).to_c_str().with_ref(|name| {
|
||||
JS_DefineProperty(cx, global, name,
|
||||
RUST_OBJECT_TO_JSVAL(global),
|
||||
ObjectValue(&*global),
|
||||
Some(cast::transmute(GetJSClassHookStubPointer(PROPERTY_STUB))),
|
||||
Some(cast::transmute(GetJSClassHookStubPointer(STRICT_PROPERTY_STUB))),
|
||||
JSPROP_ENUMERATE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue