Replace some uses of window.global() with upcast. (#36179)

Signed-off-by: aniebietafia <aniebietafia87@gmail.com>
This commit is contained in:
Aniebiet Afia 2025-03-27 18:28:45 +01:00 committed by GitHub
parent a8063b8b4b
commit 3f5220b421
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -184,7 +184,7 @@ impl WindowProxy {
assert!(!js_proxy.is_null()); assert!(!js_proxy.is_null());
// Create a new browsing context. // Create a new browsing context.
let current = Some(window.global().pipeline_id()); let current = Some(window.upcast::<GlobalScope>().pipeline_id());
let window_proxy = Box::new(WindowProxy::new_inherited( let window_proxy = Box::new(WindowProxy::new_inherited(
browsing_context_id, browsing_context_id,
webview_id, webview_id,

View file

@ -2530,7 +2530,7 @@ impl ScriptThread {
// FIXME: synchronously talks to constellation. // FIXME: synchronously talks to constellation.
// send the required info as part of postmessage instead. // send the required info as part of postmessage instead.
let source = match self.remote_window_proxy( let source = match self.remote_window_proxy(
&window.global(), window.upcast::<GlobalScope>(),
source_browsing_context, source_browsing_context,
source_pipeline_id, source_pipeline_id,
None, None,