mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Fixes issue #6866
This commit is contained in:
parent
f1c26c59f1
commit
49c5408e65
8 changed files with 67 additions and 40 deletions
|
@ -98,17 +98,9 @@ fn prepare_message(logLevel: LogLevel, message: String) -> ConsoleMessage {
|
|||
|
||||
fn propagate_console_msg(console: &&Console, console_message: ConsoleMessage) {
|
||||
let global = console.global.root();
|
||||
match global.r() {
|
||||
GlobalRef::Window(window_ref) => {
|
||||
let pipelineId = window_ref.pipeline();
|
||||
console.global.root().r().as_window().devtools_chan().as_ref().map(|chan| {
|
||||
chan.send(ScriptToDevtoolsControlMsg::SendConsoleMessage(
|
||||
pipelineId, console_message.clone())).unwrap();
|
||||
});
|
||||
},
|
||||
|
||||
GlobalRef::Worker(_) => {
|
||||
// TODO: support worker console logs
|
||||
}
|
||||
}
|
||||
let pipelineId = global.r().pipeline();
|
||||
global.r().devtools_chan().as_ref().map(|chan| {
|
||||
chan.send(ScriptToDevtoolsControlMsg::SendConsoleMessage(
|
||||
pipelineId, console_message.clone(), global.r().get_worker_id())).unwrap();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue