From f49d9556015a7d4c04e9db3f0c85d4399f6125ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 1 Dec 2020 23:33:44 +0100 Subject: fix(compile): disable source mapping of errors (#8581) This commit disables source mapping of errors for standalone binaries. Since applying source maps relies on using file fetcher infrastructure it's not feasible to use it for standalone binaries that are not supposed to use that infrastructure. --- cli/rt/99_main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cli/rt') diff --git a/cli/rt/99_main.js b/cli/rt/99_main.js index 69c27c579..f582994c7 100644 --- a/cli/rt/99_main.js +++ b/cli/rt/99_main.js @@ -160,7 +160,12 @@ delete Object.prototype.__proto__; version.setVersions(s.denoVersion, s.v8Version, s.tsVersion); build.setBuildInfo(s.target); util.setLogDebug(s.debugFlag, source); - errorStack.setPrepareStackTrace(Error); + // TODO(bartlomieju): a very crude way to disable + // source mapping of errors. This condition is true + // only for compiled standalone binaries. + if (s.applySourceMaps) { + errorStack.setPrepareStackTrace(Error); + } return s; } -- cgit v1.2.3