aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/abortcontroller.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2025-01-08 22:33:29 +0100
committerGitHub <noreply@github.com>2025-01-08 21:33:29 +0000
commit77bc7f415d91b46a2a739cca4521957a274c2386 (patch)
treedcbeddcb84df4192eda52133b2a141e7fc4c5af8 /components/script/dom/abortcontroller.rs
parent82ac8d41d0ad7e06a0076ef898a01ee6acac3e99 (diff)
downloadservo-77bc7f415d91b46a2a739cca4521957a274c2386.tar.gz
servo-77bc7f415d91b46a2a739cca4521957a274c2386.zip
script: Use `enum`s for event loop senders and receivers (#34896)
Previously, senders and receivers to different kinds of event loops (the main `ScriptThread`, different types of workers) used a rust `trait` mechanism to implement dynamic behavior. This led to having many unused implementations of this `trait`. This change moves to using an `enum` based approach for these senders and receivers and removes all of the dead code. In addition, to allowing for use of rust's dead code detection, it simplifies the code a great deal. All of these generic senders and receivers are moved to the `messaging.rs` file and given proper documentation. Finally, empty an `JSTraceable` implementation is made for all crossbeam `Sender<...>`s to avoid having to manually skip them everytime they are included in structs. The pre-existing empty `MallocSizeOf` implementation is used more thoroughly. Other unecessary wrappers around these senders and receivers are removed as well. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/script/dom/abortcontroller.rs')
0 files changed, 0 insertions, 0 deletions