Iframe dropdown is always empty when using server side targets
Categories
(DevTools :: Framework, defect)
Tracking
(Fission Milestone:MVP, firefox92 fixed)
Tracking | Status | |
---|---|---|
firefox92 | --- | fixed |
People
(Reporter: ochameau, Assigned: nchevobbe)
References
Details
(Whiteboard: dt-fission-m3-mvp)
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
When enabling server side target switching devtools.target-switching.server.enabled=true
, the iframe dropdown misbehaves. It no longer live updates because of doNotFireFrameUpdates: true
flag we set on all server side targets:
https://searchfox.org/mozilla-central/search?q=doNotFireFrameUpdates&path=&case=true®exp=false
It is then only updated once, on target switching:
https://searchfox.org/mozilla-central/source/devtools/client/framework/toolbox.js#731
It was probably not the right call to disable these events and we should try to enable them again for server side targets, but only for top level targets.
We may also benefit from using resources. But it may rather be worth trying to reimplement the iframe dropdown to be based on top of targets + TargetCommand + target switching rather than the hack on BrowsingContextTargetActor.
Reporter | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Reporter | ||
Comment 1•3 years ago
|
||
The iframe dropdown works if you open the toolbox against an already loaded page.
And in this bug we consider that fission is disabled. The dropdown is known to be broken for OOP iframe and that's another quest (bug 1608054).
With server targets, the iframe dropdown no longer works correctly for same-process iframes, so even when fission is off.
STR:
- Open DevTools
- Load http://techno-barje.fr/fission/wiki-n-ubuntu/
- Open DevTools
[* if you use the iframe drop down, it will work correctly here] - Reload the page
- If you use the iframe dropdown, it won't work and you will have the following exception:
console.error: "Error while calling actor 'frameTarget's method 'switchToFrame'" "The related docshell is destroyed or not found"
JavaScript error: resource://devtools/shared/protocol/Front.js, line 362: Error: Protocol error (noWindow): The related docshell is destroyed or not found from: server0.conn1.windowGlobal4294967309/frameTarget1
This is most likely related to this disabling:
https://searchfox.org/mozilla-central/rev/352b525ab841278cd9b3098343f655ef85933544/devtools/server/connectors/js-window-actor/DevToolsFrameChild.jsm#346
which prevents correctly updating the iframe drop down with the right outerWindowIDs.
Comment 2•3 years ago
|
||
This bug is a soft blocker for Fission MVP. We'd like to fix it before our Release channel rollout, but we won't delay the rollout waiting for it.
Assignee | ||
Comment 3•3 years ago
|
||
We used to set doNotFireFrameUpdates on all the target actors
created from the server, and as a result, we would never populate
the iframe dropdown.
The original concern was that since we can have multiple targets
now (when fission is enabled), different frameUpdate events would
be fired which would cause issues in the iframe dropdown.
But at the moment, we know that the iframe dropdown does not support
Fission (remote frames are not displayed), as the toolbox only listen
for frame-update events emitted from the top-level target.
With this patch, we'll emit frameUpdate event only from top-level targets,
so we don't send unnecessary RDP packet to client.
A test is added that checks multiple scenarios with pages adding and
removing iframes, as well as navigating so we can assert the dropdown
berhaviour with server side targets.
The test is tagged as fail-if on Fission as we're missing remote frames
in the dropdown.
Updated•3 years ago
|
Comment 5•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•