Closed
Bug 885597
Opened 9 years ago
Closed 9 years ago
absolute urls not working with sourcesContent and source maps in file:// urls
Categories
(DevTools :: Debugger, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 24
People
(Reporter: fitzgen, Assigned: fitzgen)
Details
Attachments
(1 file)
4.57 KB,
patch
|
dcamp
:
review+
|
Details | Diff | Splinter Review |
Test case here: https://gist.github.com/int3/5769221 debugger should display "foo", not "nothing here".
Assignee | ||
Comment 1•9 years ago
|
||
Works when I serve the directory via `python -m SimpleHTTPServer`, seems to only be failing for file:// urls.
Summary: absolute urls not working with sourcesContent and source maps still → absolute urls not working with sourcesContent and source maps in file:// urls
Assignee | ||
Comment 2•9 years ago
|
||
So after looking into this more, I believe we have the correct behavior. If our root is "file:///Users/fitzgen/scratch/int3/" then there is no hostname (file URIs don't have them) and the path is "/Users/fitzgen/scratch/int3/". Resolving the absolute path "/a" to our root, we replace the existing path with our new one and get "file:///a". This is maybe confusing for people who think that if they load "file:///Users/fitzgen/scratch/int3/foo.html" then "/foo.html" is the path, and "/Users/fitzgen/scratch/int3" is the hostname. But that isn't how file:// URIs work. However, when I open the same file URI in Chrome, it does source map the contents. Funny enough, it still names the source "file:///a". We could possibly fix this by not setting sourceRoot when we fetch the source map, and then we can special case this code if we want.
Assignee | ||
Comment 3•9 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=0a898dc75a21
Attachment #766113 -
Flags: review?(dcamp)
Assignee | ||
Comment 4•9 years ago
|
||
See https://github.com/mozilla/source-map/pull/65 as well.
Comment 5•9 years ago
|
||
Is this what chrome is doing in that case?
Assignee | ||
Comment 6•9 years ago
|
||
(In reply to Dave Camp (:dcamp) from comment #5) > Is this what chrome is doing in that case? Yes
Updated•9 years ago
|
Attachment #766113 -
Flags: review?(dcamp) → review+
Assignee | ||
Comment 7•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/9c3576b13848
Whiteboard: [fixed-in-fx-team]
Comment 8•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/9c3576b13848
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 24
Updated•4 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•