diff options
author | CYBAI <cyb.ai.815@gmail.com> | 2018-06-10 21:02:11 +0800 |
---|---|---|
committer | CYBAI <cyb.ai.815@gmail.com> | 2018-10-18 19:13:23 +0800 |
commit | 42903412c768f289558554419add125ce908e342 (patch) | |
tree | 5778ea48efc1659006fbacb4dd6ed270b91cd8fb /components/script/script_runtime.rs | |
parent | 924a78c6c678e9448df9983bb370ff40910465bd (diff) | |
download | servo-42903412c768f289558554419add125ce908e342.tar.gz servo-42903412c768f289558554419add125ce908e342.zip |
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
Diffstat (limited to 'components/script/script_runtime.rs')
-rw-r--r-- | components/script/script_runtime.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs index 276a913647a..b128e3e54b5 100644 --- a/components/script/script_runtime.rs +++ b/components/script/script_runtime.rs @@ -217,7 +217,7 @@ pub fn notify_about_rejected_promises(global: &GlobalScope) { let target = Trusted::new(global.upcast::<EventTarget>()); // Step 4. - global.as_window().dom_manipulation_task_source().queue( + global.dom_manipulation_task_source().queue( task!(unhandled_rejection_event: move || { let target = target.root(); let cx = target.global().get_cx(); |