summaryrefslogtreecommitdiffstats
path: root/devtools/server/actors/target-configuration.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/server/actors/target-configuration.js')
-rw-r--r--devtools/server/actors/target-configuration.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/devtools/server/actors/target-configuration.js b/devtools/server/actors/target-configuration.js
index b6db235143..e739c1cc3d 100644
--- a/devtools/server/actors/target-configuration.js
+++ b/devtools/server/actors/target-configuration.js
@@ -9,9 +9,10 @@ const {
targetConfigurationSpec,
} = require("resource://devtools/shared/specs/target-configuration.js");
-const {
- SessionDataHelpers,
-} = require("resource://devtools/server/actors/watcher/SessionDataHelpers.jsm");
+const { SessionDataHelpers } = ChromeUtils.importESModule(
+ "resource://devtools/server/actors/watcher/SessionDataHelpers.sys.mjs",
+ { global: "contextual" }
+);
const { isBrowsingContextPartOfContext } = ChromeUtils.importESModule(
"resource://devtools/server/actors/watcher/browsing-context-helpers.sys.mjs",
{ global: "contextual" }
@@ -486,7 +487,10 @@ class TargetConfigurationActor extends Actor {
"bf-cache-navigation-pageshow",
this._onBfCacheNavigation
);
- this._restoreParentProcessConfiguration();
+ // Avoid trying to restore if the related context is already being destroyed
+ if (this._browsingContext && !this._browsingContext.isDiscarded) {
+ this._restoreParentProcessConfiguration();
+ }
super.destroy();
}
}