mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
clippy: components/script/realms (#32859)
Signed-off-by: Rémy Saissy <remy.saissy@gmail.com>
This commit is contained in:
parent
bc1c71bd4d
commit
eac54183c1
4 changed files with 4 additions and 4 deletions
|
@ -3744,7 +3744,7 @@ class CGCallGenerator(CGThing):
|
||||||
if "cx" not in argsPre and needsCx:
|
if "cx" not in argsPre and needsCx:
|
||||||
args.prepend(CGGeneric("cx"))
|
args.prepend(CGGeneric("cx"))
|
||||||
if nativeMethodName in descriptor.inRealmMethods:
|
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
|
# Build up our actual call
|
||||||
self.cgRoot = CGList([], "\n")
|
self.cgRoot = CGList([], "\n")
|
||||||
|
|
|
@ -26,7 +26,7 @@ use crate::dom::bindings::str::DOMString;
|
||||||
use crate::dom::bindings::utils::to_frozen_array;
|
use crate::dom::bindings::utils::to_frozen_array;
|
||||||
use crate::dom::globalscope::GlobalScope;
|
use crate::dom::globalscope::GlobalScope;
|
||||||
use crate::dom::promise::Promise;
|
use crate::dom::promise::Promise;
|
||||||
use crate::realms::{AlreadyInRealm, InRealm};
|
use crate::realms::InRealm;
|
||||||
use crate::script_runtime::JSContext;
|
use crate::script_runtime::JSContext;
|
||||||
use crate::task::TaskCanceller;
|
use crate::task::TaskCanceller;
|
||||||
use crate::task_source::gamepad::GamepadTaskSource;
|
use crate::task_source::gamepad::GamepadTaskSource;
|
||||||
|
|
|
@ -34,7 +34,7 @@ pub enum InRealm<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> InRealm<'a> {
|
impl<'a> InRealm<'a> {
|
||||||
pub fn in_realm(token: &AlreadyInRealm) -> InRealm {
|
pub fn already(token: &AlreadyInRealm) -> InRealm {
|
||||||
InRealm::Already(token)
|
InRealm::Already(token)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -209,7 +209,7 @@ unsafe extern "C" fn enqueue_promise_job(
|
||||||
GlobalScope::from_object(incumbent_global.get())
|
GlobalScope::from_object(incumbent_global.get())
|
||||||
} else {
|
} else {
|
||||||
let realm = AlreadyInRealm::assert_for_cx(cx);
|
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 pipeline = global.pipeline_id();
|
||||||
let interaction = if promise.get().is_null() {
|
let interaction = if promise.get().is_null() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue