diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-04 15:49:48 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-06 21:35:52 +0200 |
commit | 44ca9f3d712e9b49681e9848db089a1c05c7ffff (patch) | |
tree | c4c5f0ea086d3859977d542bd337b6c3a60ef095 /components/script/script_thread.rs | |
parent | 514819f37a12c79c0398863c2ef817c9a4337f56 (diff) | |
download | servo-44ca9f3d712e9b49681e9848db089a1c05c7ffff.tar.gz servo-44ca9f3d712e9b49681e9848db089a1c05c7ffff.zip |
Make TaskSource::queue take a &GlobalScope
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r-- | components/script/script_thread.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index bbdc766cea4..b495cbadd06 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -1192,7 +1192,7 @@ impl ScriptThread { // https://html.spec.whatwg.org/multipage/#the-end step 7 let handler = box DocumentProgressHandler::new(Trusted::new(doc)); - self.dom_manipulation_task_source.queue(handler, GlobalRef::Window(doc.window())).unwrap(); + self.dom_manipulation_task_source.queue(handler, doc.window().upcast()).unwrap(); if let Some(fragment) = doc.url().fragment() { self.check_and_scroll_fragment(fragment, pipeline, doc); @@ -2183,7 +2183,8 @@ impl ScriptThread { pub fn flush_promise_jobs(global: GlobalRef) { SCRIPT_THREAD_ROOT.with(|root| { let script_thread = unsafe { &*root.get().unwrap() }; - let _ = script_thread.dom_manipulation_task_source.queue(box FlushPromiseJobs, global); + let _ = script_thread.dom_manipulation_task_source.queue( + box FlushPromiseJobs, global.as_global_scope()); }) } |