Move console timers to GlobalScope

This commit is contained in:
Anthony Ramine 2016-10-01 03:01:54 +02:00
parent d7c2da450b
commit 14a0b8d88c
5 changed files with 35 additions and 66 deletions

View file

@ -14,7 +14,6 @@ use dom::bindings::error::{ErrorInfo, report_pending_exception};
use dom::bindings::inheritance::Castable;
use dom::bindings::js::Root;
use dom::bindings::reflector::{Reflectable, Reflector};
use dom::console::TimerSet;
use dom::globalscope::GlobalScope;
use dom::window;
use dom::workerglobalscope::WorkerGlobalScope;
@ -278,14 +277,6 @@ impl<'a> GlobalRef<'a> {
}
}
/// Returns the global's timers for the Console API.
pub fn console_timers(&self) -> &TimerSet {
match *self {
GlobalRef::Window(ref window) => window.console_timers(),
GlobalRef::Worker(ref worker) => worker.console_timers(),
}
}
/// Returns a wrapper for runnables to ensure they are cancelled if the global
/// is being destroyed.
pub fn get_runnable_wrapper(&self) -> RunnableWrapper {