mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +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
|
@ -241,7 +241,7 @@ pub(crate) fn create_interface_prototype_object(
|
|||
regular_properties: &[Guard<&'static [JSPropertySpec]>],
|
||||
constants: &[Guard<&[ConstantSpec]>],
|
||||
unscopable_names: &[&CStr],
|
||||
rval: MutableHandleObject,
|
||||
mut rval: MutableHandleObject,
|
||||
) {
|
||||
create_object(
|
||||
cx,
|
||||
|
@ -251,7 +251,7 @@ pub(crate) fn create_interface_prototype_object(
|
|||
regular_methods,
|
||||
regular_properties,
|
||||
constants,
|
||||
rval,
|
||||
rval.reborrow(),
|
||||
);
|
||||
|
||||
if !unscopable_names.is_empty() {
|
||||
|
@ -289,7 +289,7 @@ pub(crate) fn create_noncallback_interface_object(
|
|||
name: &CStr,
|
||||
length: u32,
|
||||
legacy_window_alias_names: &[&CStr],
|
||||
rval: MutableHandleObject,
|
||||
mut rval: MutableHandleObject,
|
||||
) {
|
||||
create_object(
|
||||
cx,
|
||||
|
@ -299,7 +299,7 @@ pub(crate) fn create_noncallback_interface_object(
|
|||
static_methods,
|
||||
static_properties,
|
||||
constants,
|
||||
rval,
|
||||
rval.reborrow(),
|
||||
);
|
||||
unsafe {
|
||||
assert!(JS_LinkConstructorAndPrototype(
|
||||
|
@ -694,7 +694,7 @@ pub(crate) fn get_desired_proto(
|
|||
global.handle(),
|
||||
ProtoOrIfaceIndex::ID(proto_id),
|
||||
creator,
|
||||
desired_proto,
|
||||
desired_proto.reborrow(),
|
||||
);
|
||||
if desired_proto.is_null() {
|
||||
return Err(());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue