Closed Bug 1360357 Opened 8 years ago Closed 7 years ago

Inline sourcemap is causing request for resource.

Categories

(DevTools :: Framework, defect, P2)

54 Branch
x86_64
macOS
defect

Tracking

(firefox55 fixed)

RESOLVED FIXED
Firefox 55
Tracking Status
firefox55 --- fixed

People

(Reporter: mastrauckas, Assigned: tromey)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0 Build ID: 20170418004027 Steps to reproduce: Have an inline sourcemap in a javascript file as example: sourceMappingURL=data:application/json;charset=utf-8;base64,<sourcemap> In the html file add script file that points to javascript file with inline source map. Call html file. Actual results: When loading page it made a call to get sourcemap file which causes a http 404. Expected results: Since its a inline source file I expect it not to make a call for sourcemap file.
OS: Unspecified → Mac OS X
Hardware: Unspecified → x86_64
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
The bug here is that the definition of isURL in source-maps is incorrect. https://github.com/devtools-html/devtools-core/blob/master/packages/devtools-source-map/src/path.js#L12-L14 In particular it doesn't recognize data: URLs.
Assignee: nobody → ttromey
Blocks: source-maps
Component: JavaScript Engine → Developer Tools: Framework
Priority: -- → P2
Product: Core → Firefox
Status: UNCONFIRMED → NEW
Ever confirmed: true
See https://github.com/devtools-html/devtools-core/pull/371 After that, and the follow-up to bump the revision, I'll land it in M-C.
Depends on: 1364839
I plan to add a new integration test here, so not marking as a dup of the devtools-source-map bug.
New version will use some stuff introduced in the other bug.
Depends on: 1365371
Comment on attachment 8868245 [details] Bug 1360357 - add test for inline source maps; https://reviewboard.mozilla.org/r/139822/#review143218 Thanks for adding the test! ::: devtools/client/framework/test/code_inline_original.js:6 (Diff revision 2) > +/* Any copyright is dedicated to the Public Domain. > + http://creativecommons.org/publicdomain/zero/1.0/ */ > + > +// Original source code for the inline source map test. > +// The generated file was made with > +// webpack --devtool inline-source-map code_inline_original.js code_inline_bundle.js thanks for including that comment :)
Attachment #8868245 - Flags: review?(jdescottes) → review+
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again. hg error in cmd: hg rebase -s 4075c099444c -d 3885392de7d9: rebasing 396281:4075c099444c "Bug 1360357 - add test for inline source maps; r=jdescottes" (tip) merging devtools/client/framework/test/browser.ini warning: conflicts while merging devtools/client/framework/test/browser.ini! (edit, then use 'hg resolve --mark') unresolved conflicts (see hg resolve, then hg rebase --continue)
Pushed by ttromey@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/495ed740cb70 add test for inline source maps; r=jdescottes
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Depends on: 1366442
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: