mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Introduce GlobalScope::devtools_chan
This commit is contained in:
parent
14a0b8d88c
commit
fe6fca9e1f
8 changed files with 33 additions and 38 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue