Debugger doesn't break in late breakpoint for destroyed iframes
Categories
(DevTools :: Debugger, defect, P2)
Tracking
(firefox141 fixed)
| Tracking | Status | |
|---|---|---|
| firefox141 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
(Depends on 1 open bug, Blocks 2 open bugs)
Details
Attachments
(2 external files, 2 obsolete files)
Nicolas highlighted various cases of breakpoints being not functional when setting them on late event fired while the iframe is being destroyed.
See bug 1887852 comment 5.
STR:
- open https://ffx-devtools-late-visibilitychange.glitch.me/
- set breakpoint in unload or visibilitychange listeners
None of them are pausing the debugger, while these listeners actually run.
| Assignee | ||
Comment 1•2 years ago
|
||
The docshell should be observed only when "EveryFrameTarget" is off for the WindowGlobal Target Actor.
i.e. when followWindowGlobalLifeCycle is false and the target actor manages more than one WindowGlobal.
This docshell observing was destroying the target actor too early and was redundant with the code
managing WindowGlobal target actor lifecycle in the WindowGlobal Target Watcher class.
Also, in WindowGlobalTargetActor.window getter, we shouldn't ignore docshell that are being destroyed,
they are still valid when hitting a late breakpoint.
Updated•2 years ago
|
| Assignee | ||
Comment 2•2 years ago
|
||
The innerWindowId is used as an identifier for frame targets.
It ought to be unique and stable for a given target actor as this is used
in Resource forms as identifier for targets.
Also, getting a live getter may throw when accessing the window object's innerWindowId
when the document starts being destroyed (on iframe unload), but there is still relevant debugging
to be done against the WindowGlobal.
The checks in WindowGlobal Target Watchers were brittle as they were relying on the fact that
the WindowGlobalTargetActor's innerWindowId would be updated to the new WindowGlobal ID
when the BrowsingContext navigated to a new document. The findTargetActor method now uses
BrowsingContext ID to lookup for any existing Target Actor for the current BrowsingContext.
(this still uses WG innerWindowId for WG destruction codepath)
Updated•2 years ago
|
Comment 3•2 years ago
|
||
Comment on attachment 9398388 [details]
Bug 1892411 - [devtools] Use a fixed innerWindowId for WindowGlobal Target Actor.
Revision D208497 was moved to bug 1903980. Setting attachment 9398388 [details] to obsolete.
Comment 4•2 years ago
|
||
Comment on attachment 9397535 [details]
Bug 1892411 - [devtools] Only observe children docshell in browser toolbox and web extension targets.
Revision D207801 was moved to bug 1903980. Setting attachment 9397535 [details] to obsolete.
| Assignee | ||
Comment 5•2 years ago
|
||
The webnavigation-destroy / DocShell destruction was too early as it fired before the iframe unload listener are fired.
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 6•1 year ago
|
||
I rebased this old patch, this is actually a non trivial task. Delaying the WindowGlobal Target destruction actually cause various race conditions.
The worst I'm still struggling with is the fact that some late resources are being lost on navigation as they are now bound to the WindowGlobal we navigate away which is destroyed slightly later on navigation. It looks like such later resource are currently attached to the new WindowGlobal we navigate to.
Updated•1 year ago
|
| Assignee | ||
Comment 7•1 year ago
|
||
This code is unused since bug 1928510 landed.
| Assignee | ||
Comment 8•1 year ago
|
||
Cross platform try looks green enough, but we have quite a few intermittents:
https://treeherder.allizom.org/jobs?repo=try&revision=a862ab8b9072b15222d38e11be9444c422199ca0
Comment 10•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/7e3925807d9e
https://hg.mozilla.org/mozilla-central/rev/4e2da99404ac
Description
•