aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/bindings/js.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2014-03-04 15:08:44 +0100
committerMs2ger <ms2ger@gmail.com>2014-03-04 15:08:44 +0100
commit787108deaf83cd7bd3e26e4c3aee11469c21c4c8 (patch)
tree30c03d8afd6b6a05100da363f1e75cc98b5b921e /src/components/script/dom/bindings/js.rs
parent23b7277b5465d8dbf9cdf94f672688e7af9b89ab (diff)
downloadservo-787108deaf83cd7bd3e26e4c3aee11469c21c4c8.tar.gz
servo-787108deaf83cd7bd3e26e4c3aee11469c21c4c8.zip
Pass &JS<Window> to the Wrap functions in codegen.
Diffstat (limited to 'src/components/script/dom/bindings/js.rs')
-rw-r--r--src/components/script/dom/bindings/js.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/components/script/dom/bindings/js.rs b/src/components/script/dom/bindings/js.rs
index 29efaddd840..9f8e44ba06f 100644
--- a/src/components/script/dom/bindings/js.rs
+++ b/src/components/script/dom/bindings/js.rs
@@ -32,11 +32,10 @@ impl <T> Clone for JS<T> {
impl<T: Reflectable> JS<T> {
pub fn new(mut obj: ~T,
window: &JS<Window>,
- wrap_fn: extern "Rust" fn(*JSContext, *JSObject, ~T) -> *JSObject) -> JS<T> {
+ wrap_fn: extern "Rust" fn(*JSContext, &JS<Window>, ~T) -> *JSObject) -> JS<T> {
let cx = window.get().get_cx();
- let scope = window.get().reflector().get_jsobject();
let raw: *mut T = &mut *obj;
- if wrap_fn(cx, scope, obj).is_null() {
+ if wrap_fn(cx, window, obj).is_null() {
fail!("Could not eagerly wrap object");
}
JS {