Closed Bug 1225492 Opened 9 years ago Closed 5 years ago

Listen for paused/resumed events on threadClient, not the target

Categories

(DevTools :: Debugger, defect, P1)

40 Branch
defect

Tracking

(firefox68 fixed)

RESOLVED FIXED
Firefox 68
Tracking Status
firefox68 --- fixed

People

(Reporter: jlong, Assigned: yulia)

References

(Blocks 1 open bug)

Details

(Whiteboard: dt-fission-m1)

Attachments

(1 file)

This will be cleanup after bug 1132501. Right now the we emit thread-paused and thread-resumed events on the target after attaching the thread. We did this so other tools could listen to those events, and the threadClient might not exist yet.

After the above bug though, the threadClient will always exist so we should move those events there. It's a much more appropriate place.
Depends on: 1132501
Product: Firefox → DevTools
paused and resumed events are now fired from ThreadClient right here:
  https://searchfox.org/mozilla-central/source/devtools/shared/client/thread-client.js#694
This method is being called by low level RDP layer:
  https://searchfox.org/mozilla-central/source/devtools/shared/client/debugger-client.js#834
This ThreadClient might be a really special one to convert to protocol.js front. We would have to get rid of such hacky code first!!

Anyway, what is left to do is to remove the listeners of thread-paused/thread-resumed:
  https://searchfox.org/mozilla-central/search?q=thread-paused%7Cthread-resumed&case=false&regexp=true&path=
And instead listen like this:
  toolbox.threadClient.addListener("paused", ...);
  toolbox.threadClient.addListener("resumed", ...);

Note that bug 1492830 or one of its dependency may put the threadClient on target rather than the toolbox, but I'm expecting this bug to land first.
Summary: Emit paused/resumed events on threadClient, not the target → Listen for paused/resumed events on threadClient, not the target
Whiteboard: dt-fission
Blocks: dbg-fission
Blocks: 1494796
Assignee: nobody → ystartsev

As per the bug description, this removes some old code that relied on the target
re-emitting threadClient events. Now we simply listen to the threadClient events directly.

Attachment #9061300 - Attachment description: Bug 1225492 - Listen to events on the ThreadClient instead of on the re-emitting them on the target; r=ochameau,jdescottes → Bug 1225492 - Listen to events on the ThreadClient instead of re-emitting them on the target; r=ochameau,jdescottes
Pushed by ystartsev@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e55213bb470a
Listen to events on the ThreadClient instead of re-emitting them on the target; r=jdescottes
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
Priority: -- → P1
Whiteboard: dt-fission → dt-fission dt-fission-m1
Whiteboard: dt-fission dt-fission-m1 → dt-fission-m1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: