Closed
Bug 1384546
Opened 7 years ago
Closed 7 years ago
[meta] Remove the legacy EventEmitter from DevTools
Categories
(DevTools :: Framework, enhancement, P2)
DevTools
Framework
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1382580
People
(Reporter: zer0, Unassigned)
References
Details
(Keywords: meta)
In bug 1381542 we introduced a new Event Emitter, while we're keeping the previous one for a smoother transition.
This bug is intended for replacing the old EventEmitter with the new one.
Reporter | ||
Comment 1•7 years ago
|
||
The old event emitter is widely used in devtools, and we need to replace with the new ones.
However, that could result in a huge patch, since we can't change the event emitter per file / component. Assuming we have two objects, FOO and BAR. They're different component in different modules. They both use the old event emitter:
// from FOO.js
FOO.emit("foo");
// from BAR.js
const { FOO } = require("Foo");
FOO.on("foo", doSomething);
So far so good. But if we change FOO for example (or BAR) with the new event emitter, nothing will works anymore, since the storage for the listeners for FOO won't be the same of its consumers, like BAR.
And in some cases the ramification could be not this obvious. And searching for them across the entire codebase could be time-consuming.
We have to keep in mind that when we're working on replacing the old event emitter.
One approach could be also refactoring the old event emitter, to keep the same API it has at the moment, but actually wrap internally the new event emitter; or maybe expose temporary the new event emitter's symbol for listeners, to the old event emitter.
In that way, the storage for listeners for both objects, would be the same, and we can change component by component. Even with the new event emitter differences, it might be a path worth to investigate, this one.
Updated•7 years ago
|
Blocks: devtools-debtools
Updated•7 years ago
|
Summary: Remove the legacy EventEmitter from DevTools → [meta] Remove the legacy EventEmitter from DevTools
Updated•7 years ago
|
Blocks: dt-polish-debt
Updated•7 years ago
|
Comment 4•7 years ago
|
||
This is done!
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•