Debugger doesn't break in late breakpoint for destroyed iframes
Categories
(DevTools :: Debugger, defect, P2)
Tracking
(Not tracked)
People
(Reporter: ochameau, Assigned: ochameau)
References
(Depends on 1 open bug)
Details
Attachments
(1 file, 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•7 months 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•7 months ago
|
Assignee | ||
Comment 2•7 months 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•5 months ago
|
Comment 3•5 months 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•5 months 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•5 months ago
|
||
The webnavigation-destroy / DocShell destruction was too early as it fired before the iframe unload listener are fired.
Description
•