aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2019-04-30 02:40:36 +0800
committerGitHub <noreply@github.com>2019-04-30 02:40:36 +0800
commitfba008e2989de0611d144a1ec91d9eb1c9b2b479 (patch)
tree8d36c8705d9c63b63ad57310681f13bfa3f922b5
parentc37a8e927e5fdd2276c658586003710e119293c8 (diff)
downloadtracifyjs-fba008e2989de0611d144a1ec91d9eb1c9b2b479.tar.gz
tracifyjs-fba008e2989de0611d144a1ec91d9eb1c9b2b479.zip
remove blanket safeguard from `source-map` (#3391)
Things has stabilised since 80a18fe2fa60d8a689516b921a386839d30b6abe, so it makes sense to remove the unconditional masking for ease of debugging.
-rw-r--r--lib/output.js23
1 files changed, 6 insertions, 17 deletions
diff --git a/lib/output.js b/lib/output.js
index 4b1ae949..a3b555ff 100644
--- a/lib/output.js
+++ b/lib/output.js
@@ -217,23 +217,12 @@ function OutputStream(options) {
var flush_mappings = mappings ? function() {
mappings.forEach(function(mapping) {
- try {
- options.source_map.add(
- mapping.token.file,
- mapping.line, mapping.col,
- mapping.token.line, mapping.token.col,
- !mapping.name && mapping.token.type == "name" ? mapping.token.value : mapping.name
- );
- } catch(ex) {
- AST_Node.warn("Couldn't figure out mapping for {file}:{line},{col} → {cline},{ccol} [{name}]", {
- file: mapping.token.file,
- line: mapping.token.line,
- col: mapping.token.col,
- cline: mapping.line,
- ccol: mapping.col,
- name: mapping.name || ""
- })
- }
+ options.source_map.add(
+ mapping.token.file,
+ mapping.line, mapping.col,
+ mapping.token.line, mapping.token.col,
+ !mapping.name && mapping.token.type == "name" ? mapping.token.value : mapping.name
+ );
});
mappings = [];
} : noop;