[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser/tor-browser-68.1.0esr-9.0-2] Bug 31955: On macOS avoid throwing inside nonBrowserWindowStartup()
commit 7ad264c14007eaa870db55eba82b1e32faf299bf
Author: Kathy Brade <brade@xxxxxxxxxxxxxxxxx>
Date: Thu Oct 3 10:05:33 2019 -0400
Bug 31955: On macOS avoid throwing inside nonBrowserWindowStartup()
Inside nonBrowserWindowStartup(), do not assume that XUL elements
that are only part of the Mac hidden window are available in all
non-browser windows.
---
browser/base/content/nonbrowser-mac.js | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/browser/base/content/nonbrowser-mac.js b/browser/base/content/nonbrowser-mac.js
index 44f5cfd03127..a7174a9295d0 100644
--- a/browser/base/content/nonbrowser-mac.js
+++ b/browser/base/content/nonbrowser-mac.js
@@ -102,10 +102,17 @@ function nonBrowserWindowStartup() {
}
if (PrivateBrowsingUtils.permanentPrivateBrowsing) {
- document.getElementById("macDockMenuNewWindow").hidden = true;
+ element = document.getElementById("macDockMenuNewWindow");
+ if (element) {
+ element.hidden = true;
+ }
}
+
if (!PrivateBrowsingUtils.enabled) {
- document.getElementById("macDockMenuNewPrivateWindow").hidden = true;
+ element = document.getElementById("macDockMenuNewPrivateWindow");
+ if (element) {
+ element.hidden = true;
+ }
}
delayedStartupTimeoutId = setTimeout(nonBrowserWindowDelayedStartup, 0);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits