Skip to content

Commit

Permalink
Fix compartment mismatch issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrewster committed Aug 9, 2017
1 parent 37cbc85 commit 1a9f4ca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/script/dom/bindings/codegen/CodegenRust.py
Expand Up @@ -5377,7 +5377,12 @@ def definition_body(self):
},
};
JS_SetPrototype(cx, result.reflector().get_jsobject(), prototype.handle());
rooted!(in(cx) let mut element = result.reflector().get_jsobject().get());
if !JS_WrapObject(cx, element.handle_mut()) {
return false;
}
JS_SetPrototype(cx, element.handle(), prototype.handle());
(result).to_jsval(cx, args.rval());
return true;
Expand Down

0 comments on commit 1a9f4ca

Please sign in to comment.