google / google/closure-compiler

Invalid source map causes unchecked exception

Open
#2,349 0 comments 0 reactions 0 assignees View on GitHub
P3
Dominant language
JavaScript
Stars
7.7k
Forks
1.2k
Avg merge
2d 12h
Merged PRs (30d)
6

Description

If a source file contains a sourcemap with invalid encoding, then this code:

https://github.com/google/closure-compiler/blob/1f7d74b3c06c95c0264bc6722e6b1af17e08f7b4/src/com/google/javascript/jscomp/parsing/parser/Parser.java#L260

can throw an unchecked exception, see:

https://google.github.io/guava/releases/16.0/api/docs/com/google/common/io/BaseEncoding.html#decode(java.lang.CharSequence)

This should instead be caught and made into a compiler warning or error or something.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.