Closed Bug 1709267 Opened 3 years ago Closed 2 years ago

Support target switching for about:debugging tab debugging

Categories

(DevTools :: about:debugging, defect, P3)

defect

Tracking

(Fission Milestone:Future, firefox-esr91 wontfix, firefox94 wontfix, firefox95 wontfix, firefox96 fixed)

RESOLVED FIXED
96 Branch
Fission Milestone Future
Tracking Status
firefox-esr91 --- wontfix
firefox94 --- wontfix
firefox95 --- wontfix
firefox96 --- fixed

People

(Reporter: jdescottes, Assigned: ochameau)

References

(Blocks 3 open bugs)

Details

(Whiteboard: dt-perf-stability-mvp)

Attachments

(4 files, 1 obsolete file)

When debugging tabs (remotely or not) from about:debugging, target switching is not supported.

If the target navigates and changes process, the about:devtools-toolbox that was debugging it will "close" (the tab will still be around but it will show an error message).

Prerequisite:

  • enable fission
  • check that local tab debugging is enabled (devtools.aboutdebugging.local-tab-debugging to true)

STRs:

  • open a tab on wikipedia.org
  • open about:debugging in another tab
  • select This Nightly (or This Firefox)
  • click on Inspect for the wikipedia.org tab
  • (an about:devtools-toolbox tab will open and show a toolbox debugging the wikipedia tab)
  • navigate the wikipedia.org tab to mozilla.org (either from the about:debugging UI or from the real URL bar, doesn't matter)

ER: The toolbox should still be displayed
AR: The about:devtools-toolbox tab will now show an error message

Once we support target switching for about:debugging, we should be able to remove the isLocalTab check at https://searchfox.org/mozilla-central/rev/185ab5e4f4e01341e009cd4633d1275ffe4d4c8b/devtools/client/fronts/descriptors/tab.js#165

Severity: -- → S3
Priority: -- → P3
Fission Milestone: --- → MVP
Whiteboard: dt-fission-m3-triage → dt-fission-m3-mvp
Fission Milestone: MVP → Future
Whiteboard: dt-fission-m3-mvp → dt-fission-m4-mvp
Depends on: 1712268
Whiteboard: dt-fission-m4-mvp → dt-fission-m4-mvp, dt-perf-stability-mvp
Whiteboard: dt-fission-m4-mvp, dt-perf-stability-mvp → dt-perf-stability-mvp

This wasn't used except for a test and wasn't working with server side targets.
Making this compatible with SST wasn't trivial, so I went for removing this.

Assignee: nobody → poirot.alex
Blocks: 1741484
Blocks: 1741486
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/88f46043876e
[devtools] Remove unused "target" query parameter from toolbox location. r=jdescottes
https://hg.mozilla.org/integration/autoland/rev/e4dc58404c6c
[devtools] Add support for target switching in about:debugging. r=jdescottes

Backed out for causing devtools failures

Flags: needinfo?(poirot.alex)

I think I got rid of all the failures now:
https://treeherder.mozilla.org/jobs?repo=try&revision=a5c75c0de083510622ba85f446e7aee8df78b986
Hopefully no other intermittent will appear.

Flags: needinfo?(poirot.alex)
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ec5eb72262cc
[devtools] Remove unused "target" query parameter from toolbox location. r=jdescottes
https://hg.mozilla.org/integration/autoland/rev/da9d3297348d
[devtools] Add support for target switching in about:debugging. r=jdescottes

Backed out for causing dt failures in browser_about-devtools-toolbox_reload.js

Backout link: https://hg.mozilla.org/integration/autoland/rev/1f6ee488fb6bdc3d7b8bb18d0ad7c1b5ce141939

Push with failures

Failure log

Flags: needinfo?(poirot.alex)

We ended up having duplicated JSWindowActorTransport's when detaching the target.
This only reproduces in case of remote debugging, where we detach/destroy the top target
when closing the toolbox. And we later reuse the same DevToolsClient to spawn a new
WindowGlobalTargetActor, with a new Transport.
But as the old transport was still around, we ended up duplicating the packets.

In this patch, I'm also tuning WindowGlobalTargetActor.destroy to avoid crashing
if the target wasn't attached when we destroy it, and avoid trying to destroy
twice if destroy is reentrant.

We ended up having duplicated JSWindowActorTransport's when detaching the target.
This only reproduces in case of remote debugging, where we detach/destroy the top target
when closing the toolbox. And we later reuse the same DevToolsClient to spawn a new
WindowGlobalTargetActor, with a new Transport.
But as the old transport was still around, we ended up duplicating the packets.

In this patch, I'm also tuning WindowGlobalTargetActor.destroy to avoid crashing
if the target wasn't attached when we destroy it, and avoid trying to destroy
twice if destroy is reentrant.

Flags: needinfo?(poirot.alex)
Attachment #9252598 - Attachment is obsolete: true
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cd7440c8b49b
[devtools] Remove unused "target" query parameter from toolbox location. r=jdescottes
https://hg.mozilla.org/integration/autoland/rev/eb3b0be05e16
[devtools] Fix duplicated transports when detaching the top target. r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/8f2bd81028da
[devtools] Add support for target switching in about:debugging. r=jdescottes

Setting status-firefox95=wontfix because I assume we don't need to uplift target switching to Beta 95.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: