Title: [231505] branches/safari-605-branch
Revision
231505
Author
[email protected]
Date
2018-05-08 12:42:17 -0700 (Tue, 08 May 2018)

Log Message

Cherry-pick r231196. rdar://problem/40050709

    IntlObject.cpp::removeUnicodeLocaleExtension() should not touch locales that end in '-u'
    https://bugs.webkit.org/show_bug.cgi?id=185162

    Reviewed by Filip Pizlo.

    JSTests:

    * stress/incomplete-unicode-locale.js: Added.
    (catch):

    Source/_javascript_Core:

    * runtime/IntlObject.cpp:
    (JSC::removeUnicodeLocaleExtension):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231196 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Added Paths

Diff

Modified: branches/safari-605-branch/JSTests/ChangeLog (231504 => 231505)


--- branches/safari-605-branch/JSTests/ChangeLog	2018-05-08 19:42:15 UTC (rev 231504)
+++ branches/safari-605-branch/JSTests/ChangeLog	2018-05-08 19:42:17 UTC (rev 231505)
@@ -1,5 +1,37 @@
 2018-05-08  Jason Marcell  <[email protected]>
 
+        Cherry-pick r231196. rdar://problem/40050709
+
+    IntlObject.cpp::removeUnicodeLocaleExtension() should not touch locales that end in '-u'
+    https://bugs.webkit.org/show_bug.cgi?id=185162
+    
+    Reviewed by Filip Pizlo.
+    
+    JSTests:
+    
+    * stress/incomplete-unicode-locale.js: Added.
+    (catch):
+    
+    Source/_javascript_Core:
+    
+    * runtime/IntlObject.cpp:
+    (JSC::removeUnicodeLocaleExtension):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2018-05-01  Robin Morisset  <[email protected]>
+
+            IntlObject.cpp::removeUnicodeLocaleExtension() should not touch locales that end in '-u'
+            https://bugs.webkit.org/show_bug.cgi?id=185162
+
+            Reviewed by Filip Pizlo.
+
+            * stress/incomplete-unicode-locale.js: Added.
+            (catch):
+
+2018-05-08  Jason Marcell  <[email protected]>
+
         Cherry-pick r231034. rdar://problem/40050717
 
     In FTLLowerDFGToB3.cpp::compileCreateRest, always use a contiguous array as the indexing type when under isWatchingHavingABadTimeWatchpoint

Added: branches/safari-605-branch/JSTests/stress/incomplete-unicode-locale.js (0 => 231505)


--- branches/safari-605-branch/JSTests/stress/incomplete-unicode-locale.js	                        (rev 0)
+++ branches/safari-605-branch/JSTests/stress/incomplete-unicode-locale.js	2018-05-08 19:42:17 UTC (rev 231505)
@@ -0,0 +1,3 @@
+try {
+    new Intl.NumberFormat("en-x-u");
+} catch (e) {}

Modified: branches/safari-605-branch/Source/_javascript_Core/ChangeLog (231504 => 231505)


--- branches/safari-605-branch/Source/_javascript_Core/ChangeLog	2018-05-08 19:42:15 UTC (rev 231504)
+++ branches/safari-605-branch/Source/_javascript_Core/ChangeLog	2018-05-08 19:42:17 UTC (rev 231505)
@@ -1,5 +1,37 @@
 2018-05-08  Jason Marcell  <[email protected]>
 
+        Cherry-pick r231196. rdar://problem/40050709
+
+    IntlObject.cpp::removeUnicodeLocaleExtension() should not touch locales that end in '-u'
+    https://bugs.webkit.org/show_bug.cgi?id=185162
+    
+    Reviewed by Filip Pizlo.
+    
+    JSTests:
+    
+    * stress/incomplete-unicode-locale.js: Added.
+    (catch):
+    
+    Source/_javascript_Core:
+    
+    * runtime/IntlObject.cpp:
+    (JSC::removeUnicodeLocaleExtension):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2018-05-01  Robin Morisset  <[email protected]>
+
+            IntlObject.cpp::removeUnicodeLocaleExtension() should not touch locales that end in '-u'
+            https://bugs.webkit.org/show_bug.cgi?id=185162
+
+            Reviewed by Filip Pizlo.
+
+            * runtime/IntlObject.cpp:
+            (JSC::removeUnicodeLocaleExtension):
+
+2018-05-08  Jason Marcell  <[email protected]>
+
         Cherry-pick r231034. rdar://problem/40050717
 
     In FTLLowerDFGToB3.cpp::compileCreateRest, always use a contiguous array as the indexing type when under isWatchingHavingABadTimeWatchpoint

Modified: branches/safari-605-branch/Source/_javascript_Core/runtime/IntlObject.cpp (231504 => 231505)


--- branches/safari-605-branch/Source/_javascript_Core/runtime/IntlObject.cpp	2018-05-08 19:42:15 UTC (rev 231504)
+++ branches/safari-605-branch/Source/_javascript_Core/runtime/IntlObject.cpp	2018-05-08 19:42:17 UTC (rev 231505)
@@ -603,7 +603,7 @@
     if (partsSize > 0)
         builder.append(parts[0]);
     for (size_t p = 1; p < partsSize; ++p) {
-        if (parts[p] == "u") {
+        if (parts[p] == "u" && p + 1 < partsSize) {
             // Skip the u- and anything that follows until another singleton.
             // While the next part is part of the unicode extension, skip it.
             while (p + 1 < partsSize && parts[p + 1].length() > 1)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to