NEW 150156
Web Inspector: console.assert inside WebInspector.SourceMapManager.prototype.downloadSourceMap fails
https://bugs.webkit.org/show_bug.cgi?id=150156
Summary Web Inspector: console.assert inside WebInspector.SourceMapManager.prototype....
Attachments
[PATCH] WIP - Has Issues (2.42 KB, patch)
2015-10-20 16:47 PDT, Joseph Pecoraro
no flags
Radar WebKit Bug Importer
Comment 1 2015-10-14 21:58:24 PDT
Joseph Pecoraro
Comment 2 2015-10-20 16:46:47 PDT
The issue here is that the "//# sourceMappingURL=..." directive is inside of an unnamed evaluation (essentially `eval`). It seems what is happening in this example is: 1. <script type="text/babel" src="main.jsx"></script> => downloads and shows main.jsx resource 2. Babel finds all "text/babel" => XHR to re-request the main.jsx resource 3. Babel transforms and evaluates the main.jsx source in an eval with source map => eval(...) with SourceMap references "main.jsx" resource So we have a particularly ugly situation here. (1) shows up as a resource but didn't really do anything, (2) shows up as a benign resource because its mime type is "text/jsx" and we don't understand that, (3) is the actual JavaScript executed but we don't show it because there was no resource name (no sourceURL for example). The WIP patch shows unnamed evals that had a sourceMappingURL and forces other parts of the code to work but still has issues. Namely: (1) duplication of resources in the sidebar don't match expectations, (2) breakpoints don't actually work.
Joseph Pecoraro
Comment 3 2015-10-20 16:47:21 PDT
Created attachment 263634 [details] [PATCH] WIP - Has Issues
Note You need to log in before you can comment on or make changes to this bug.