WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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....
Nikita Vasilyev
Reported
2015-10-14 21:58:09 PDT
Controllers/SourceMapManager.js:51:23: CONSOLE ERROR
https://github.com/WebKit/webkit/blob/d800a51e54cec6616a559e3bb7d65749e2843c46/Source/WebInspectorUI/UserInterface/Controllers/SourceMapManager.js#L51
Steps: 1. Open
http://nv.github.io/webkit-inspector-bugs/react-0.14.0/examples/basic-click-counter/
Attachments
[PATCH] WIP - Has Issues
(2.42 KB, patch)
2015-10-20 16:47 PDT
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-10-14 21:58:24 PDT
<
rdar://problem/23121987
>
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.
Top of Page
Format For Printing
XML
Clone This Bug