mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Use explicit reborrows with mozjs::MutableHandle (#35892)
* Explicitly reborrow MutableHandles Signed-off-by: Greg Morenz <greg-morenz@droid.cafe> * Unify jsapi_wrappers Signed-off-by: Greg Morenz <greg-morenz@droid.cafe> * Format mozjs changes Signed-off-by: Greg Morenz <greg-morenz@droid.cafe> * Update mozjs version Signed-off-by: Greg Morenz <greg-morenz@droid.cafe> --------- Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
This commit is contained in:
parent
40270cb626
commit
4ecf0909e5
14 changed files with 67 additions and 44 deletions
|
@ -122,10 +122,10 @@ pub(crate) use script_bindings::utils::{DOMClass, DOMJSClass};
|
|||
pub(crate) fn to_frozen_array<T: ToJSValConvertible>(
|
||||
convertibles: &[T],
|
||||
cx: SafeJSContext,
|
||||
rval: MutableHandleValue,
|
||||
mut rval: MutableHandleValue,
|
||||
_can_gc: CanGc,
|
||||
) {
|
||||
unsafe { convertibles.to_jsval(*cx, rval) };
|
||||
unsafe { convertibles.to_jsval(*cx, rval.reborrow()) };
|
||||
|
||||
rooted!(in(*cx) let obj = rval.to_object());
|
||||
unsafe { JS_FreezeObject(*cx, RawHandleObject::from(obj.handle())) };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue