Pass &JS<Window> to the Wrap functions in codegen.

This commit is contained in:
Ms2ger 2014-03-04 15:08:44 +01:00
parent 23b7277b54
commit 787108deaf
5 changed files with 12 additions and 12 deletions

View file

@ -494,7 +494,7 @@ pub trait Reflectable {
pub fn reflect_dom_object<T: Reflectable>
(obj: ~T,
window: &JS<window::Window>,
wrap_fn: extern "Rust" fn(*JSContext, *JSObject, ~T) -> *JSObject)
wrap_fn: extern "Rust" fn(*JSContext, &JS<window::Window>, ~T) -> *JSObject)
-> JS<T> {
JS::new(obj, window, wrap_fn)
}