Closed Bug 1467565 Opened 7 years ago Closed 5 years ago

Replace `actorPrefix` with `typeName` in actors

Categories

(DevTools :: General, enhancement, P3)

enhancement

Tracking

(firefox76 fixed)

RESOLVED FIXED
Firefox 76
Tracking Status
firefox76 --- fixed

People

(Reporter: jryans, Assigned: nchevobbe)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

At the moment, we have two different fields that might be used in an actor to control the actor's name: * actorPrefix * typeName `actorPrefix` is typically used by older (pre-p.js) actors, while `typeName` is typically used by p.js actors. However, we always check[1] for both no matter the style of actor. Since we no longer have add-ons to worry about, we can replace `actorPrefix` with `typeName` throughout the code base now without waiting for other p.js conversion tasks for each actor. [1]: https://searchfox.org/mozilla-central/rev/cf464eabfeba64e866c1fa36b9fefd674dca9c51/devtools/server/actors/common.js#234
Product: Firefox → DevTools

(In reply to J. Ryan Stinnett [:jryans] from comment #0)

However, we always check[1] for both no matter the style of actor. Since we
no longer have add-ons to worry about, we can replace actorPrefix with
typeName throughout the code base now without waiting for other p.js
conversion tasks for each actor.

This action item is still relevant, we still uses actorPrefix here and there.
Replacing actorPrefix with typeName is simple:
https://searchfox.org/mozilla-central/search?q=actorPrefix&case=false&regexp=false&path=

But this will highlight the few actors that aren't converted to protocol js.

  • Like LongStringActor, which is only used by the console actor:
    https://searchfox.org/mozilla-central/source/devtools/server/actors/webconsole.js#17-19
    There is a bug to convert it to protocol.js, bug 1451019.
  • PauseActor. I'm not 100% sure it is an actor? Does it break anything if we remove the prefix?
  • ChromeDebuggerActor inherits from ThreadActor, which recently switch to protocol.js. So we can probably override typeName instead of actorPrefix.
  • then there is all the tests which are using old fashion actor instead of protocol.js, we should probably refactor them at some point...
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED

With all our actors supporting protocol.js, we can remove
support for the pre-protocol.js actorPrefix property.

Depends on D66603

Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/50c34c952841 Replace all remaining actorPrefix properties. r=ochameau.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 76
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: