mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Introduce GlobalScope::pipeline_id
This commit is contained in:
parent
c6ff767625
commit
27f100b1d4
21 changed files with 103 additions and 85 deletions
|
@ -11,7 +11,8 @@ pub struct Console(());
|
|||
|
||||
impl Console {
|
||||
fn send_to_devtools(global: GlobalRef, level: LogLevel, message: DOMString) {
|
||||
if let Some(chan) = global.as_global_scope().devtools_chan() {
|
||||
let global_scope = global.as_global_scope();
|
||||
if let Some(chan) = global_scope.devtools_chan() {
|
||||
let console_message = prepare_message(level, message);
|
||||
let worker_id = if let GlobalRef::Worker(worker) = global {
|
||||
Some(worker.get_worker_id())
|
||||
|
@ -19,7 +20,7 @@ impl Console {
|
|||
None
|
||||
};
|
||||
let devtools_message = ScriptToDevtoolsControlMsg::ConsoleAPI(
|
||||
global.pipeline_id(),
|
||||
global_scope.pipeline_id(),
|
||||
console_message,
|
||||
worker_id);
|
||||
chan.send(devtools_message).unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue