Scripts from distinct content scripts are mixed in the debugger source tree and confuse
Categories
(DevTools :: Debugger, defect, P2)
Tracking
(firefox-esr128 unaffected, firefox134 unaffected, firefox135 verified, firefox136 verified)
| Tracking | Status | |
|---|---|---|
| firefox-esr128 | --- | unaffected |
| firefox134 | --- | unaffected |
| firefox135 | --- | verified |
| firefox136 | --- | verified |
People
(Reporter: ochameau, Assigned: ochameau)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
|
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
Bug 1413872 introduced an issue with the following code:
https://searchfox.org/mozilla-central/rev/eb80f267aabbf90ac66ebbed77b6d33592eb2be0/devtools/server/actors/targets/content-script.js#54
It will accept any future global after the content script is instantiated, leading the confusing duplicated scripts in the source tree, as well as confusing stepping.
Comment 1•1 year ago
|
||
Set release status flags based on info from the regressing bug 1413872
Updated•1 year ago
|
| Assignee | ||
Comment 2•1 year ago
|
||
This prevents debugging any global created after the content script target is initialized.
(possibly any other content script sandbox or same-process iframes)
Updated•1 year ago
|
Updated•1 year ago
|
Comment 4•1 year ago
|
||
| bugherder | ||
| Assignee | ||
Comment 5•1 year ago
|
||
Comment on attachment 9459925 [details]
Bug 1941681 - [devtools] Only track content script sandbox global from the Content Script Targets.
Beta/Release Uplift Approval Request
- User impact if declined/Reason for urgency: The debugger goes completely off with duplicated scripts and duplicated steps when hitting a breakpoint and stepping.
- 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: * Install Violentmonkey https://addons.mozilla.org/firefox/addon/violentmonkey
- Install the userscript https://gist.github.com/deevroman/9a3ed7768766baf74347bef3545e6f33/raw/96ac306cba3a69169df1dd2e717584403227c68b/bug.user.js
- Open a debugger
- Open https://www.openstreetmap.org
- the debugger will pause, step forward
The debugger should step on the next line and within the same file.
Without this patch it will step on the same line, but a buggy duplicated source.
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): The fix is fixing an obvious mistake and is a single line change.
- String changes made/needed:
- Is Android affected?: Yes
| Assignee | ||
Updated•1 year ago
|
Comment 6•1 year ago
|
||
Comment on attachment 9459925 [details]
Bug 1941681 - [devtools] Only track content script sandbox global from the Content Script Targets.
Approved for 135.0b8.
Updated•1 year ago
|
Updated•1 year ago
|
Comment 8•1 year ago
|
||
Verified as Fixed. Tested on the latest Nightly (136.0a1/20250122165122) and Beta (135.0b8/20250122091721) under Windows 10 x64 and Ubuntu 24.04 LTS.
The debugger will now properly step on the next line within the same file and will no longer step on the same line from within a duplicated source.
Description
•