Closed Bug 1225492 Opened 4 years ago Closed 7 months ago
Listen for paused/resumed events on thread
Client, not the target
Bug 1225492 - Listen to events on the ThreadClient instead of re-emitting them on the target; r=ochameau,jdescottes
47 bytes, text/x-phabricator-request
|Details | Review|
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.
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®exp=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
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 email@example.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
You need to log in before you can comment on or make changes to this bug.