Finish conversion of ThreadActor to protocol.js
Categories
(DevTools :: Debugger, task, P3)
Tracking
(Not tracked)
People
(Reporter: jryans, Assigned: yulia)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
In bug 1256397, Eddy landed a few parts of converting ThreadActor to protocol.js, but there's still more work that remains: * `attach` and potentially other request handlers may need special treatment in protocol.js due to the nested event loops used in the debugger * https://bugzilla.mozilla.org/attachment.cgi?id=8730334&action=diff from bug 1256397 is an attempt at this that was never finished * The spec[1] should actually define the methods * File should also be renamed to `thread` to match the actor * The old-style request handlers[2] should be removed and actor methods renamed, just like other conversions of actors to p.js Additional conversion tips copied from :ochameau: * `actorPrefix` becomes `typeName` on the spec object, * `grip()` function becomes `form()` on the actor, * We can remove `from` attributes in all in returned responses and only keep actual data you want to send to the client, * remember calling `protocol.Actor.prototype.initialize.call(this, conn);` from your actor's `initialize` method to get events to work as expected and `protocol.Actor.prototype.destroy.call(this);` if you overload `destroy` method, in order to cleans things up correctly. [1]: https://searchfox.org/mozilla-central/rev/57bbc1ac58816dc054df242948f3ecf75e12df5f/devtools/shared/specs/script.js#11 [2]: https://searchfox.org/mozilla-central/rev/57bbc1ac58816dc054df242948f3ecf75e12df5f/devtools/server/actors/thread.js#1730
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
As mentioned in 1473511 -- we should also rename the destroy and exit methods, as they are a bit misleading in what they are doing. Destroy is doing a cleanup of the actor, and is called on detach and onReleaseMany, as well as from exit. The real "destroy" happens in `exit`
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
We need a complete specification in order to move forward with the front conversion. I
think this will also impact other parts of the refactoring, such as some of the thread specific code
in the debugger-client.
Assignee | ||
Comment 3•5 years ago
|
||
Rather straighforward -- as per jryans recommendation, I have renamed the file to reflect
our naming conventions.
Updated•5 years ago
|
Pushed by ystartsev@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dd5b92f89835 Complete method set in the Spec for Thread; r=jdescottes,ochameau https://hg.mozilla.org/integration/autoland/rev/7e6b874b870a rename script spec to thread.js; r=jdescottes
Comment 5•5 years ago
|
||
bugherder |
Comment 6•5 years ago
|
||
Does this still need to remain open (and blocking bug 1494796)?
Assignee | ||
Comment 7•5 years ago
|
||
This needs to remain open. there will be more patches landing for this as part of the patch queue for the conversion.
Updated•5 years ago
|
Comment 8•5 years ago
|
||
The leave-open keyword is there and there is no activity for 6 months.
:yulia, maybe it's time to close this bug?
Assignee | ||
Comment 9•5 years ago
|
||
It looks like the deprecatedThreadActor.js file was removed, which is what this was waiting on. I am not sure when this happened, or in which bug however. This can be closed.
Updated•5 years ago
|
Description
•