[Webkit-unassigned] [Bug 150156] Web Inspector: console.assert inside WebInspector.SourceMapManager.prototype.downloadSourceMap fails

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 20 16:46:47 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=150156

--- Comment #2 from Joseph Pecoraro <joepeck at webkit.org> ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151020/dc41bc26/attachment.html>


More information about the webkit-unassigned mailing list