Introduce GlobalScope::flush_promise_jobs

This commit is contained in:
Anthony Ramine 2016-10-04 16:00:40 +02:00
parent 44ca9f3d71
commit 6e3be6d894
4 changed files with 16 additions and 13 deletions

View file

@ -2180,11 +2180,11 @@ impl ScriptThread {
});
}
pub fn flush_promise_jobs(global: GlobalRef) {
pub fn flush_promise_jobs(global: &GlobalScope) {
SCRIPT_THREAD_ROOT.with(|root| {
let script_thread = unsafe { &*root.get().unwrap() };
let _ = script_thread.dom_manipulation_task_source.queue(
box FlushPromiseJobs, global.as_global_scope());
box FlushPromiseJobs, global);
})
}