Closed Bug 1941681 Opened 1 year ago Closed 1 year ago

Scripts from distinct content scripts are mixed in the debugger source tree and confuse

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(firefox-esr128 unaffected, firefox134 unaffected, firefox135 verified, firefox136 verified)

VERIFIED FIXED
136 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox134 --- unaffected
firefox135 --- verified
firefox136 --- verified

People

(Reporter: ochameau, Assigned: ochameau)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

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.

Set release status flags based on info from the regressing bug 1413872

Severity: -- → S3
Priority: -- → P2

This prevents debugging any global created after the content script target is initialized.
(possibly any other content script sandbox or same-process iframes)

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/51cb63ab8f1e [devtools] Only track content script sandbox global from the Content Script Targets. r=devtools-reviewers,nchevobbe
Regressions: 1942603
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch

Comment on attachment 9459925 [details]
Bug 1941681 - [devtools] Only track content script sandbox global from the Content Script Targets.

Beta/Release Uplift Approval Request

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
Attachment #9459925 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Comment on attachment 9459925 [details]
Bug 1941681 - [devtools] Only track content script sandbox global from the Content Script Targets.

Approved for 135.0b8.

Attachment #9459925 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

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.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: