mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01: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
|
@ -244,7 +244,11 @@ pub fn response_async<T: AsyncBluetoothListener + DomObject + 'static>(
|
|||
receiver: &T,
|
||||
) -> IpcSender<BluetoothResponseResult> {
|
||||
let (action_sender, action_receiver) = ipc::channel().unwrap();
|
||||
let task_source = receiver.global().task_manager().networking_task_source();
|
||||
let task_source = receiver
|
||||
.global()
|
||||
.task_manager()
|
||||
.networking_task_source()
|
||||
.to_sendable();
|
||||
let context = Arc::new(Mutex::new(BluetoothContext {
|
||||
promise: Some(TrustedPromise::new(promise.clone())),
|
||||
receiver: Trusted::new(receiver),
|
||||
|
@ -272,10 +276,7 @@ pub fn response_async<T: AsyncBluetoothListener + DomObject + 'static>(
|
|||
action: message.unwrap(),
|
||||
};
|
||||
|
||||
let result = task_source.queue_unconditionally(task);
|
||||
if let Err(err) = result {
|
||||
warn!("failed to deliver network data: {:?}", err);
|
||||
}
|
||||
task_source.queue_unconditionally(task);
|
||||
}),
|
||||
);
|
||||
action_sender
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue