script: Move easy IpcChannel usage to GenericChannel usage (#43309)

This moves some easy elements in Script from IpcChannel and related
methods to GenericChannel and related methods and some callbacks.

Testing: This will be covered by WPT if the channels behave differently.

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This commit is contained in:
Narfinger
2026-03-20 15:24:25 +08:00
committed by GitHub
parent e1433babbb
commit 81c3bde86c
18 changed files with 81 additions and 84 deletions

View File

@@ -62,7 +62,6 @@ use fonts::{FontContext, SystemFontServiceProxy};
use headers::{HeaderMapExt, LastModified, ReferrerPolicy as ReferrerPolicyHeader};
use http::header::REFRESH;
use hyper_serde::Serde;
use ipc_channel::ipc;
use ipc_channel::router::ROUTER;
use js::glue::GetWindowProxyClass;
use js::jsapi::{GCReason, JS_GC, JSContext as UnsafeJSContext};
@@ -3356,7 +3355,7 @@ impl ScriptThread {
sender_pipeline_id: PipelineId,
browsing_context_id: BrowsingContextId,
) -> Option<WebViewId> {
let (result_sender, result_receiver) = ipc::channel().unwrap();
let (result_sender, result_receiver) = generic_channel::channel().unwrap();
let msg = ScriptToConstellationMessage::GetTopForBrowsingContext(
browsing_context_id,
result_sender,