Open Bug 1450284 Opened 2 years ago Updated 3 months ago

Finish conversion of ThreadActor to protocol.js


(DevTools :: Debugger, task, P3)



(Not tracked)


(Reporter: jryans, Assigned: yulia)


(Blocks 1 open bug)


(Keywords: leave-open)


(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
  * 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 `, conn);` from your actor's `initialize` method to get events to work as expected and `;` if you overload `destroy` method, in order to cleans things up correctly.

Product: Firefox → DevTools
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`
Blocks: 1494796
Assignee: nobody → ystartsev
Keywords: leave-open

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.

Rather straighforward -- as per jryans recommendation, I have renamed the file to reflect
our naming conventions.

Attachment #9060378 - Attachment description: Bug 1450284 - Finish the Spec for Thread; r=ochameau,jdescottes → Bug 1450284 - Complete method set in the Spec for Thread; r=ochameau,jdescottes
Pushed by
Complete method set in the Spec for Thread; r=jdescottes,ochameau
rename script spec to thread.js; r=jdescottes

Does this still need to remain open (and blocking bug 1494796)?

Flags: needinfo?(ystartsev)

This needs to remain open. there will be more patches landing for this as part of the patch queue for the conversion.

Flags: needinfo?(ystartsev)
Type: enhancement → task
No longer blocks: 1494796
You need to log in before you can comment on or make changes to this bug.