commit bfa896171b3ecbbf7711c1bc16c078aa2e87ce18
parent cd424c8b0a83f530938ae8841bc2fa2fb8061388
Author: Alexandre Poirot <poirot.alex@gmail.com>
Date: Tue, 7 Oct 2025 22:22:13 +0000
Bug 1991698 - [devtools] Drop RDM actions as soon as the tool starts destroying. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D267194
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/devtools/client/responsive/index.js b/devtools/client/responsive/index.js
@@ -21,6 +21,9 @@ const ReactDOM = require("resource://devtools/client/shared/vendor/react-dom.mjs
const {
Provider,
} = require("resource://devtools/client/shared/vendor/react-redux.js");
+const {
+ START_IGNORE_ACTION,
+} = require("resource://devtools/client/shared/redux/middleware/ignore.js");
const message = require("resource://devtools/client/responsive/utils/message.js");
const App = createFactory(
@@ -68,6 +71,9 @@ const bootstrap = {
destroy() {
window.removeEventListener("unload", this.destroy, { once: true });
+ // Prevents any further action from being dispatched
+ this.store.dispatch(START_IGNORE_ACTION);
+
// unmount to stop async action and renders after destroy
ReactDOM.unmountComponentAtNode(this._root);