node/test/parallel/test-console-issue-43095.js
Daeyeon Jeong f7cd3f6e0c
console: fix console.dir crash on a revoked proxy
Fixes: https://github.com/nodejs/node/issues/43095

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com

PR-URL: https://github.com/nodejs/node/pull/43100
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-22 11:41:55 +01:00

13 lines
240 B
JavaScript

'use strict';
require('../common');
const { inspect } = require('node:util');
const r = Proxy.revocable({}, {});
r.revoke();
console.dir(r);
console.dir(r.proxy);
console.log(r.proxy);
console.log(inspect(r.proxy, { showProxy: true }));