Add Websocket task source
According to the doc: https://html.spec.whatwg.org/multipage/web-sockets.html#network
The task source for all tasks queued in the websocket section are the
websocket task source, so this commit also updates those references to
use the appropriate one.
Also, while working on this, I made a typo here: 5dd6e21c2e/components/script/dom/window.rs (L191)
Setting the name incorrectly. The error, however, was this:
```bash
error[E0412]: cannot find type `WebsocketEventTaskSource` in this scope
--> components/script/dom/window.rs:171:1
|
171 | #[dom_struct]
| ^^^^^^^^^^^^^ did you mean `WebsocketTaskSource`?
```
Which isn't useful at all. Not sure if it's a rustc problem or something related with htis code base, but I thought it was worth mentioning.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix#21590
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they don't include new behavior and existing tests should cover this code.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21645)
<!-- Reviewable:end -->
Add a new control message to drop remove worklets.
Implement `Drop` for `Worklet` and get the worklet thread pool. Use that
pool to send `ExitWorklet` to all the threads with the id of the
`Worklet` that it's dropping.
There is no need to pass the target to that buffer method, given the buffer
has been retrieved by looking up the one bound to that target in the context.
Add task source name
Refactor `CommonScriptMsg::Task` to include `TaskSourceName`.
Sorry for the delay, between doing this after work and the time I spent trying to ramp up on the project, it took me a bit longer than I expected.
Test still don't pass in local, but they fail the same way on master, so I guess it's ok.
I may have forgotten something, I refactored mostly the stuff that the compiler complained about. Please let me know if I missed anything.
I tried to dump my thought process on the commit messages, so feel free to go commit by commit to understand context.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix#21527
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's mostly refactor, no new behavior added.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21583)
<!-- Reviewable:end -->
Introduce task queues, and throttling performance timeline tasksource
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix#19997 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21388)
<!-- Reviewable:end -->