Open
Bug 1487677
Opened 6 years ago
Updated 2 years ago
Toolbox sidebar panel destruction triggers race conditions
Categories
(DevTools :: Framework, enhancement, P3)
DevTools
Framework
Tracking
(Not tracked)
NEW
People
(Reporter: yulia, Unassigned)
References
Details
when updating the inspector to use getFront, browser_ext_devtools_panels_elements_sidebar.js fails. We are sending events to the toolbox after the toolbox is closed, and everything is asynchronous. In this case specifically, the "removeTab" action in ToolBar --> https://searchfox.org/mozilla-central/source/devtools/client/shared/components/tabs/TabBar.js#205-227 which sends three "select" functions just as the toolbox is closing. Since destroy functions are asynchronous, halfway in the "update" that is triggered by this select, we lose the reference to the inspector or the store.
The issue occures in both the grid and the flex box. we have a try/catch block that is async:
https://searchfox.org/mozilla-central/rev/05d91d3e02a0780f44599371005591d7988e2809/devtools/client/inspector/grids/grid-inspector.js#242-248
so this then fails: https://searchfox.org/mozilla-central/rev/05d91d3e02a0780f44599371005591d7988e2809/devtools/client/inspector/grids/grid-inspector.js#251-253
and by the time this resolves the toolbox is already destroyed. I have introduced a try/catch block for the lines 251-253, but we should find a better way to handle destruction.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•