mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
* 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>
17 lines
399 B
JavaScript
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);
|