New issue
Advanced search Search tips

Issue 853244 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner:
Closed: Oct 2
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

SourceMap: null in sources array is treated like a filename

Reported by alec.sta...@gmail.com, Jun 15 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36

Steps to reproduce the problem:
1. create a source map with a null literal in its `sources` array
2. have its source code throw an error
3. look at the source path that the console shows next to the error

What is the expected behavior?
A null source indicates no associated filename. When the `sourcesContent` entry is non-null, the console should link to that. Otherwise, link to the generated code.

What went wrong?
The null source is treated as a filename (even though it's not a string) and appended to the current working directory (or the `sourceRoot` if it exists).

Did this work before? N/A 

Chrome version: 67.0.3396.79  Channel: n/a
OS Version: OS X 10.13.0
Flash Version: 

I'd be fine with a quick fix that links to the generated code, and add support for `sourcesContent` in the future.
 

Comment 1 by l...@chromium.org, Jun 16 2018

Owner: kozy@chromium.org
Status: Assigned (was: Unconfirmed)
Status: WontFix (was: Assigned)
Based on spec [1] it looks like sources array should not contain null.
Spec explicitly declares that sourcesContent may contain nulls but does not say anything like this about sources array. At the same time any source should have url, with null in sources array it is not clear how we should generate this url.  

[1] https://sourcemaps.info/spec.html

Sign in to add a comment