Introduce GlobalScope::devtools_chan

This commit is contained in:
Anthony Ramine 2016-10-01 03:44:05 +02:00
parent 14a0b8d88c
commit fe6fca9e1f
8 changed files with 33 additions and 38 deletions

View file

@ -7,7 +7,6 @@
//! This module contains smart pointers to global scopes, to simplify writing
//! code that works in workers as well as window scopes.
use devtools_traits::ScriptToDevtoolsControlMsg;
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
use dom::bindings::conversions::root_from_object;
use dom::bindings::error::{ErrorInfo, report_pending_exception};
@ -122,15 +121,6 @@ impl<'a> GlobalRef<'a> {
}
}
/// Get an `IpcSender<ScriptToDevtoolsControlMsg>` to send messages to Devtools
/// thread when available.
pub fn devtools_chan(&self) -> Option<IpcSender<ScriptToDevtoolsControlMsg>> {
match *self {
GlobalRef::Window(window) => window.devtools_chan(),
GlobalRef::Worker(worker) => worker.devtools_chan(),
}
}
/// Get the `ResourceThreads` for this global scope.
pub fn resource_threads(&self) -> ResourceThreads {
match *self {