aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/bindings/utils.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2014-05-08 23:40:15 +0200
committerJack Moffitt <jack@metajack.im>2014-05-22 16:36:40 -0600
commiteaedeb07cb0c4fdda37f35057588e4a769fbe758 (patch)
treecdeb134482f06818f7d6dbad8e008882fcc336a5 /src/components/script/dom/bindings/utils.rs
parent3644d0272c89336954358eb5005f884a9c89e8bc (diff)
downloadservo-eaedeb07cb0c4fdda37f35057588e4a769fbe758.tar.gz
servo-eaedeb07cb0c4fdda37f35057588e4a769fbe758.zip
Update Rust.
Diffstat (limited to 'src/components/script/dom/bindings/utils.rs')
-rw-r--r--src/components/script/dom/bindings/utils.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/script/dom/bindings/utils.rs b/src/components/script/dom/bindings/utils.rs
index 7c742efcbb2..b263f8a46d6 100644
--- a/src/components/script/dom/bindings/utils.rs
+++ b/src/components/script/dom/bindings/utils.rs
@@ -140,7 +140,7 @@ pub fn unwrap_jsmanaged<T: Reflectable>(mut obj: *JSObject,
}
}
-pub unsafe fn squirrel_away_unique<T>(x: ~T) -> *T {
+pub unsafe fn squirrel_away_unique<T>(x: Box<T>) -> *T {
cast::transmute(x)
}
@@ -375,7 +375,7 @@ pub extern fn ThrowingConstructor(_cx: *JSContext, _argc: c_uint, _vp: *mut JSVa
}
pub fn initialize_global(global: *JSObject) {
- let protoArray = ~([0 as *JSObject, ..PrototypeList::id::IDCount as uint]);
+ let protoArray = box () ([0 as *JSObject, ..PrototypeList::id::IDCount as uint]);
unsafe {
let box_ = squirrel_away_unique(protoArray);
JS_SetReservedSlot(global,
@@ -390,9 +390,9 @@ pub trait Reflectable {
}
pub fn reflect_dom_object<T: Reflectable>
- (obj: ~T,
+ (obj: Box<T>,
window: &JSRef<window::Window>,
- wrap_fn: extern "Rust" fn(*JSContext, &JSRef<window::Window>, ~T) -> JS<T>)
+ wrap_fn: extern "Rust" fn(*JSContext, &JSRef<window::Window>, Box<T>) -> JS<T>)
-> Temporary<T> {
Temporary::new(wrap_fn(window.deref().get_cx(), window, obj))
}