servo/components/script
Martin Robinson b2eda71952
script: Move TaskManager to GlobalScope (#34827)
This is a simplification of the internal `TaskQueue` API that moves the
`TaskManager` to the `GlobalScope` itself. In addition, the handling of
cancellers is moved to the `TaskManager` as well. This means that no
arguments other than the `task` are necessary for queueing tasks, which
makes the API a lot easier to use and cleaner.

`TaskSource` now also keeps a copy of the canceller with it, so that
they always know the proper way to cancel any tasks queued on them.

There is one complication here. The event loop `sender` for dedicated
workers is constantly changing as it is set to `None` when not handling
messages. This is because this sender keeps a handle to the main
thread's `Worker` object, preventing garbage collection while any
messages are still in flight or being handled. This change allows
setting the `sender` on the `TaskManager` to `None` to allow proper
garbabge collection.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-01-04 08:41:50 +00:00
..
docs Update branch name to main (#30877) 2023-12-16 09:32:20 +00:00
dom script: Move TaskManager to GlobalScope (#34827) 2025-01-04 08:41:50 +00:00
layout_dom Elide lifetimes where possible after rustup (#34824) 2025-01-03 18:54:44 +00:00
xpath Elide lifetimes where possible after rustup (#34824) 2025-01-03 18:54:44 +00:00
animation_timeline.rs script: Start replacing time with std::time and chrono (#30639) 2024-01-16 12:23:18 +00:00
animations.rs script: Expose node helpers as NodeTraits and give more descriptive names (#34832) 2025-01-03 18:55:01 +00:00
body.rs script: Move TaskManager to GlobalScope (#34827) 2025-01-04 08:41:50 +00:00
build.rs Upgrade rustc to 1.83 (#34793) 2025-01-01 09:38:28 +00:00
canvas_state.rs script: Expose node helpers as NodeTraits and give more descriptive names (#34832) 2025-01-03 18:55:01 +00:00
Cargo.toml script: Make timers per-process (#34581) 2024-12-24 09:53:35 +00:00
clipboard_provider.rs
conversions.rs Correct a variety of documentation issues (#34786) 2024-12-29 10:37:57 +00:00
devtools.rs script: Expose node helpers as NodeTraits and give more descriptive names (#34832) 2025-01-03 18:55:01 +00:00
document_collection.rs Elide lifetimes where possible after rustup (#34824) 2025-01-03 18:54:44 +00:00
document_loader.rs Fix GC borrow hazards triggered by LoadBlocker::terminate (#34122) 2024-11-04 22:27:41 +00:00
drag_data_store.rs Implement DataTransfer and related interfaces (#34205) 2024-11-25 10:49:04 +00:00
fetch.rs fix: add source browsing context to Request and HTTP credentials prompt (#34808) 2025-01-03 06:35:16 +00:00
iframe_collection.rs Correct a variety of documentation issues (#34786) 2024-12-29 10:37:57 +00:00
image_listener.rs script: Move TaskManager to GlobalScope (#34827) 2025-01-04 08:41:50 +00:00
init.rs Create two-phase initialization for generated JS engine bindings (#34366) 2024-12-06 07:34:24 +00:00
layout_image.rs script: Expose node helpers as NodeTraits and give more descriptive names (#34832) 2025-01-03 18:55:01 +00:00
lib.rs Elide lifetimes where possible after rustup (#34824) 2025-01-03 18:54:44 +00:00
links.rs script: Move TaskManager to GlobalScope (#34827) 2025-01-04 08:41:50 +00:00
mem.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
messaging.rs script: Eliminate code duplication in the task queue (#34798) 2025-01-01 13:50:52 +00:00
microtask.rs Dom: Re-implement ReadableStream Part 1 : Default Reader and Controller (#34064) 2024-12-17 21:14:00 +00:00
network_listener.rs script: Move TaskManager to GlobalScope (#34827) 2025-01-04 08:41:50 +00:00
realms.rs Elide lifetimes where possible after rustup (#34824) 2025-01-03 18:54:44 +00:00
script_module.rs script: Move TaskManager to GlobalScope (#34827) 2025-01-04 08:41:50 +00:00
script_runtime.rs script: Move TaskManager to GlobalScope (#34827) 2025-01-04 08:41:50 +00:00
script_thread.rs script: Move TaskManager to GlobalScope (#34827) 2025-01-04 08:41:50 +00:00
security_manager.rs Rewrite From/TryFrom conversions on generated types to avoid future orphan rule violations (#34554) 2024-12-11 05:52:48 +00:00
serviceworker_manager.rs Prevent moving CanGc values between threads/tasks (#33902) 2024-10-18 17:26:54 +00:00
stylesheet_loader.rs script: Expose node helpers as NodeTraits and give more descriptive names (#34832) 2025-01-03 18:55:01 +00:00
stylesheet_set.rs Elide lifetimes where possible after rustup (#34824) 2025-01-03 18:54:44 +00:00
task.rs script: Move TaskManager to GlobalScope (#34827) 2025-01-04 08:41:50 +00:00
task_manager.rs script: Move TaskManager to GlobalScope (#34827) 2025-01-04 08:41:50 +00:00
task_queue.rs clippy: Fix suggestions in script, libservo, and servoshell (#33453) 2024-09-14 08:41:13 +00:00
task_source.rs script: Move TaskManager to GlobalScope (#34827) 2025-01-04 08:41:50 +00:00
test.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
textinput.rs build: upgrade rustc to 1.81.0 (#34270) 2024-12-12 07:26:16 +00:00
timers.rs script: Make timers per-process (#34581) 2024-12-24 09:53:35 +00:00
unminify.rs Unminify module scripts. (#34206) 2024-11-12 13:06:55 +00:00
unpremultiplytable.rs
webdriver_handlers.rs script: Expose node helpers as NodeTraits and give more descriptive names (#34832) 2025-01-03 18:55:01 +00:00
window_named_properties.rs Replace the lazy_static crate whth std::sync::LazyLock in components/script (#33004) 2024-08-12 07:30:35 +00:00