(line)
| 560 | || (typeof self !== "undefined" && typeof self.importScripts === "function" && typeof process === "undefined")); |
| 561 | |
| 562 | function emitDiagLine(line) { |
| 563 | if (!__cn1PortDiagEnabled()) { |
| 564 | return; |
| 565 | } |
| 566 | if (global.console && typeof global.console.log === "function") { |
| 567 | global.console.log(line); |
| 568 | } |
| 569 | // Forward to main thread so Playwright (page.on('console')) can capture |
| 570 | // CN1SS output from the worker. Worker console.log is not always |
| 571 | // observable from the page context. |
| 572 | if (typeof global.postMessage === "function") { |
| 573 | try { |
| 574 | global.postMessage({ type: "log", message: String(line) }); |
| 575 | } catch (postErr) { |
| 576 | if (global.console && typeof global.console.warn === "function") { |
| 577 | global.console.warn("emitDiagLine:postMessage failed: " + String(postErr && postErr.message ? postErr.message : postErr)); |
| 578 | } |
| 579 | } |
| 580 | } |
| 581 | } |
| 582 | |
| 583 | function wrapVirtualMethodWithDiag(className, methodId, marker) { |
| 584 | if (!jvm || !jvm.classes || !jvm.classes[className]) { |
no test coverage detected