diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-04 15:36:20 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-06 21:35:51 +0200 |
commit | 514819f37a12c79c0398863c2ef817c9a4337f56 (patch) | |
tree | 563259529244275a3003508c0d72bf7ae4c24197 /components/script/dom/bindings/global.rs | |
parent | ca8c6fb0724a364bdd11742a9c9611557595a6f7 (diff) | |
download | servo-514819f37a12c79c0398863c2ef817c9a4337f56.tar.gz servo-514819f37a12c79c0398863c2ef817c9a4337f56.zip |
Introduce GlobalScope::get_runnable_wrapper
Diffstat (limited to 'components/script/dom/bindings/global.rs')
-rw-r--r-- | components/script/dom/bindings/global.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/components/script/dom/bindings/global.rs b/components/script/dom/bindings/global.rs index 3c2d0533ac7..2d984db4598 100644 --- a/components/script/dom/bindings/global.rs +++ b/components/script/dom/bindings/global.rs @@ -19,7 +19,7 @@ use js::glue::{IsWrapper, UnwrapObject}; use js::jsapi::{CurrentGlobalOrNull, GetGlobalForObjectCrossCompartment}; use js::jsapi::{JSContext, JSObject, JS_GetClass}; use script_runtime::{CommonScriptMsg, EnqueuedPromiseCallback, ScriptChan, ScriptPort}; -use script_thread::{RunnableWrapper, ScriptThread}; +use script_thread::ScriptThread; use task_source::file_reading::FileReadingTaskSource; /// A freely-copyable reference to a rooted global object. @@ -85,15 +85,6 @@ impl<'a> GlobalRef<'a> { } } - /// Returns a wrapper for runnables to ensure they are cancelled if the global - /// is being destroyed. - pub fn get_runnable_wrapper(&self) -> RunnableWrapper { - match *self { - GlobalRef::Window(ref window) => window.get_runnable_wrapper(), - GlobalRef::Worker(ref worker) => worker.get_runnable_wrapper(), - } - } - /// Enqueue a promise callback for subsequent execution. pub fn enqueue_promise_job(&self, job: EnqueuedPromiseCallback) { match *self { |