Bug 154303 - JSContext Inspector: Support for inline source maps
Summary: JSContext Inspector: Support for inline source maps
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks: 145150
  Show dependency treegraph
 
Reported: 2016-02-16 11:42 PST by Joseph Pecoraro
Modified: 2016-02-22 11:23 PST (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (17.02 KB, patch)
2016-02-16 11:51 PST, Joseph Pecoraro
timothy: review+
Details | Formatted Diff | Diff
[PATCH] For Landing (17.08 KB, patch)
2016-02-16 12:27 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2016-02-16 11:42:07 PST
* SUMMARY
Support for inline source maps in JSContext inspection.

We should be able to handle a sourceMappingURL that is a dataURL with inline `sourcesContent`!

* TEST
//# sourceMappingURL=data:application/json;base64,ewogICAgInZlcnNpb24iOiAzLAogICAgImZpbGUiOiAiY29tYmluZWQubWluLmpzLnRtcCIsCiAgICAic291cmNlcyI6IFsic2NyaXB0LTEuanMiLCAic2NyaXB0LTIuanMiXSwKICAgICJzb3VyY2VzQ29udGVudCI6IFsiLy8gTm90aGluZyBzcGVjaWFsIHRvIHNlZSBoZXJlLlxuZnVuY3Rpb24gbm90aGluZ1NwZWNpYWxUb1NlZUhlcmUxKCkge1xuICAgIGNvbnNvbGUubG9nKFwibm90aGluZ1NwZWNpYWxUb1NlZUhlcmUxXCIpO1xufSIsICIvLyBOb3RoaW5nIHNwZWNpYWwgdG8gc2VlIGhlcmUuXG5mdW5jdGlvbiBub3RoaW5nU3BlY2lhbFRvU2VlSGVyZTIoKSB7XG4gICAgY29uc29sZS5sb2coXCJub3RoaW5nU3BlY2lhbFRvU2VlSGVyZTJcIik7XG59Il0sCiAgICAibmFtZXMiOiBbIm5vdGhpbmdTcGVjaWFsVG9TZWVIZXJlMSIsICJjb25zb2xlIiwgImxvZyIsICJub3RoaW5nU3BlY2lhbFRvU2VlSGVyZTIiXSwKICAgICJtYXBwaW5ncyI6ICJBQUNBLFFBQVNBLDRCQUNMQyxRQUFRQyxJQUFJLDRCQ0RoQixRQUFTQyw0QkFDTEYsUUFBUUMsSUFBSSIKfQo=

* DECODED
{
    "version": 3,
    "file": "combined.min.js.tmp",
    "sources": ["script-1.js", "script-2.js"],
    "sourcesContent": ["// Nothing special to see here.\nfunction nothingSpecialToSeeHere1() {\n    console.log(\"nothingSpecialToSeeHere1\");\n}", "// Nothing special to see here.\nfunction nothingSpecialToSeeHere2() {\n    console.log(\"nothingSpecialToSeeHere2\");\n}"],
    "names": ["nothingSpecialToSeeHere1", "console", "log", "nothingSpecialToSeeHere2"],
    "mappings": "AACA,QAASA,4BACLC,QAAQC,IAAI,4BCDhB,QAASC,4BACLF,QAAQC,IAAI"
}
Comment 1 Joseph Pecoraro 2016-02-16 11:42:19 PST
<rdar://problem/24670392>
Comment 2 Joseph Pecoraro 2016-02-16 11:51:24 PST
Created attachment 271462 [details]
[PATCH] Proposed Fix
Comment 3 Timothy Hatcher 2016-02-16 12:13:04 PST
Comment on attachment 271462 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=271462&action=review

> Source/WebInspectorUI/UserInterface/Controllers/SourceMapManager.js:118
> +        // COMPATIBILITY (iOS 7): Network.loadResource did not exist.

Add a similar comment to the one in SourceMapResource.js about JavaScript Debuggables.
Comment 4 Joseph Pecoraro 2016-02-16 12:27:13 PST
Created attachment 271467 [details]
[PATCH] For Landing
Comment 5 WebKit Commit Bot 2016-02-16 13:17:30 PST
Comment on attachment 271467 [details]
[PATCH] For Landing

Clearing flags on attachment: 271467

Committed r196654: <http://trac.webkit.org/changeset/196654>