Prettified file from Console links to buggy view-source: link
Categories
(DevTools :: Console, defect, P1)
Tracking
(firefox-esr60 unaffected, firefox-esr68 unaffected, firefox67 unaffected, firefox68 unaffected, firefox69 unaffected, firefox70 unaffected, firefox71+ verified, firefox72 verified)
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox-esr68 | --- | unaffected |
firefox67 | --- | unaffected |
firefox68 | --- | unaffected |
firefox69 | --- | unaffected |
firefox70 | --- | unaffected |
firefox71 | + | verified |
firefox72 | --- | verified |
People
(Reporter: Harald, Assigned: nchevobbe)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
98.75 KB,
image/png
|
Details | |
47 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
|
Details | Review |
What were you doing?
- Opened Console on https://debugger-pretty-print-events-1532240.glitch.me/
- Clicked on
Added click handler compressed.js:150788
- Pretty-printed file
- Back to console
- Click the same message as before
What happened?
view-source
opens and gets confused by the :formatted
appendix.
What should have happened?
Open pretty file in Debugger.
Anything else we should know?
Do you have extensions installed? You can also go to about:support
in another window or tab and attach the report it generates to this bug.
Reporter | ||
Comment 1•5 years ago
|
||
Works in Dev Edition. Any ideas which recent work broke this?
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 2•5 years ago
|
||
Nicolas had an idea for where this issue might have been introduced.
Assignee | ||
Comment 3•5 years ago
|
||
It looks like Bug 1587839 regressed this, since this seems to fix the issue:
diff --git a/devtools/client/framework/source-map-url-service.js b/devtools/client/framework/source-map-url-service.js
--- a/devtools/client/framework/source-map-url-service.js
+++ b/devtools/client/framework/source-map-url-service.js
@@ -324,7 +324,7 @@ SourceMapURLService.prototype._callOneCa
const { line, column, sourceUrl, sourceId } = resolvedLocation;
// In case we're racing a pref change, pass the current value
// here, not plain "true".
- callback(this._prefValue, sourceUrl, line, column, sourceId);
+ callback(this._prefValue, sourceUrl, line, column);
}
};
This also affects jump-to-function-definition buttons, and probably anything else that passes a mapped url and sourceId to viewSourceInDebugger
.
Pretty-printed sources fail the sourceMapService.hasOriginalURL()
check on line 80 and fall through to view-source
, because when a source map is manually added using applySourceMap, devtools-source-map does not add its URLs to originalURLs
.
Looking at how it's used I think it would be safe to always add original URLs, but I don't trust my intuition on this. In any event it would likely be safer to not pass sourceId.
Updated•5 years ago
|
Updated•5 years ago
|
Reporter | ||
Comment 5•5 years ago
|
||
Nicolas mentioned that this would be on Console to fix. Assigning as he had the regressed code pointed out already.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
crap, I didn't notice I made the regression fix in Bug 1587839 :/
Assignee | ||
Comment 7•5 years ago
|
||
This revert the changes made in Bug 1587839, except the added test.
The safer fix to be uplifted is to only fix the original issue
in the SmartTrace component, where we remove any sourceId we might
have when creating the new mapped frame.
We also modify the browser_dbg-pretty-print-console test to ensure
clicking on a prettified location in the console does open the
debugger with the expected location.
Comment 9•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 10•5 years ago
|
||
Comment on attachment 9104197 [details]
Bug 1589346 - Fix navigation to debugger from console on prettified sources. r=loganfsmyth.
Beta/Release Uplift Approval Request
- User impact if declined: User won't be able to navigate to a prettified javascript source from the WebConsole in DevTools, making it feel broken
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: See steps from https://bugzilla.mozilla.org/show_bug.cgi?id=1589346#c0
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): The patch introducing the regression was reverted, and the fix was made much smaller in scope, while keeping the test that was introduced.
A new test was added to ensure the regression was also fixed and we don't regress. - String changes made/needed:
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 11•5 years ago
|
||
Reproduced the issue on affected Beta 71.0b4 on Windows 10
Verified-fixed on latest Firefox Nightly 72.0a1 (2019-10-27) (64-bit) on Windows 10, MacOS 10.15 and Ubuntu 18.04.
The pretty file is loaded and opened in the Debugger after clicking on compressed.js:formatted:150788
Waiting for fix and Uplift to Beta 71.
Updated•5 years ago
|
Comment 12•5 years ago
|
||
Comment on attachment 9104197 [details]
Bug 1589346 - Fix navigation to debugger from console on prettified sources. r=loganfsmyth.
Low risk fix for a 71 regression in devtools, on nightly for a few days, covered by tests and verified by QA on nghtly, uplift approved for 71 beta 6, thanks.
Comment 13•5 years ago
|
||
bugherder uplift |
Comment 14•5 years ago
|
||
Verified- fixed on the latest Beta 71.0b6 20191030153225 on Windows 10, MacOS 10.15 and Ubuntu 18.04.
Marking this as Verified - fixed.
Description
•