mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix compartment mismatch issue
This commit is contained in:
parent
37cbc85727
commit
1a9f4cad08
1 changed files with 6 additions and 1 deletions
|
@ -5377,7 +5377,12 @@ let result = match result {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
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());
|
(result).to_jsval(cx, args.rval());
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue