commit 90cc8fffc1ed1516b664cffe09943b8e646f6a71
parent f635428766467733801d8886222e2b6383a3ab4c
Author: Hubert Boma Manilla <hmanilla@mozilla.com>
Date: Thu, 13 Nov 2025 00:20:42 +0000
Bug 1998847 - [devtools] Make sure the toolbox target is not destroyed r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D272140
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/devtools/client/fronts/targets/target-mixin.js b/devtools/client/fronts/targets/target-mixin.js
@@ -215,6 +215,9 @@ function TargetMixin(parentClass) {
* @return {Mixed}
*/
getTrait(traitName) {
+ if (this.isDestroyedOrBeingDestroyed()) {
+ return null;
+ }
// If the targeted actor exposes traits and has a defined value for this
// traits, override the root actor traits
if (this.targetForm.traits && traitName in this.targetForm.traits) {