Files
bun.sh/test/js/web/console/console-recursive.js
Lukas Kastern 5a6ef045aa fix: Hang when recursively logging via ConsoleObject.messageWithTypeAndLevel (#8213)
* Avoid deadlock in messageWithTypeAndLevel by adding a recursion counter

* Add test for recursive logs

* Do not rely on output of console-recursive.test.js

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-01-16 15:26:23 -08:00

17 lines
399 B
JavaScript

// We use a relatively random string for the stderr flag.
// Just to avoid matching against something in the executable path.
const use_err = process.argv.includes("print_to_stderr_skmxctoznf");
const log_method = use_err ? console.error : console.log;
class MyMap extends Map {
get size() {
log_method("inside size");
return 0;
}
}
const map = new MyMap();
log_method("map:", map);