aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorRémy SAISSY <remy.saissy@gmail.com>2024-07-26 12:15:02 +0200
committerGitHub <noreply@github.com>2024-07-26 10:15:02 +0000
commiteac54183c154ca044f98e9d74aa51892f73c0085 (patch)
tree967c59d4b59fe39436df58b12f4927e533226d8c /components
parentbc1c71bd4df9424e4cceed9dc8cc38efc591095b (diff)
downloadservo-eac54183c154ca044f98e9d74aa51892f73c0085.tar.gz
servo-eac54183c154ca044f98e9d74aa51892f73c0085.zip
clippy: components/script/realms (#32859)
Signed-off-by: Rémy Saissy <remy.saissy@gmail.com>
Diffstat (limited to 'components')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py2
-rw-r--r--components/script/dom/gamepadhapticactuator.rs2
-rw-r--r--components/script/realms.rs2
-rw-r--r--components/script/script_runtime.rs2
4 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index b59c3e7003d..cc564a83745 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -3744,7 +3744,7 @@ class CGCallGenerator(CGThing):
if "cx" not in argsPre and needsCx:
args.prepend(CGGeneric("cx"))
if nativeMethodName in descriptor.inRealmMethods:
- args.append(CGGeneric("InRealm::in_realm(&AlreadyInRealm::assert_for_cx(cx))"))
+ args.append(CGGeneric("InRealm::already(&AlreadyInRealm::assert_for_cx(cx))"))
# Build up our actual call
self.cgRoot = CGList([], "\n")
diff --git a/components/script/dom/gamepadhapticactuator.rs b/components/script/dom/gamepadhapticactuator.rs
index d391c08d398..ed4d784b241 100644
--- a/components/script/dom/gamepadhapticactuator.rs
+++ b/components/script/dom/gamepadhapticactuator.rs
@@ -26,7 +26,7 @@ use crate::dom::bindings::str::DOMString;
use crate::dom::bindings::utils::to_frozen_array;
use crate::dom::globalscope::GlobalScope;
use crate::dom::promise::Promise;
-use crate::realms::{AlreadyInRealm, InRealm};
+use crate::realms::InRealm;
use crate::script_runtime::JSContext;
use crate::task::TaskCanceller;
use crate::task_source::gamepad::GamepadTaskSource;
diff --git a/components/script/realms.rs b/components/script/realms.rs
index 37ed21366a3..11171051025 100644
--- a/components/script/realms.rs
+++ b/components/script/realms.rs
@@ -34,7 +34,7 @@ pub enum InRealm<'a> {
}
impl<'a> InRealm<'a> {
- pub fn in_realm(token: &AlreadyInRealm) -> InRealm {
+ pub fn already(token: &AlreadyInRealm) -> InRealm {
InRealm::Already(token)
}
diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs
index 49daa897862..c56dbce357c 100644
--- a/components/script/script_runtime.rs
+++ b/components/script/script_runtime.rs
@@ -209,7 +209,7 @@ unsafe extern "C" fn enqueue_promise_job(
GlobalScope::from_object(incumbent_global.get())
} else {
let realm = AlreadyInRealm::assert_for_cx(cx);
- GlobalScope::from_context(*cx, InRealm::in_realm(&realm))
+ GlobalScope::from_context(*cx, InRealm::already(&realm))
};
let pipeline = global.pipeline_id();
let interaction = if promise.get().is_null() {