WebKit Bugzilla
Attachment 339196 Details for
Bug 185162
: IntlObject.cpp::removeUnicodeLocaleExtension() should not touch locales that end in '-u'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185162-20180501164545.patch (text/plain), 2.54 KB, created by
Robin Morisset
on 2018-05-01 07:45:46 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Robin Morisset
Created:
2018-05-01 07:45:46 PDT
Size:
2.54 KB
patch
obsolete
>Subversion Revision: 231194 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 28fd4e3adc0f2cb21899a6663dc62cea9c002240..8ab83fb2385b91341115169c477b7d0ca9ef1abb 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,13 @@ >+2018-05-01 Robin Morisset <rmorisset@apple.com> >+ >+ IntlObject.cpp::removeUnicodeLocaleExtension() should not touch locales that end in '-u' >+ https://bugs.webkit.org/show_bug.cgi?id=185162 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * runtime/IntlObject.cpp: >+ (JSC::removeUnicodeLocaleExtension): >+ > 2018-05-01 Oleksandr Skachkov <gskachkov@gmail.com> > > WebAssembly: add support for stream APIs - JavaScript API >diff --git a/Source/JavaScriptCore/runtime/IntlObject.cpp b/Source/JavaScriptCore/runtime/IntlObject.cpp >index 2b4c07fc860cd680c1dfdb74d79692b5046b370b..4a7f6de712a74966ac7258b8074223989d9376f5 100644 >--- a/Source/JavaScriptCore/runtime/IntlObject.cpp >+++ b/Source/JavaScriptCore/runtime/IntlObject.cpp >@@ -614,7 +614,7 @@ String removeUnicodeLocaleExtension(const String& locale) > 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) >diff --git a/JSTests/ChangeLog b/JSTests/ChangeLog >index 636a83c1cf2bb35f4ec8730a2a829c550cc2cd63..a0707bf2c0e859bf2347d39944eee88948792e55 100644 >--- a/JSTests/ChangeLog >+++ b/JSTests/ChangeLog >@@ -1,3 +1,13 @@ >+2018-05-01 Robin Morisset <rmorisset@apple.com> >+ >+ IntlObject.cpp::removeUnicodeLocaleExtension() should not touch locales that end in '-u' >+ https://bugs.webkit.org/show_bug.cgi?id=185162 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * stress/incomplete-unicode-locale.js: Added. >+ (catch): >+ > 2018-04-30 Saam Barati <sbarati@apple.com> > > ToString constant folds without preserving checks, causing us to break assumptions that the code would OSR exit >diff --git a/JSTests/stress/incomplete-unicode-locale.js b/JSTests/stress/incomplete-unicode-locale.js >new file mode 100644 >index 0000000000000000000000000000000000000000..c96be83bd80bbdfded33a40507edda9d09e108ae >--- /dev/null >+++ b/JSTests/stress/incomplete-unicode-locale.js >@@ -0,0 +1,3 @@ >+try { >+ new Intl.NumberFormat("en-x-u"); >+} catch (e) {}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185162
: 339196