From 3f5220b42156268d08a6e87f78ded468058c98d4 Mon Sep 17 00:00:00 2001 From: Aniebiet Afia <54312052+aniebietafia@users.noreply.github.com> Date: Thu, 27 Mar 2025 18:28:45 +0100 Subject: [PATCH] Replace some uses of window.global() with upcast. (#36179) Signed-off-by: aniebietafia --- components/script/dom/windowproxy.rs | 2 +- components/script/script_thread.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/script/dom/windowproxy.rs b/components/script/dom/windowproxy.rs index acd96b4e55a..d008c76f905 100644 --- a/components/script/dom/windowproxy.rs +++ b/components/script/dom/windowproxy.rs @@ -184,7 +184,7 @@ impl WindowProxy { assert!(!js_proxy.is_null()); // Create a new browsing context. - let current = Some(window.global().pipeline_id()); + let current = Some(window.upcast::().pipeline_id()); let window_proxy = Box::new(WindowProxy::new_inherited( browsing_context_id, webview_id, diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 0d216212257..0ed9e80910e 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -2530,7 +2530,7 @@ impl ScriptThread { // FIXME: synchronously talks to constellation. // send the required info as part of postmessage instead. let source = match self.remote_window_proxy( - &window.global(), + window.upcast::(), source_browsing_context, source_pipeline_id, None,