Make it clearer that the webConsoleFront destroy method only does the heavy work once
Categories
(DevTools :: Framework, task, P3)
Tracking
(firefox73 fixed)
| Tracking | Status | |
|---|---|---|
| firefox73 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
Details
Attachments
(1 file)
We could create a destroyer param on it the first time destroy is called, like we do in multiple places in the codebase already.
| Assignee | ||
Comment 1•5 years ago
|
||
in fact there's an early return on the truthiness of this._client, which is set to null later in the function, which means we actually only do the "real work" once.
I'll use this bug to add a comment to make this more clear.
| Assignee | ||
Comment 2•5 years ago
|
||
This only highlights the fact that the front will only
do the heavy work once, since we set the _client property
to null, and the function is guarded against the _client
truthiness.
Comment 3•5 years ago
•
|
||
I filed Bug 1602727 to fix other issues related to incorrect _destroyer patterns in Devtools, leading to target-mixin and toolbox destroy being called several times
(and I just checked, fixing it will avoid calling webconsole front destroy twice on toolbox destroy)
Comment 5•5 years ago
|
||
| bugherder | ||
Description
•