Open Bug 698841 Opened 13 years ago Updated 2 years ago

[meta] Refactor all actors and fronts to use protocol.js

Categories

(DevTools :: Framework, task, P5)

task

Tracking

(Not tracked)

People

(Reporter: jimb, Unassigned)

References

(Depends on 2 open bugs, Blocks 2 open bugs)

Details

(Keywords: meta)

In our remote debugging protocol client, packets arriving from the server all go through DC_onPacket. That function manages request/reply-style interactions, but also has special cases for the more complicated exchanges with thread actors. As other patterns appear in the protocol, DC_onPacket will become unweildy. Instead of having a single piece of code that understands all actors' patterns of communication, we should have a distinct client-side JS object acting as a 'front' for each actor. A front would be responsible for making sense of its actor's state, and providing a reasonable interface for UI widgets to interact with. The front will be the only thing that sends messages to its actor, and the front will handle all messages from the server for its actor. DC_onPacket should simply forward packets to the appropriate front. We should create fronts only on demand. For example, the stack frame for a function call has a callee; the front for the stack frame should avoid creating a front for the callee until someone actually asks for it.
Assignee: nobody → past
Component: Developer Tools → Developer Tools: Debugger
QA Contact: developer.tools → developer.tools.debugger
I think this makes sense. I want to call this Front object a Stage. Also, the summary describes a "Front" for each actor. Is this the case or should we have a single front/stage object that knows about all the actors?
The intention is a frontobject-per-actor. Actors are objects, it feels more natural to let the client treat them as such by giving the client objects. We also have been throwing around the idea of a special jsclass that we can use to notice when a front object is no longer in use, and send a 'release' request to the server if one hasn't been sent already.
Priority: -- → P3
After protocol.js the plan have changed. I think we should morph this bug into a "convert our old-style actors to protocol.js" bug. Bug 910141 is about starting with the ObjectActor, and after that we can proceed with the rest.
Assignee: past → nobody
Depends on: 910141
Summary: Debugging protocol client should use distinct front objects for each actor → Debugger actors/clients should be ported over to protocol.js
Note that old actors include the web console, profiler, tracer and webapps actors, too.
OS: Linux → All
Hardware: x86_64 → All
Summary: Debugger actors/clients should be ported over to protocol.js → Refactor all actors/fronts to use protocol.js
Blocks: dbg-server
Depends on: 1289193
Keywords: meta
Priority: P3 → P5
Summary: Refactor all actors/fronts to use protocol.js → [meta] Refactor all actors/fronts to use protocol.js
Summary: [meta] Refactor all actors/fronts to use protocol.js → [meta] Refactor all actors and fronts to use protocol.js
Product: Firefox → DevTools
No longer blocks: dt-fission
Type: defect → task
Component: Debugger → Framework
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.