Closed Bug 1694651 Opened 4 years ago Closed 3 years ago

Support running devtools with bfcache navigation in parent

Categories

(DevTools :: Framework, enhancement)

enhancement

Tracking

(Fission Milestone:M7a, firefox89 fixed)

RESOLVED FIXED
89 Branch
Fission Milestone M7a
Tracking Status
firefox89 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 4 open bugs)

Details

(Whiteboard: dt-fission-m3-mvp)

Attachments

(3 files, 2 obsolete files)

Bug 1689601 will introduce a new behavior when a bfcache navigation occurs and fission is enabled.
A new DocShell will be spawn in the same process, which will break the current code supporting bfcache navigation.
Today bfcache navigation is handled by listening to pageshow and pagehide on the chromeeventhandler.
pageshow and pagehide are still firing with the new setup, but on two distinct docshells. We are then missing the pageshow event on the navigated to docshell.

In order to support this new behavior, we would need to listen to pageshow and pagehide from the DevTools's JSWindowActor, and fire a new top level target on pageshow.
But for now, top level targets are only created by the frontend, whereas here, it should be created by the backend. We have to depend on bug 1644397 in order to support that.

Once bug 1644397 lands, it should be quite easy to support the new bfcache navigations.

Assignee: nobody → poirot.alex
Whiteboard: dt-fission-m3-triage

Also once this bug lands, we might be able to renable tests that were disabled in bug 1665165.

BFCache in parent navigation ends up spawning a new DocShell in the same process.
The existing BrowsingContextTargetActor no longer receive the pageshow event,
because it fires on a new, distinct DocShell.
We have to listen for these two events on the JSWindowActor and spawn new target actors
when such navigation happens.

Status: NEW → ASSIGNED
Fission Milestone: --- → M7
Whiteboard: dt-fission-m3-triage → dt-fission-m3-mvp

I'll have to rebase the target destruction patch on top of bug 1694906 as it introduces a destructor-destroyed event, which I'm depending on.

Depends on: 1694906

And I'll try to fix a few things around descriptor/target destroy in bug 1695929 first.

Depends on: 1695929

Comment on attachment 9206184 [details]
Bug 1694651 - Destroy target from TargetList.onTargetDestroyed and get rid of tabDetached

Revision D106835 was moved to bug 1631451. Setting attachment 9206184 [details] to obsolete.

Attachment #9206184 - Attachment is obsolete: true

BFCache with Fission is targeting M7a.

Fission Milestone: M7 → M7a
Attachment #9205159 - Attachment description: Bug 1694651 - Support running DevTools with BFCache in parent navigation. → Bug 1694651 - [devtools] Support running DevTools with BFCache in parent navigation.

TargetFrontMixin may try to call detach method which won't work in some cases.
At least for bfcache navigations. The target actor will already be destroyed.
detach will stay pending and the target front will never be fully destroyed
as we only call Front.destroy after detach completed.

Attachment #9205158 - Attachment is obsolete: true
Blocks: 1702511
Blocks: 1702630
Blocks: 1702654
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/350aea656f79
[devtools] Support running DevTools with BFCache in parent navigation. r=jdescottes,nchevobbe
https://hg.mozilla.org/integration/autoland/rev/d8c17c24ef62
[devtools] Immediately destroy the target front when receiving target-destroyed-form. r=jdescottes,nchevobbe
https://hg.mozilla.org/integration/autoland/rev/80de12aca743
[devtools] Fix debugger when doing bfcache navigations in parent. r=jdescottes
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: