Open
Bug 1443182
Opened 7 years ago
Updated 2 years ago
Investigate NOT emitting ready / destroyed event in panels
Categories
(DevTools :: Framework, enhancement, P3)
DevTools
Framework
Tracking
(firefox60 affected)
NEW
Tracking | Status | |
---|---|---|
firefox60 | --- | affected |
People
(Reporter: nchevobbe, Unassigned)
References
(Blocks 1 open bug)
Details
It looks like almost all panel emit `ready` [1] / `destroyed` [2] events, but it's unclear if they actually are of any use.
Let's see if they are, and if not, remove them.
[1] https://searchfox.org/mozilla-central/search?q=emit(%22ready%22&case=false®exp=false&path=devtools%2Fclient
[2] https://searchfox.org/mozilla-central/search?q=emit(%22destroyed%22&case=false®exp=false&path=devtools%2Fclient
Blocks: dt-polish-debt
Comment 1•7 years ago
|
||
I imagine `ready` has been replaced by these events:
https://searchfox.org/mozilla-central/source/devtools/client/framework/toolbox.js#1756-1757
But there isn't direct equivalent to `destroyed` ones, there are these, but it is fired just before we start destroying the panels
https://searchfox.org/mozilla-central/source/devtools/client/framework/toolbox.js#2731-2732
(We may emit `${panelId}-destroyed` events from toolbox.js when `panel.destroy()` returned promise resolves?)
`ready` events seems unused, but a couple of `destroyed` still are:
https://searchfox.org/mozilla-central/search?q=.once(%22destroyed&case=false®exp=false&path=
Especially these occurrences:
https://searchfox.org/mozilla-central/source/devtools/client/framework/toolbox-process-window.js#209
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/head.js#327
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/head.js#344
This bug report also highlights some other potential cleanups we could do now that there is no more xul addons:
* EventEmitter interface on panels is forced from toolbox, it looks hacky, it would be clear if all panels explicitely implement this interface
https://searchfox.org/mozilla-central/rev/c217fbde244344fedfd07b57a740c694a456dbca/devtools/client/framework/toolbox.js#1721-1728
https://searchfox.org/mozilla-central/rev/c217fbde244344fedfd07b57a740c694a456dbca/devtools/client/framework/toolbox.js#1748-1754
* All panels most likely all have an `open` method, so there is propably dead piece of code here:
https://searchfox.org/mozilla-central/rev/c217fbde244344fedfd07b57a740c694a456dbca/devtools/client/framework/toolbox.js#1733-1742
Updated•7 years ago
|
Severity: normal → enhancement
Priority: -- → P3
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•