Make PromiseJobQueue::enqueue take a &GlobalScope

This commit is contained in:
Anthony Ramine 2016-10-04 16:08:12 +02:00
parent 6e3be6d894
commit 2ee073053a
3 changed files with 7 additions and 6 deletions

View file

@ -2176,7 +2176,7 @@ impl ScriptThread {
pub fn enqueue_promise_job(job: EnqueuedPromiseCallback, global: GlobalRef) {
SCRIPT_THREAD_ROOT.with(|root| {
let script_thread = unsafe { &*root.get().unwrap() };
script_thread.promise_job_queue.enqueue(job, global);
script_thread.promise_job_queue.enqueue(job, global.as_global_scope());
});
}