tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit b7470bd8cb29eca64ece87ddd14d730c8071c79f
parent acee44efda3c1af41c454bd6577d1a17cdb99097
Author: Brad Werth <werth@efn.org>
Date:   Tue, 14 Oct 2025 17:30:29 +0000

Bug 1993137: Only set JS timezone when JS is initialized. r=smaug,spidermonkey-reviewers,dminor

Differential Revision: https://phabricator.services.mozilla.com/D268449

Diffstat:
Mwidget/nsBaseAppShell.cpp | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/widget/nsBaseAppShell.cpp b/widget/nsBaseAppShell.cpp @@ -5,6 +5,7 @@ #include "base/message_loop.h" +#include "js/Initialization.h" #include "nsBaseAppShell.h" #include "nsExceptionHandler.h" #include "nsJSUtils.h" @@ -97,7 +98,10 @@ void nsBaseAppShell::NativeEventCallback() { } void nsBaseAppShell::OnSystemTimezoneChange() { - nsJSUtils::ResetTimeZone(); + // If we have JS, then we also need to update the JS timezone. + if (JS_IsInitialized()) { + nsJSUtils::ResetTimeZone(); + } nsCOMPtr<nsIObserverService> obsSvc = mozilla::services::GetObserverService(); if (obsSvc) {