Closed Bug 1497470 Opened 6 years ago Closed 6 years ago

Create a ContentProcessTargetFront front to match ContentProcessTargetActor

Categories

(DevTools :: Framework, enhancement, P2)

enhancement

Tracking

(firefox65 fixed)

RESOLVED FIXED
Firefox 65
Tracking Status
firefox65 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

(Whiteboard: dt-fission)

Attachments

(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:
https://treeherder.mozilla.org/#/jobs?repo=try&selectedJob=208433444&revision=401aa0e6e1aa5244aa0875d4a544ba4d8c692b02

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 apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e6e16b119518
Create a ContentProcessTargetFront front to match ContentProcessTargetActor. r=yulia
https://hg.mozilla.org/integration/autoland/rev/8b0695286be6
Correctly type Targets.listWorkers request. r=yulia
https://hg.mozilla.org/integration/autoland/rev/1ca9d01b116a
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.

Attachment

General

Created:
Updated:
Size: