diff options
Diffstat (limited to 'cli/rt/99_main.js')
-rw-r--r-- | cli/rt/99_main.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cli/rt/99_main.js b/cli/rt/99_main.js index 40c9c636f..2aa140990 100644 --- a/cli/rt/99_main.js +++ b/cli/rt/99_main.js @@ -164,9 +164,16 @@ delete Object.prototype.__proto__; // TODO(bartlomieju): a very crude way to disable // source mapping of errors. This condition is true // only for compiled standalone binaries. + let prepareStackTrace; if (s.applySourceMaps) { - errorStack.setPrepareStackTrace(Error); + prepareStackTrace = core.createPrepareStackTrace( + errorStack.opApplySourceMap, + ); + } else { + prepareStackTrace = core.createPrepareStackTrace(); } + Error.prepareStackTrace = prepareStackTrace; + return s; } |