Closed Bug 1628325 Opened 3 months ago Closed 1 month ago

Handle session restore ("zombie") tabs when connecting to remote Firefox Desktop

Categories

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

task

Tracking

(firefox79 fixed)

RESOLVED FIXED
Firefox 79
Tracking Status
firefox79 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

Details

Attachments

(4 files)

We had custom code in DevTools to handle zombie tabs and "unzombify" such tabs before connecting to them.

However as :agi pointed out with https://phabricator.services.mozilla.com/D70119 (Bug 1628117), this code was only working for Fennec but useless with GeckoView.

I don't know if we will have a replacement for GecokView, but this also means that we don't handle zombie tabs correctly for Firefox Desktop.

To get zombie tabs on Firefox Desktop:

  • open Firefox
  • open a few tabs on different websites
  • open a tab on about:debugging -> This Firefox
  • close and reopen Firefox
  • History > Restore Previous Session

At this point, after Bug 1618691 lands, you should see all the tabs in about:debugging.
They will be missing the URL, because or "zombie tab url" logic only works on Fennec. Seems like we could instead use to get the URL:

  _getZombieTabUrl() {
    return this._browser.currentURI.displaySpec;
  },

But the unzombify logic in the TabDescriptor is again Fennec only (https://searchfox.org/mozilla-central/rev/a707541ff423ade0d81cef6488e6ecfa09273886/devtools/server/actors/descriptors/tab.js#219-243).

And in practice, clicking on Inspect for a desktop zombie tab will fail, because such tabs don't have a browsingContext yet, and therefore we can't find the corresponding outerWindowId, which is what we use to create the target later on.

We should check if we have a way to handle those tabs "properly", otherwise we should just show them as disabled, so that users don't try to inspect them.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Attachment #9152790 - Attachment description: Bug 1628325 - Remove zombie tab title logic from tab descriptor → Bug 1628325 - Stop updating TargetActor title from TabDescriptor
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1a4de21085f6
Add a isZombieTab property to TabDescriptor r=daisuke
https://hg.mozilla.org/integration/autoland/rev/a7793b023327
Disable the Inspect button for zombie tabs in about:debugging r=daisuke,fluent-reviewers,flod
https://hg.mozilla.org/integration/autoland/rev/cef7c719bb96
Stop updating TargetActor title from TabDescriptor r=daisuke
https://hg.mozilla.org/integration/autoland/rev/8fa918ab21c5
Add test for zombie tab handling in aboutdebugging r=daisuke
Regressions: 1643269
You need to log in before you can comment on or make changes to this bug.