forked from mozilla/shield-studies-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Harden StudyUtils to go blind on a browser window being present and p…
…revent errors during a second shutdown during browser startup. Fixes #33.
- Loading branch information
1 parent
a024ed7
commit 58d41a6
Showing
2 changed files
with
8 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
713a714,716 | ||
714c714,718 | ||
< if (!Services.wm.getMostRecentWindow("navigator:browser").gBrowser) { | ||
--- | ||
> if (!("triggeringPrincipal" in params)) { | ||
> params.triggeringPrincipal = Services.scriptSecurityManager.createNullPrincipal({}); | ||
> } | ||
> const window = Services.wm.getMostRecentWindow("navigator:browser"); | ||
> if (!window || !window.gBrowser) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters