gecko-dev/devtools/client/responsive
Alexandre Poirot 2e67531735 Bug 1867483 - [devtools] Stop async redux/react code after RDM is closed. r=devtools-reviewers,nchevobbe
Unmounting the top level React component will help avoid trigerring React updates
when async thunk actions keep dispatching new actions after the tool is closed.
This was leading to various exceptions in many React components.

Also avoid a race condition where `responsiveFront` could be undefined when closing
RDM while it is still initializing.

Finally, ensure registering the `ResponsiveUI` immediately in `activeTabs` to prevent
race condition in openIfNeeded.

Adding some test coverage for such race condition, but can't enable this on verify.
In chaos mode, there is too many exceptions at the test teardown.
Ideally, RDM should:
* only close the RDP client and let the server restore the default value on its own.
  i.e. we shouldn't do any request on closing.
* RDM close requests should wait for previous initialization request to be done.
  This would avoid zillion of possible exceptions because initialization is very async
  and each step may throw because of things are already being destroyed.
  But this wouldn't address race condition when the tab is closed.
  So RDM should probably try to have a more resilient initialization sequence as well.

Differential Revision: https://phabricator.services.mozilla.com/D197581
2024-01-11 09:46:12 +00:00
..
actions
components Bug 1867483 - [devtools] Stop async redux/react code after RDM is closed. r=devtools-reviewers,nchevobbe 2024-01-11 09:46:12 +00:00
docs
images
reducers
test Bug 1867483 - [devtools] Stop async redux/react code after RDM is closed. r=devtools-reviewers,nchevobbe 2024-01-11 09:46:12 +00:00
utils
constants.js
index.css Bug 1855200 - [devtools] Fix and harmonize focus indicator across the toolbox. r=devtools-reviewers,ochameau. 2023-11-03 10:05:53 +00:00
index.js Bug 1867483 - [devtools] Stop async redux/react code after RDM is closed. r=devtools-reviewers,nchevobbe 2024-01-11 09:46:12 +00:00
manager.js Bug 1867483 - [devtools] Stop async redux/react code after RDM is closed. r=devtools-reviewers,nchevobbe 2024-01-11 09:46:12 +00:00
moz.build Bug 1859873 - batch 13 xpcshell.ini -> .toml. r=aryx,devtools-reviewers,profiler-reviewers 2023-11-21 12:32:50 +00:00
reducers.js
responsive-browser.css
store.js
toolbar.xhtml
types.js
ui.js Bug 1867483 - [devtools] Stop async redux/react code after RDM is closed. r=devtools-reviewers,nchevobbe 2024-01-11 09:46:12 +00:00