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

@ -754,7 +754,7 @@ impl Node {
pub fn reflect_node<N: Reflectable+NodeBase>
(node: ~N,
document: &JS<Document>,
wrap_fn: extern "Rust" fn(*JSContext, *JSObject, ~N) -> *JSObject)
wrap_fn: extern "Rust" fn(*JSContext, &JS<Window>, ~N) -> *JSObject)
-> JS<N> {
assert!(node.reflector().get_jsobject().is_null());
let node = reflect_dom_object(node, &document.get().window, wrap_fn);