Closed
Bug 1346936
Opened 8 years ago
Closed 8 years ago
Support "SourceMap" header (along with" X-SourceMap")
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: fs, Assigned: tromey)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
It looks like bug 765993 introduced the X-SourceMap header.
WebKit also supports just "SourceMap", https://bugs.webkit.org/show_bug.cgi?id=114888
Unsure what Chrome does, but maybe we want to support the unprefixed version, too.
Assignee | ||
Updated•8 years ago
|
Blocks: source-maps
Assignee | ||
Comment 1•8 years ago
|
||
I think we do want to support it.
X-SourceMap is deprecated:
https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/
Assignee: nobody → ttromey
Comment hidden (mozreview-request) |
Comment 3•8 years ago
|
||
mozreview-review |
Comment on attachment 8867810 [details]
Bug 1346936 - support SourceMap header in addition to X-SourceMap;
https://reviewboard.mozilla.org/r/139326/#review142712
Code-wise, looks great!
Can you please send an intent to ship for this to dev-platform as per https://wiki.mozilla.org/WebAPI/ExposureGuidelines? Thanks!
::: dom/script/ScriptLoader.cpp:2736
(Diff revision 1)
>
> nsAutoCString sourceMapURL;
> + rv = httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("SourceMap"), sourceMapURL);
> + if (NS_FAILED(rv)) {
> - rv = httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("X-SourceMap"), sourceMapURL);
> + rv = httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("X-SourceMap"), sourceMapURL);
> + }
Do other UAs have this exact behavior (using SourceMap header and ignoring X-SourceMap if that exists, and otherwise falling back to X-SourceMap)? I'm r+ing based on this assumption.
I'd appreciate if you can please clarify the specifcs in the intent to ship thread.
Attachment #8867810 -
Flags: review?(ehsan) → review+
Assignee | ||
Comment 4•8 years ago
|
||
> Do other UAs have this exact behavior (using SourceMap header and ignoring X-SourceMap if that exists, and otherwise falling back to X-SourceMap)? I'm r+ing based on this assumption.
I found this in chromium:
https://chromium.googlesource.com/chromium/src/third_party/+/master/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp#57
Still cloning webkit to dig in there, but given the path name, I would assume it does the same.
Comment 5•8 years ago
|
||
(In reply to Tom Tromey :tromey from comment #4)
> > Do other UAs have this exact behavior (using SourceMap header and ignoring X-SourceMap if that exists, and otherwise falling back to X-SourceMap)? I'm r+ing based on this assumption.
>
> I found this in chromium:
>
> https://chromium.googlesource.com/chromium/src/third_party/+/master/WebKit/
> Source/bindings/core/v8/ScriptSourceCode.cpp#57
Thanks for checking!
> Still cloning webkit to dig in there, but given the path name, I would
> assume it does the same.
If you mean the /WebKit/ in the path name, that doesn't mean much of anything any more after Blink forked WebKit. Not much more than "ns" in our class names meaning NetScape. :-)
Assignee | ||
Comment 6•8 years ago
|
||
> If you mean the /WebKit/ in the path name, that doesn't mean much of anything any more after Blink forked WebKit
Thanks. I didn't know how much overlap there might still be.
Webkit does the same, see:
https://github.com/WebKit/webkit/blob/master/Source/WebCore/inspector/PageDebuggerAgent.cpp#L82-L88
I'll send the intent email soon.
Comment 7•8 years ago
|
||
Awesome, thanks for checking!
Pushed by ttromey@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5ea7440b56ab
support SourceMap header in addition to X-SourceMap; r=Ehsan
Comment 9•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Reporter | ||
Comment 10•8 years ago
|
||
Developer release notes
https://developer.mozilla.org/en-US/Firefox/Releases/55#Developer_Tools
Reference page
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/SourceMap
Compat data
https://github.com/mdn/browser-compat-data/pull/229
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•