Closed Bug 1728587 Opened 3 years ago Closed 2 years ago

Duplicate breakpoints on iframe reload

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(firefox100 verified)

VERIFIED FIXED
100 Branch
Tracking Status
firefox100 --- verified

People

(Reporter: bomsy, Assigned: bomsy)

References

(Blocks 4 open bugs)

Details

(Whiteboard: dt-fission-future, dt-perf-stability-mvp)

Attachments

(2 files, 3 obsolete files)

Prefs:

  • fission.autostart => true
  • devtools.target-switching.server.enabled => true
  • fission.bfcacheInParent => true
  1. Load http://softwareishard.com/tests/fission/case1/index.html
  2. Create regular BP in odvarko.com.js, in postRequest method, e.g. line 4
  3. Check out the Breakpoints side panel, the BP is there
  4. Right click on the frame and pick "This Frame -> Reload Frame"
  5. Check out the Breakpoints side panel.

AR
The BP is there twice => ERR

ER
There should only be one BP

Note:
Each reload adds a new breakpoint.

See Also: → 1717802
Whiteboard: dt-fission-future, dt-perf-stability-triage → dt-fission-future, dt-perf-stability-mvp

I have STRs for duplicated breakpoints, but with the Browser Toolbox.

Here are my STRs:

  • open Firefox on any page (eg the default about:newtab)
  • open DevTools on the Console panel
  • open the Multiprocess Browser Toolbox
  • in the MBT, open the Debugger, find the source resource://devtools/server/actors/resources/console-messages.js
  • set a breakpoint at L216 (in prepareConsoleMessageForRemote, const result = WebConsoleUtils.cloneObject(message);)
  • (Note at this point only one log is displayed in the UI)
  • (optional) in Firefox's DevTools Toolbox, run console.trace()
  • (optional) in the MBT, after the breakpoint got hit, resume (here already, you should only have to resume once but you have to resume twice)
  • finally, to get the duplicated breakpoints: close the MBT, and reopen it

ER: You should only see one breakpoint
AR: There are 3 identical breakpoints listed in the breakpoints panel. Every time you restart the MBT there is an additional breakpoint. However if you run console.trace() again, you will still only have to resume twice, regardless of the number of breakpoints displayed in the UI.

Assignee: nobody → hmanilla
Status: NEW → ASSIGNED
See Also: → 1734768
Attachment #9241743 - Attachment is obsolete: true

The issue here was that we only cleanup resources relating to all the targets
on NAVIGATE which fires on the top-level document on reload / navigate. This
is not done for the resources relating to the specific target i.e when reloading
a specific remote iframe. This patch fixes tries to fix that.

Depends on D130866

This adds thread information to sources (generated, original and pretty-printed-original), tabs and breakpoints
as its already done with source actors. This will make it easy to apply retrieve and cleanup these resources
based on their thread info without having to do a lot of work. Might help improve perfomance is some of
the complex selectors.

Blocks: 1749767

Comment on attachment 9265675 [details]
Bug 1728587 - [devtools] Add thread informaation to some debugger resources

Revision D139810 was moved to bug 1757375. Setting attachment 9265675 [details] to obsolete.

Attachment #9265675 - Attachment is obsolete: true

Comment on attachment 9265676 [details]
Bug 1728587 - [devtools] Add a function to unifying the shape of the breakpoint

Revision D139811 was moved to bug 1757379. Setting attachment 9265676 [details] to obsolete.

Attachment #9265676 - Attachment is obsolete: true
Blocks: 1759436
Pushed by hmanilla@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a72d1f65d39f
[devtools] Fix to stop duplicating breakpoints on remote iframe reload r=ochameau
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
Regressions: 1759502
Flags: qe-verify+
Attached image image.png

Reproduced the issue with Firefox 93.0a1 on Windows 10x64 using steps from comment 0 and comment 2.
The issue is verified fixed with Firefox 100.0b8 (20220419190903) on Windows 10 for the scenario from step 0.
I cannot verify the fix for the scenario from comment 2 because the (pid) extension does not show inside the MBT and I cannot navigate to resource://devtools/server/actors/resources/console-messages.js.

Does anyone know if there is a pref that enables PIDs to be displayed inside the MBT on Beta as in Nightly? Thank you in advance!

Hi Alex,

I cannot verify the fix for the scenario from comment 2 because the (pid) extension does not show inside the MBT and I cannot navigate to resource://devtools/server/actors/resources/console-messages.js.

Worth mentioning ... the scenario in comment 2 is a slightly different issue. I created a separate bug for it in Bug 1759436 and its likely not fixed yet. I should have added a comment when i moved the issue (my fault).

So maybe it can be ignored for verifying this is fixed.

Thanks a lot.

Regressions: 1774583

Reproduced this issue on an affected nightly build 93.0a1 (20210901091701) on Win 10, using the STR from Comment 0.
Verified as fixed on Firefox 100.0.2 (20220519220738) and 106.0 on Win 10. Ubuntu 21.04 and macOS 10.15.

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: