mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Make task queue API usable from non-main threads.
This commit is contained in:
parent
0e4865ea1a
commit
2aef518ce6
9 changed files with 42 additions and 21 deletions
|
@ -241,7 +241,7 @@ impl HTMLMediaElement {
|
|||
elem: Trusted::new(self),
|
||||
};
|
||||
let win = window_from_node(self);
|
||||
let _ = win.dom_manipulation_task_source().queue(task, win.r());
|
||||
let _ = win.dom_manipulation_task_source().queue(task, GlobalRef::Window(&win));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#internal-pause-steps step 2.2
|
||||
|
@ -265,13 +265,13 @@ impl HTMLMediaElement {
|
|||
elem: Trusted::new(self),
|
||||
};
|
||||
let win = window_from_node(self);
|
||||
let _ = win.dom_manipulation_task_source().queue(task, win.r());
|
||||
let _ = win.dom_manipulation_task_source().queue(task, GlobalRef::Window(&win));
|
||||
}
|
||||
|
||||
fn queue_fire_simple_event(&self, type_: &'static str) {
|
||||
let win = window_from_node(self);
|
||||
let task = box FireSimpleEventTask::new(self, type_);
|
||||
let _ = win.dom_manipulation_task_source().queue(task, win.r());
|
||||
let _ = win.dom_manipulation_task_source().queue(task, GlobalRef::Window(&win));
|
||||
}
|
||||
|
||||
fn fire_simple_event(&self, type_: &str) {
|
||||
|
@ -498,7 +498,8 @@ impl HTMLMediaElement {
|
|||
|
||||
fn queue_dedicated_media_source_failure_steps(&self) {
|
||||
let window = window_from_node(self);
|
||||
let _ = window.dom_manipulation_task_source().queue(box DedicatedMediaSourceFailureTask::new(self), window.r());
|
||||
let _ = window.dom_manipulation_task_source().queue(box DedicatedMediaSourceFailureTask::new(self),
|
||||
GlobalRef::Window(&window));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dedicated-media-source-failure-steps
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue