diff options
author | Josh Matthews <josh@joshmatthews.net> | 2023-05-29 00:47:31 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2023-05-29 00:47:31 -0400 |
commit | ce023bea246ed0d8782523a5fe2767f37db6422d (patch) | |
tree | 0c54dbf140c66be97b49587ca7cbd54e9a1b9fd0 | |
parent | 0e8ac3fdac83227d4bbc8d1d74ea021fa627280a (diff) | |
download | servo-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.rs | 6 |
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, |