diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-04 16:19:05 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-06 21:35:53 +0200 |
commit | 4d9347d5b35a9b354577bf76f2251c97edde7eef (patch) | |
tree | a81c938cc20431690ae3469b3afdd51423d8a1d5 /components/script/script_thread.rs | |
parent | 2ee073053ab4718bced82197b2af2c77fc5f47a7 (diff) | |
download | servo-4d9347d5b35a9b354577bf76f2251c97edde7eef.tar.gz servo-4d9347d5b35a9b354577bf76f2251c97edde7eef.zip |
Introduce GlobalScope::enqueue_promise_job
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r-- | components/script/script_thread.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 467b77d1f76..22ca69c78df 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -27,7 +27,7 @@ use dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, Documen use dom::bindings::codegen::Bindings::LocationBinding::LocationMethods; use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use dom::bindings::conversions::{ConversionResult, FromJSValConvertible, StringificationBehavior}; -use dom::bindings::global::{GlobalRef, GlobalRoot}; +use dom::bindings::global::GlobalRoot; use dom::bindings::inheritance::Castable; use dom::bindings::js::{JS, MutNullableHeap, Root, RootCollection}; use dom::bindings::js::{RootCollectionPtr, RootedReference}; @@ -2173,10 +2173,10 @@ impl ScriptThread { } } - pub fn enqueue_promise_job(job: EnqueuedPromiseCallback, global: GlobalRef) { + pub fn enqueue_promise_job(job: EnqueuedPromiseCallback, global: &GlobalScope) { SCRIPT_THREAD_ROOT.with(|root| { let script_thread = unsafe { &*root.get().unwrap() }; - script_thread.promise_job_queue.enqueue(job, global.as_global_scope()); + script_thread.promise_job_queue.enqueue(job, global); }); } |