Closed Bug 1492830 Opened 2 years ago Closed 1 year ago

Clarify why part of the "attaching" is being split between TabTarget.attach and


(DevTools :: Framework, enhancement, P2)



(firefox68 fixed)

Firefox 68
Tracking Status
firefox68 --- fixed


(Reporter: ochameau, Assigned: yulia)



(Whiteboard: dt-fission)


(2 files)

After bug 1485676, target will have an `attach` method, that used to be part of its old `makeRemote` method:
This method calls BrowsingContextTargetActor.attach request as well as ConsoleActor's startsListeners (which is considered as the "attaching" request).

But at the same time, in function:
We do call target.attach, and right after, re-call ConsoleActor's startsLiteners request. And right after, we attach the thread actor.

At the end it is not really clear where all these attaching calls should live, but I think we should unify that to be managed only by one of these two classes.

This issues most likely related to bug 1397020 and 1072764 which should be revisited after bug 1485676.

Also, figuring this out will most likely help merging TabTarget and TabClient (bug 1465635)
Note that attach it also called from TargetFactory.forRemoteTab:
We may remove that call and let toolbox call it.
Severity: normal → enhancement
Priority: -- → P2
Depends on: 1225492
Depends on: 1493714
Whiteboard: dt-fission
Blocks: 1494796
Assignee: nobody → ystartsev

Since there is no toolbox specific code left, this code can be merged with the target-mixin

The worker target is the only target to have a unique thread client attach. It doesn't look
like there is a specific reason for this. In order to remove redundancy from target thread
instantiation, I have made this follow the same pattern as elsewhere, so we can merge the "resume"
method into the thread attach method on target.

Attachment #9061665 - Attachment description: Bug 1492830 - Move generic code from attach-thread.js to toolbox and target; r=ochameau,jdescottes → Bug 1492830 - Move toolbox code from attach-thread.js to toolbox; r=ochameau,jdescottes
Pushed by
change worker target threadClient attach pattern to be the same as other targets; r=jdescottes
Move toolbox code from attach-thread.js to toolbox; r=jdescottes
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
You need to log in before you can comment on or make changes to this bug.