mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Notify devtools about new worker globals
This commit is contained in:
parent
5dd43bf84c
commit
1244f9e016
10 changed files with 117 additions and 14 deletions
|
@ -14,6 +14,8 @@ use dom::workerglobalscope::{WorkerGlobalScope, WorkerGlobalScopeHelpers};
|
|||
use dom::window::{self, WindowHelpers};
|
||||
use script_task::ScriptChan;
|
||||
|
||||
use msg::constellation_msg::WorkerId;
|
||||
|
||||
use net::resource_task::ResourceTask;
|
||||
|
||||
use js::{JSCLASS_IS_GLOBAL, JSCLASS_IS_DOMJSCLASS};
|
||||
|
@ -89,6 +91,14 @@ impl<'a> GlobalRef<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Get next worker id.
|
||||
pub fn get_next_worker_id(&self) -> WorkerId {
|
||||
match *self {
|
||||
GlobalRef::Window(ref window) => window.get_next_worker_id(),
|
||||
GlobalRef::Worker(ref worker) => worker.get_next_worker_id()
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the URL for this global scope.
|
||||
pub fn get_url(&self) -> Url {
|
||||
match *self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue