aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2023-05-29 00:47:31 -0400
committerJosh Matthews <josh@joshmatthews.net>2023-05-29 00:47:31 -0400
commitce023bea246ed0d8782523a5fe2767f37db6422d (patch)
tree0c54dbf140c66be97b49587ca7cbd54e9a1b9fd0
parent0e8ac3fdac83227d4bbc8d1d74ea021fa627280a (diff)
downloadservo-dom-protos.tar.gz
servo-dom-protos.zip
Don't root a Realm that's used for one call.dom-protos
-rw-r--r--components/script/dom/bindings/interface.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/bindings/interface.rs b/components/script/dom/bindings/interface.rs
index 6fa7591b41b..d3f77356b08 100644
--- a/components/script/dom/bindings/interface.rs
+++ b/components/script/dom/bindings/interface.rs
@@ -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,