Cleanup destroy method of Debugger's main.js module
Categories
(DevTools :: Debugger, enhancement, P3)
Tracking
(firefox87 fixed)
Tracking | Status | |
---|---|---|
firefox87 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
(Blocks 1 open bug)
Details
Attachments
(7 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
This destroy method contains various cleanup that are probably meant to be down in sub component:
https://searchfox.org/mozilla-central/source/devtools/client/debugger/src/main.js#28-32
See Julian's review comment:
https://phabricator.services.mozilla.com/D90427#inline-513228
followup: this destroy method is actually a bit wild :)
Apart from the "onDisconnect" that you added which mirrors perfectly the onConnect from "bootstrap", the rest of the content feels like it comes from nowhere. unmountRoot() and teardownWorkers() would fitt nicely in your new onDisconnect I think, because they mirror bootstrapApp and bootstrapWorkers (unmountRoot & bootstrapApp are on a slightly different level of abstraction, but I don't want to make things too complex).For sourceQueue.clear() it's a bit weirder. The sourceQueue is initialized from setupEvents which is called in onConnect, so it could also make sense to have it in your disconnect?
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
If we need trait, we can access it from the targetFront directly.
Assignee | ||
Comment 2•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
Assignee | ||
Comment 4•4 years ago
|
||
Assignee | ||
Comment 5•4 years ago
|
||
Assignee | ||
Comment 6•4 years ago
|
||
Assignee | ||
Comment 7•4 years ago
|
||
Comment 9•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b270b7095db3
https://hg.mozilla.org/mozilla-central/rev/c7649862f44f
https://hg.mozilla.org/mozilla-central/rev/f50924deab4f
https://hg.mozilla.org/mozilla-central/rev/c94dcb558f2a
https://hg.mozilla.org/mozilla-central/rev/949606f2079c
https://hg.mozilla.org/mozilla-central/rev/a9e0c9b685a4
https://hg.mozilla.org/mozilla-central/rev/42133a1bb1e5
Description
•