summaryrefslogtreecommitdiff
path: root/cli/rt/99_main.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-12-01 23:33:44 +0100
committerGitHub <noreply@github.com>2020-12-01 23:33:44 +0100
commitf49d9556015a7d4c04e9db3f0c85d4399f6125ff (patch)
tree7719c7b14d559928b5177301e1e83522c2222c97 /cli/rt/99_main.js
parent6e03917b51217524a894e5094933d551dc5ac0d9 (diff)
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.
Diffstat (limited to 'cli/rt/99_main.js')
-rw-r--r--cli/rt/99_main.js7
1 files changed, 6 insertions, 1 deletions
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;
}