Closed Bug 1646459 Opened 4 years ago Closed 4 years ago

Support target-switching without a toolbox

Categories

(DevTools :: Framework, enhancement)

enhancement

Tracking

(Fission Milestone:M7, firefox80 fixed)

RESOLVED FIXED
Firefox 80
Fission Milestone M7
Tracking Status
firefox80 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 2 open bugs)

Details

(Whiteboard: dt-fission-m2-reserve)

Attachments

(4 files)

Bug 1644360's review highlighted that we do not properly support target-switching in tests that are covering TargetList/ResourceWatcher without a toolbox.
It would be helpful for test to make it so that LocalTabTarget's onRemotenessChange method does update the new top level target, even if there is no toolbox.
Doing this would actually be yet another step toward bug 1644397.
New top level target should eventually be emitted by the server, from the Watcher actor and should be received as any other target, via target-available-form.

Target switching should be implemented differently.
I think switchToTarget may have been introduce before TargetList?
But top level target switching should be handled via onTargetAvailable.
It happens when onTargetAvailable is called with a targetFront with isTopLevel=true,
and isTargetSwitching argument is true.

In a near future, target switching should be notified by the watcher actor,
via a target-available-form event.
So that all the logic around target switching should rather be into this RDP event listener.

We don't have to and shouldn't unregister and re-register the Watcher actor listeners
in case of top level target switching. As, Watcher actor is independant from the top level target
and we might loose some events by doing so. One main goal of Watcher actor was about that.
Being independant from the lifecycle of the top level target.

We might be able to move even more code from LocalTabTarget to TargetList,
but here is the minimal modification, which allows to update the target,
without requiring a Toolbox.

Status: NEW → ASSIGNED

Tracking dt-fission-m2-reserve bugs for Fission Beta milestone (M7).

Fission Milestone: --- → M7
Blocks: 1649614
Blocks: 1649622
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ab3aa936b9bf
Merge Toolbox.switchToTarget into Toolbox._onTargetAvailable. r=jdescottes
https://hg.mozilla.org/integration/autoland/rev/d59aca70d9a7
Merge most of TargetList.switchToTarget into TargetList._onTargetAvailable. r=jdescottes
https://hg.mozilla.org/integration/autoland/rev/2316b38ce191
Only stop and start listening to legacy listeners in case of top level target switching. r=jdescottes
https://hg.mozilla.org/integration/autoland/rev/56af0aa5f116
Support target-switching without a toolbox. r=jdescottes
Regressions: 1649910
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: