From b724f12298129653f86a29dea26b492c9749805b Mon Sep 17 00:00:00 2001 From: Brad Werth Date: Tue, 26 Nov 2019 22:31:20 +0000 Subject: [PATCH] Bug 1599304: Make SpecialPowers.Focus check for availability of this.manager.rootFrameLoader before dereferencing it. r=kmag Differential Revision: https://phabricator.services.mozilla.com/D54648 --HG-- extra : moz-landing-system : lando --- testing/specialpowers/content/SpecialPowersParent.jsm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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":