Closed Bug 1493714 Opened 2 years ago Closed 2 years ago

Move attachThread/detachThread code specific to the toolbox in toolbox.js


(DevTools :: Framework, enhancement, P1)



(firefox68 fixed)

Firefox 68
Tracking Status
firefox68 --- fixed


(Reporter: ochameau, Assigned: ystartsev)


(Blocks 1 open bug)


(Whiteboard: dt-fission dt-fission-m1)


(1 file)

attachThread and detachThread is 90% generic code to instantiate the thread client that has nothing specific to the toolbox.

The only two bits are specific to the toolbox:
This should rather be a listener in toolbox.js, registered from via:
  threadClient.addListener("paused", this.handleThreadState);
  threadClient.addListener("resumed", this.handleThreadState);

This one is harder to refactor as it happens right before instantiating the thread client and doesn't emit an event. But we might be able to do something via an event?
It would be great to understand this error. Is the thread client broken after that? Can we set a flag on thread client so that can later check it?

Then once attachThread and detachThread are no longer having any reference to toolbox, we can inline this code into target.js (bug 1492830)
Depends on: 1225492
Note that there is also bug 1225492 for the thread-paused/thread-resumed events being emitted from handleThreadState, but that is yet another thing to refactor.
Severity: normal → enhancement
Priority: -- → P2
Whiteboard: dt-fission
Blocks: dbg-fission
Assignee: nobody → ystartsev

This is the first part of getting rid of framework/attach-thread.js -- here we move the
toolbox related logic back into the toolbox.

Pushed by
move toolbox specific listeners to threadClient events to the toolbox; r=jdescottes
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
Priority: P2 → P1
Whiteboard: dt-fission → dt-fission dt-fission-m1
You need to log in before you can comment on or make changes to this bug.