mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Don't root a Realm that's used for one call.
This commit is contained in:
parent
0e8ac3fdac
commit
ce023bea24
1 changed files with 3 additions and 3 deletions
|
@ -686,14 +686,14 @@ pub fn get_desired_proto(
|
|||
|
||||
// Fall back to getting the proto for our given proto id in the realm that
|
||||
// GetFunctionRealm(newTarget) returns.
|
||||
rooted!(in(*cx) let realm = GetFunctionRealm(*cx, new_target.handle().into()));
|
||||
let realm = GetFunctionRealm(*cx, new_target.handle().into());
|
||||
|
||||
if (*realm).is_null() {
|
||||
if realm.is_null() {
|
||||
return Err(());
|
||||
}
|
||||
|
||||
{
|
||||
let _realm = JSAutoRealm::new(*cx, GetRealmGlobalOrNull(*realm));
|
||||
let _realm = JSAutoRealm::new(*cx, GetRealmGlobalOrNull(realm));
|
||||
rooted!(in(*cx) let global = CurrentGlobalOrNull(*cx));
|
||||
get_per_interface_object_handle(
|
||||
cx,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue