WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
REOPENED
272382
Web Inspector does not show console messages from nested workers
https://bugs.webkit.org/show_bug.cgi?id=272382
Summary
Web Inspector does not show console messages from nested workers
Kimmo Kinnunen
Reported
2024-04-09 02:40:19 PDT
Web Inspector does not show console messages from nested workers
Attachments
Add attachment
proposed patch, testcase, etc.
Kimmo Kinnunen
Comment 1
2024-04-09 02:40:35 PDT
diff --git a/LayoutTests/workers/console-log-nested-worker.js b/LayoutTests/workers/console-log-nested-worker.js new file mode 100644 index 000000000000..47e9054f3b9d --- /dev/null +++ b/LayoutTests/workers/console-log-nested-worker.js @@ -0,0 +1,4 @@ +onmessage = function(e) { + console.log(`log from nested worker: ${e.data.msg}`); + self.postMessage("done from nested worker:" + e.data.msg); +}; diff --git a/LayoutTests/workers/console-log-worker.js b/LayoutTests/workers/console-log-worker.js new file mode 100644 index 000000000000..4f24a5c2bc80 --- /dev/null +++ b/LayoutTests/workers/console-log-worker.js @@ -0,0 +1,8 @@ +const worker = new Worker("console-log-nested-worker.js"); +onmessage = function(e) { + console.log(`log from worker: ${e.data.msg}`); + worker.postMessage({msg: e.data.msg}); +}; +worker.onmessage = function(e) { + self.postMessage("done from worker:" + e.data); +} diff --git a/LayoutTests/workers/console-log.html b/LayoutTests/workers/console-log.html new file mode 100644 index 000000000000..576c55a7b833 --- /dev/null +++ b/LayoutTests/workers/console-log.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html> +<body> +<script src="../resources/js-test.js"></script> +<script> +description("Tests that worker and nested worker console log is printed"); +window.jsTestIsAsync = true; + +const test = (msg) => new Promise(resolve => { + const w = new Worker("console-log-worker.js"); + w.postMessage({ msg }); + w.onmessage = (e) => { + debug(e.data); + resolve(); + }; +}); +async function runTest() { + console.log("log from main"); + try { + await test("works 1"); + await test("works 2"); + testPassed("Passes if console messages are logged"); + } catch (reason) { + testFailed(`Rejected: ${reason}`); + } + finishJSTest() +}; +runTest(); + +</script> +</body> +</html>
Radar WebKit Bug Importer
Comment 2
2024-04-09 02:40:42 PDT
<
rdar://problem/126125157
>
Alexey Proskuryakov
Comment 3
2024-04-09 11:49:47 PDT
*** This bug has been marked as a duplicate of
bug 255402
***
Kimmo Kinnunen
Comment 4
2024-04-10 05:03:51 PDT
Unduping. The
bug 255402
is related. However, there's bugs in this area even when that bug is fixed
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug