Different name property used for actor registration and removal

NEW
Unassigned

Status

()

Firefox
Developer Tools
2 years ago
2 years ago

People

(Reporter: Wladimir Palant (for Adblock Plus info Cc bugzilla@adblockplus.org), Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(firefox42 affected)

Details

The inline documentation on the DebuggerServer.removeGlobalActor() parameter currently says:

> Same object being given to related addGlobalActor call.

Generally, this isn't really true. When a new actor is registered the expected properties of the aActor parameter are constructorFun/id and constructorName. The latter becomes the name of the actor. When an actor is removed on the other hand, DebuggerServer.removeGlobalActor() expects an aActor.name property which is the same as aActor.constructorName of the registered actor.

I can only assume that the built-in actors always have both a constructorName and a name property and both are always equal. However, the API is currently inconsistent.
You need to log in before you can comment on or make changes to this bug.