mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Make first argument of DOMManipulationTaskSource as a Box<ScriptChan +
Send> We don't have `window` for `workers`. So, if we use `global.as_window()` to get the DOMManipulationTaskSource, it will make worker panic. Instead, we should get the DOMManipulationTaskSource from each own thread. Ref: https://github.com/servo/servo/pull/20755#discussion_r193557746
This commit is contained in:
parent
924a78c6c6
commit
42903412c7
5 changed files with 32 additions and 11 deletions
|
@ -501,7 +501,7 @@ pub struct ScriptThread {
|
|||
/// events in the event queue.
|
||||
chan: MainThreadScriptChan,
|
||||
|
||||
dom_manipulation_task_sender: Sender<MainThreadScriptMsg>,
|
||||
dom_manipulation_task_sender: Box<ScriptChan>,
|
||||
|
||||
media_element_task_sender: Sender<MainThreadScriptMsg>,
|
||||
|
||||
|
@ -1020,7 +1020,7 @@ impl ScriptThread {
|
|||
task_queue,
|
||||
|
||||
chan: MainThreadScriptChan(chan.clone()),
|
||||
dom_manipulation_task_sender: chan.clone(),
|
||||
dom_manipulation_task_sender: boxed_script_sender.clone(),
|
||||
media_element_task_sender: chan.clone(),
|
||||
user_interaction_task_sender: chan.clone(),
|
||||
networking_task_sender: boxed_script_sender.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue