aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script/dom/window.rs')
-rw-r--r--src/components/script/dom/window.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/components/script/dom/window.rs b/src/components/script/dom/window.rs
index 0382e03b9fb..7c3d2e90280 100644
--- a/src/components/script/dom/window.rs
+++ b/src/components/script/dom/window.rs
@@ -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);