diff options
author | Ms2ger <ms2ger@gmail.com> | 2014-03-04 15:08:44 +0100 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2014-03-04 15:08:44 +0100 |
commit | 787108deaf83cd7bd3e26e4c3aee11469c21c4c8 (patch) | |
tree | 30c03d8afd6b6a05100da363f1e75cc98b5b921e /src/components/script/dom/bindings/js.rs | |
parent | 23b7277b5465d8dbf9cdf94f672688e7af9b89ab (diff) | |
download | servo-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.rs | 5 |
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 { |