From e8db526f513ba324535fff040d651d4faacd89ae Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Tue, 18 Aug 2020 23:14:41 +0100 Subject: avoid setters during `console.log()` in sandbox (#4055) fixes #4054 --- test/compress/sandbox.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test/compress') diff --git a/test/compress/sandbox.js b/test/compress/sandbox.js index 02097c1e..9356f6f3 100644 --- a/test/compress/sandbox.js +++ b/test/compress/sandbox.js @@ -80,3 +80,21 @@ log_global: { } expect_stdout: "[object global]" } + +issue_4054: { + input: { + console.log({ + set p(v) { + throw "FAIL"; + }, + }); + } + expect: { + console.log({ + set p(v) { + throw "FAIL"; + }, + }); + } + expect_stdout: "{ p: [Setter] }" +} -- cgit v1.2.3