mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Move console timers to GlobalScope
This commit is contained in:
parent
d7c2da450b
commit
14a0b8d88c
5 changed files with 35 additions and 66 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue