servo/components/shared
Martin Robinson 5f927a2c28
script: Refactor channels in ScriptThread into receivers and senders (#34776)
Create two new data structures in the `script` crate to hold senders and
receiver:

- `ScriptThreadSenders`: holds all outgoing channels from the
  `ScriptThread` including a channel to the `ScriptThread` itself. The
  ultimate goal with this is to reduce duplication by giving a boxed
  version of this this to `Window`s.
- `ScriptThradReceivers`: holds all incoming channels to the
  `ScriptThread`. This isn't cloenable like the senders. This is used to
  abstract away `recv()` and `try_recv()` methods used to make the
  `ScriptThread` event loop easier to read.

In addition:

- The many duplicated `ScriptThread` self-senders for the `TaskManager`
  have been removed and, in general, a lot of boilerplate is removed as
  well.
- Visibilty of all methods affected by this change is changed to
  `pub(crate)` in order to take advantage of dead code detection. Some
  dead code produced from macros is removed.
- Some conversion code is refactord into implementations of the `From`
  trait.
- The names of channels uses a standard "sender" and "receiver" naming
  as well as trying to be descriptive of where they go in `ScriptThread`
  as well as `InitialScriptState`

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2024-12-26 03:34:54 +00:00
..
background_hang_monitor Remove some unused dependencies (#34355) 2024-11-25 10:29:58 +00:00
base Remove size_of_test macro from legacy layout and inline it (#34055) 2024-10-29 14:46:10 +00:00
bluetooth doc(resources): Add documentation to undocumented embedder_traits::resources::Resource variants (#33885) 2024-10-18 03:44:14 +00:00
canvas Replace sparkle with glow in components/canvas (#33918) 2024-11-20 09:05:24 +00:00
compositing Add embedder event for preferred color scheme and respond to it in the LayoutThread (#34532) 2024-12-12 06:17:02 +00:00
devtools Implement console.trace (#34629) 2024-12-18 23:45:06 +00:00
embedder feat: webxr feature flag (#34241) 2024-11-13 17:16:58 +00:00
fonts Remove some unused dependencies (#34355) 2024-11-25 10:29:58 +00:00
net Upgrade Rust to 1.82.0 (#34592) 2024-12-12 12:00:51 +00:00
profile Plumb URL into interval profiler tracing events (#34337) 2024-11-22 13:31:00 +00:00
script script: Refactor channels in ScriptThread into receivers and senders (#34776) 2024-12-26 03:34:54 +00:00
script_layout script: Manage <iframe> sizes in Window (#34643) 2024-12-16 15:05:33 +00:00
webrender Remove some unused dependencies (#34355) 2024-11-25 10:29:58 +00:00