Update js.

This commit is contained in:
Ms2ger 2016-11-02 13:25:49 +01:00
parent ba2fb4e2e2
commit 558afe1786
8 changed files with 14 additions and 14 deletions

View file

@ -310,9 +310,9 @@ impl ToJSValConvertible for Reflector {
assert!(!obj.is_null());
let same_compartment = IsObjectInContextCompartment(obj, cx);
if same_compartment {
rval.set(ObjectValue(&*ToWindowProxyIfWindow(obj)));
rval.set(ObjectValue(ToWindowProxyIfWindow(obj)));
} else {
rval.set(ObjectValue(&*obj));
rval.set(ObjectValue(obj));
if !JS_WrapValue(cx, rval) {
panic!("JS_WrapValue failed.");