New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 614863 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 581017
Owner:
Last visit > 30 days ago
Closed: Jul 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

Linkifying stack traces does not apply source maps

Reported by mar...@probst.io, May 25 2016

Issue description

Chrome Version       : 50.0.2661.102
OS Version: OS X 10.11.5

What steps will reproduce the problem?
1. Produce a file with a source map, for simplicities sake inline. Have the sourceMappingURL contain a file name, e.g. "foo.ts" (TypeScript in my use case).

blah blah
//# sourceMappingURL=data:application/json;base64,ey...
//# sourceURL=http://some/absolute/path/foo.js

Note that the sourceURL is different from the sourceMappingURL. sourceURL is needed so that we get anything reasonable in the stack trace at all, as the file is served using the eval()/sourceURL trick. I don't think  that affects the issue though.

2. Have it throw an exception

3. Observe the stack trace applies sourceURL, but not sourceMappingURL:

Pow!
    at Object.eval (http://some/absolute/path/foo.js:38:44)

What is the expected result?

Pow!
    at Object.eval (http://some/absolute/path/foo.ts:12:20)

I.e. apply the sourceMappingURL to the stack trace, not just the sourceURL


What happens instead of that?

Pow!
    at Object.eval (http://some/absolute/path/foo.js:38:44)

sourceURL is applied, but not sourceMappingURL.

UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36

 

Comment 1 by mar...@probst.io, May 25 2016

Pavel says:

"""
We need raw location (script id) to resolve the source map. We'll resolve all the error messages, live error objects, etc, but we won't resolve the linkified text.

We probably could do that in your case - the url is complete and we can map it optimistically to the parsed script id. Could you file a bug for the at crbug.com/new? The fix would be to look up the script by url and target, fetch its id and use linkifyScriptLocation at https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js&q=Linkifi&sq=package:chromium&l=165.
"""
Components: Platform>DevTools
Owner: kozyatinskiy@chromium.org
Status: Assigned (was: Unconfirmed)
Because somebody asked, sourceURL is different from the file from sourceMappingURL here - the point is that it's different, and the sourceMappingURL should prevail.
Mergedinto: 581017
Status: Duplicate (was: Assigned)

Sign in to add a comment