Closed Bug 1497470 Opened 4 years ago Closed 4 years ago

Create a ContentProcessTargetFront front to match ContentProcessTargetActor


(DevTools :: Framework, enhancement, P2)



(firefox65 fixed)

Firefox 65
Tracking Status
firefox65 --- fixed


(Reporter: ochameau, Assigned: ochameau)


(Blocks 1 open bug)


(Whiteboard: dt-fission)


(3 files)

ContentProcessTarget codepath is very special on the client side.
The is the only one target where we never create any Client/Front class.
We always for throught generic methods of DebuggerClient.attachConsole/attachThread/... in order to call any of its method.

It is slightly similar to AddonTarget. We do instantiate an AddonClient from attachAddon, but we never really use it.

These two cases: content process and addon targets are the only two one where TabTarget is having a null `activeTab` property.

I think it will be easier to think about merging the target fronts with TabTarget, once TabTarget is always going to have a reference to the target front.

So, the goal of this bug would be to first introduce the ContentProcessTargetFront and have it somehow referenced by the TabTarget.
Bug 1497467 will so similarily with a convertion of AddonClient to AddonTargetFront.
Severity: normal → enhancement
Priority: -- → P2
Whiteboard: dt-fission
Assignee: nobody → poirot.alex
MozReview-Commit-ID: 2QJfxOMmmOl

Depends on D10189
Try run:

This is based on top of bug 1499022, itself being on top of bug 1485661.

This patch adds one more case where activeTab isn't a "tab" but a target front.
This is only temporary. activeTab/target's front is meant to be merged with TabTarget. And TabTarget being merged with WorkerTarget.
Note that this is not the first time activeTab isn't a BrowsingContextTargetFront.
WorkerTarget also exposes an `activeTab` attribute which is a WorkerTargetFront.

The next steps here are:
* try merging WorkerTarget into TabTarget
* also set an activeTab for legacy addons, so that all targets are having a front being set in attach.

Then, we should be able to instantiate the target fronts directly from RootFront and pass the front as argument of TabTarget (instead of passing its "form"). And finally, we should be able to merge TabTarget with the fronts.
Depends on: 1499022
MozReview-Commit-ID: BfjRhhIDxiF

Depends on D10189
Pushed by
Create a ContentProcessTargetFront front to match ContentProcessTargetActor. r=yulia
Correctly type Targets.listWorkers request. r=yulia
Improve error logging when the browser content toolbox fails loading. r=yulia
You need to log in before you can comment on or make changes to this bug.