Use GenericChannel for script_chan (#38645)

Motivation: 
Using our GenericChannel abstraction allows us to optimize IPC in
single-process mode to just use cross-beam channel.
To keep the diff low, and get early feedback, this PR only tackles a
single channel, but the intention is to port all ipc channels to the
generic channel, which allows us to skip serializing and deserializing
messages in single process mode.

Based on: 
- https://github.com/servo/servo/pull/38638
- https://github.com/servo/servo/pull/38636

Testing: Covered by existing tests

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
Jonathan Schwender 2025-08-19 11:59:20 +02:00 committed by GitHub
parent 73e0f2f7e6
commit 8587536755
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 36 additions and 22 deletions

View file

@ -33,7 +33,7 @@ pub fn webgl_channel<T>() -> Option<(WebGLSender<T>, WebGLReceiver<T>)>
where
T: for<'de> Deserialize<'de> + Serialize,
{
base::generic_channel::channel(servo_config::opts::get().multiprocess)
base::generic_channel::channel()
}
/// Entry point channel type used for sending WebGLMsg messages to the WebGL renderer.