Title: [258658] trunk/Source/WTF
- Revision
- 258658
- Author
- [email protected]
- Date
- 2020-03-18 12:28:39 -0700 (Wed, 18 Mar 2020)
Log Message
REGRESSION(r254389): Cordova throws an exception because it expects a hyphen inside navigator.locale
https://bugs.webkit.org/show_bug.cgi?id=208969
<rdar://problem/59845517>
Reviewed by Darin Adler.
We want to thwart fingerprinting by minimizing the list of locales, but we also don't want to break existing apps.
We can achieve both by a linked-on-or-after check.
* wtf/cocoa/LanguageCocoa.mm:
(WTF::canMinimizeLanguages):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (258657 => 258658)
--- trunk/Source/WTF/ChangeLog 2020-03-18 19:24:22 UTC (rev 258657)
+++ trunk/Source/WTF/ChangeLog 2020-03-18 19:28:39 UTC (rev 258658)
@@ -1,3 +1,17 @@
+2020-03-18 Myles C. Maxfield <[email protected]>
+
+ REGRESSION(r254389): Cordova throws an exception because it expects a hyphen inside navigator.locale
+ https://bugs.webkit.org/show_bug.cgi?id=208969
+ <rdar://problem/59845517>
+
+ Reviewed by Darin Adler.
+
+ We want to thwart fingerprinting by minimizing the list of locales, but we also don't want to break existing apps.
+ We can achieve both by a linked-on-or-after check.
+
+ * wtf/cocoa/LanguageCocoa.mm:
+ (WTF::canMinimizeLanguages):
+
2020-03-17 Alex Christensen <[email protected]>
REGRESSION(r254856) Add exception for window.openDatabase to not masquerade as undefined in currently shipping Jesus Calling Devotional app
Modified: trunk/Source/WTF/wtf/cocoa/LanguageCocoa.mm (258657 => 258658)
--- trunk/Source/WTF/wtf/cocoa/LanguageCocoa.mm 2020-03-18 19:24:22 UTC (rev 258657)
+++ trunk/Source/WTF/wtf/cocoa/LanguageCocoa.mm 2020-03-18 19:28:39 UTC (rev 258658)
@@ -27,6 +27,7 @@
#import <wtf/Language.h>
#import <wtf/NeverDestroyed.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
#import <wtf/spi/cocoa/NSLocaleSPI.h>
namespace WTF {
@@ -33,7 +34,17 @@
bool canMinimizeLanguages()
{
- static bool result = [NSLocale respondsToSelector:@selector(minimizedLanguagesFromLanguages:)];
+ static const bool result = []() -> bool {
+#if PLATFORM(MAC)
+ if (applicationSDKVersion() < DYLD_MACOSX_VERSION_10_15_4)
+ return false;
+#endif
+#if PLATFORM(IOS)
+ if (applicationSDKVersion() < DYLD_IOS_VERSION_13_4)
+ return false;
+#endif
+ return [NSLocale respondsToSelector:@selector(minimizedLanguagesFromLanguages:)];
+ }();
return result;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes