Skip to content

Commit c6b4263

Browse files
authored
browser(webkit): fix timezone overrides after last roll (#4329)
1 parent 799604c commit c6b4263

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

browser_patches/webkit/BUILD_NUMBER

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
1375
2-
Changed: [email protected] Tue Nov 3 14:23:35 PST 2020
1+
1376
2+
Changed: [email protected] Tue 03 Nov 2020 02:47:20 PM PST

browser_patches/webkit/patches/bootstrap.diff

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,6 +1417,29 @@ index f51cb02ee88d86c997a2332c5cc0d01b4641be1c..342ad6b5402afaa7883e3656d1564166
14171417
String canonical;
14181418

14191419
Vector<UChar, 32> buffer;
1420+
diff --git a/Source/JavaScriptCore/runtime/JSDateMath.cpp b/Source/JavaScriptCore/runtime/JSDateMath.cpp
1421+
index 509aed3b93418c5edecbc7fcdad2b972382f692d..f8c267b01b50e0274703434b7b84098a376a667c 100644
1422+
--- a/Source/JavaScriptCore/runtime/JSDateMath.cpp
1423+
+++ b/Source/JavaScriptCore/runtime/JSDateMath.cpp
1424+
@@ -75,6 +75,7 @@
1425+
#include "ExceptionHelpers.h"
1426+
#include "VM.h"
1427+
#include <limits>
1428+
+#include <wtf/DateMath.h>
1429+
1430+
// icu::TimeZone and icu::BasicTimeZone features are only available in ICU C++ APIs.
1431+
// We use these C++ APIs as an exception.
1432+
@@ -195,7 +196,9 @@ void DateCache::timeZoneCacheSlow()
1433+
{
1434+
// Do not use icu::TimeZone::createDefault. ICU internally has a cache for timezone and createDefault returns this cached value.
1435+
ASSERT(!m_timeZoneCache);
1436+
- m_timeZoneCache = std::unique_ptr<OpaqueICUTimeZone, OpaqueICUTimeZoneDeleter>(bitwise_cast<OpaqueICUTimeZone*>(icu::TimeZone::detectHostTimeZone()));
1437+
+ String override = WTF::timeZoneForAutomation();
1438+
+ auto* timezone = override.isEmpty() ? icu::TimeZone::detectHostTimeZone() : icu::TimeZone::createTimeZone(override.utf8().data());
1439+
+ m_timeZoneCache = std::unique_ptr<OpaqueICUTimeZone, OpaqueICUTimeZoneDeleter>(bitwise_cast<OpaqueICUTimeZone*>(timezone));
1440+
}
1441+
1442+
void DateCache::reset()
14201443
diff --git a/Source/ThirdParty/libwebrtc/CMakeLists.txt b/Source/ThirdParty/libwebrtc/CMakeLists.txt
14211444
index 5d216b16f31c0f7bd095f9e9f6e0eac0ead90d2f..61a48cd9a06dffd8e3397570c32fb1e18157f385 100644
14221445
--- a/Source/ThirdParty/libwebrtc/CMakeLists.txt

0 commit comments

Comments
 (0)