diff --git a/testing/specialpowers/content/SpecialPowersParent.jsm b/testing/specialpowers/content/SpecialPowersParent.jsm index 23c93c0ca9d0..a14b5b307227 100644 --- a/testing/specialpowers/content/SpecialPowersParent.jsm +++ b/testing/specialpowers/content/SpecialPowersParent.jsm @@ -577,7 +577,9 @@ class SpecialPowersParent extends JSWindowActorParent { return undefined; case "SpecialPowers.Focus": - this.manager.rootFrameLoader.ownerElement.focus(); + if (this.manager.rootFrameLoader) { + this.manager.rootFrameLoader.ownerElement.focus(); + } return undefined; case "SpecialPowers.CreateFiles":