mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
script: Unsilence all main thread TaskQueue
errors (#34849)
No longer hide errors while queueing tasks on the main thread. This requires creating two types of `TaskSource`s: one for the main thread and one that can be sent to other threads. This makes queueing a bit more efficient on the main thread and more importantly, no longer hides task queue errors. Fixes #25688. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
d252a631d2
commit
fe8a22b72c
48 changed files with 628 additions and 571 deletions
|
@ -59,7 +59,7 @@ use crate::script_runtime::{
|
|||
ThreadSafeJSContext,
|
||||
};
|
||||
use crate::task_queue::{QueuedTask, QueuedTaskConversion, TaskQueue};
|
||||
use crate::task_source::{TaskSource, TaskSourceName};
|
||||
use crate::task_source::{SendableTaskSource, TaskSourceName};
|
||||
|
||||
/// Set the `worker` field of a related DedicatedWorkerGlobalScope object to a particular
|
||||
/// value for the duration of this object's lifetime. This ensures that the related Worker
|
||||
|
@ -378,7 +378,7 @@ impl DedicatedWorkerGlobalScope {
|
|||
.origin(origin);
|
||||
|
||||
let runtime = unsafe {
|
||||
let task_source = TaskSource {
|
||||
let task_source = SendableTaskSource {
|
||||
sender: Box::new(WorkerThreadWorkerChan {
|
||||
sender: own_sender.clone(),
|
||||
worker: worker.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue