auto merge of #1811 : Ms2ger/servo/Wrap_, r=jdm

This commit is contained in:
bors-servo 2014-03-05 09:31:44 -05:00
commit da6a571f9e
28 changed files with 65 additions and 72 deletions

View file

@ -87,10 +87,10 @@ impl Document {
pub fn reflect_document<D: Reflectable+DocumentBase>
(document: ~D,
window: &JS<Window>,
wrap_fn: extern "Rust" fn(*JSContext, *JSObject, ~D) -> *JSObject)
wrap_fn: extern "Rust" fn(*JSContext, &JS<Window>, ~D) -> *JSObject)
-> JS<D> {
assert!(document.reflector().get_jsobject().is_null());
let raw_doc = reflect_dom_object(document, window.get(), wrap_fn);
let raw_doc = reflect_dom_object(document, window, wrap_fn);
assert!(raw_doc.reflector().get_jsobject().is_not_null());
let document = DocumentCast::from(&raw_doc);