Remove usage of wildcard "*" event listeners in devtools

NEW
Unassigned

Status

P3
normal
a year ago
2 months ago

People

(Reporter: jdescottes, Unassigned)

Tracking

unspecified

Firefox Tracking Flags

(firefox57 fix-optional)

Details

(Whiteboard: [reserve-nosdk])

The old SDK event emitter API allowed to listen to all events on a given target via the special "*" type.

The call sites can be found with the two following queries:
- http://searchfox.org/mozilla-central/search?q=on(%22*%22&case=false&regexp=false&path=devtools
- http://searchfox.org/mozilla-central/search?q=on%5C(%5B%5E%2C%5D%2B%2C%5Cs*%22%5C*%22&case=false&regexp=true&path=devtools

Currently the feature is used in the following files:
- devtools/client/framework/toolbox.js
- devtools/client/performance/performance-controller.js
- devtools/client/webaudioeditor/models.js
- devtools/client/webaudioeditor/views/context.js
- devtools/server/actors/performance.js
- devtools/server/actors/profiler.js
- devtools/server/actors/timeline.js
- devtools/server/performance/recorder.js
- devtools/shared/fronts/profiler.js

We are adding additional backward compatibility code to devtools/shared/event-emitter.js in order to support the feature while we are migrating out of using SDK APIs in devtools.

Ultimately we should try to get rid of this feature. and remove the dedicated implementation in event-emitter.js
Forgot to add this non-blocking follow up to the no-sdk triage.
Whiteboard: [reserve-nosdk]
status-firefox57: --- → fix-optional

Updated

2 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.