mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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
|
@ -45,8 +45,17 @@ pub(crate) fn create_namespace_object(
|
|||
methods: &[Guard<&'static [JSFunctionSpec]>],
|
||||
constants: &[Guard<&'static [ConstantSpec]>],
|
||||
name: &CStr,
|
||||
rval: MutableHandleObject,
|
||||
mut rval: MutableHandleObject,
|
||||
) {
|
||||
create_object(cx, global, proto, &class.0, methods, &[], constants, rval);
|
||||
create_object(
|
||||
cx,
|
||||
global,
|
||||
proto,
|
||||
&class.0,
|
||||
methods,
|
||||
&[],
|
||||
constants,
|
||||
rval.reborrow(),
|
||||
);
|
||||
define_on_global_object(cx, global, name, rval.handle());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue