Title: [291652] branches/safari-613-branch
- Revision
- 291652
- Author
- alanc...@apple.com
- Date
- 2022-03-22 10:55:50 -0700 (Tue, 22 Mar 2022)
Log Message
Cherry-pick r290981. rdar://problem/83326232
Remove invalid ASSERT in LocaleIDBuilder::overrideLanguageScriptRegion().
https://bugs.webkit.org/show_bug.cgi?id=237573
<rdar://problem/83326232>
Reviewed by Yusuke Suzuki.
JSTests:
* stress/handle-empty-localeID-in-localeIDBufferForLanguageTagWithNullTerminator.js: Added.
Source/_javascript_Core:
The ASSERT(length) in LocaleIDBuilder::overrideLanguageScriptRegion() is simply
incorrect. The length can be 0 if uloc_forLanguageTag returns a 0 length in
localeIDBufferForLanguageTagWithNullTerminator(). LocaleIDBuilder::overrideLanguageScriptRegion()
already handles this scenario correctly. We just need to remove this incorrect ASSERT.
Also verified that we're producing the same result on the attached test case as
Chrome and Firefox produces.
* runtime/IntlObject.cpp:
(JSC::localeIDBufferForLanguageTagWithNullTerminator):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Added Paths
Diff
Modified: branches/safari-613-branch/JSTests/ChangeLog (291651 => 291652)
--- branches/safari-613-branch/JSTests/ChangeLog 2022-03-22 17:55:46 UTC (rev 291651)
+++ branches/safari-613-branch/JSTests/ChangeLog 2022-03-22 17:55:50 UTC (rev 291652)
@@ -1,5 +1,45 @@
2022-03-21 Alan Coon <alanc...@apple.com>
+ Cherry-pick r290981. rdar://problem/83326232
+
+ Remove invalid ASSERT in LocaleIDBuilder::overrideLanguageScriptRegion().
+ https://bugs.webkit.org/show_bug.cgi?id=237573
+ <rdar://problem/83326232>
+
+ Reviewed by Yusuke Suzuki.
+
+ JSTests:
+
+ * stress/handle-empty-localeID-in-localeIDBufferForLanguageTagWithNullTerminator.js: Added.
+
+ Source/_javascript_Core:
+
+ The ASSERT(length) in LocaleIDBuilder::overrideLanguageScriptRegion() is simply
+ incorrect. The length can be 0 if uloc_forLanguageTag returns a 0 length in
+ localeIDBufferForLanguageTagWithNullTerminator(). LocaleIDBuilder::overrideLanguageScriptRegion()
+ already handles this scenario correctly. We just need to remove this incorrect ASSERT.
+
+ Also verified that we're producing the same result on the attached test case as
+ Chrome and Firefox produces.
+
+ * runtime/IntlObject.cpp:
+ (JSC::localeIDBufferForLanguageTagWithNullTerminator):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-03-08 Mark Lam <mark....@apple.com>
+
+ Remove invalid ASSERT in LocaleIDBuilder::overrideLanguageScriptRegion().
+ https://bugs.webkit.org/show_bug.cgi?id=237573
+ <rdar://problem/83326232>
+
+ Reviewed by Yusuke Suzuki.
+
+ * stress/handle-empty-localeID-in-localeIDBufferForLanguageTagWithNullTerminator.js: Added.
+
+2022-03-21 Alan Coon <alanc...@apple.com>
+
Cherry-pick r290517. rdar://problem/89428235
operationMaterializeObjectInOSR should DeferTerminationForAWhile instead of just DeferTermination.
Added: branches/safari-613-branch/JSTests/stress/handle-empty-localeID-in-localeIDBufferForLanguageTagWithNullTerminator.js (0 => 291652)
--- branches/safari-613-branch/JSTests/stress/handle-empty-localeID-in-localeIDBufferForLanguageTagWithNullTerminator.js (rev 0)
+++ branches/safari-613-branch/JSTests/stress/handle-empty-localeID-in-localeIDBufferForLanguageTagWithNullTerminator.js 2022-03-22 17:55:50 UTC (rev 291652)
@@ -0,0 +1,3 @@
+var result = new Intl.Locale('und', { language: 'ru' }).toString();
+if (result != "ru")
+ throw "FAILED";
Modified: branches/safari-613-branch/Source/_javascript_Core/ChangeLog (291651 => 291652)
--- branches/safari-613-branch/Source/_javascript_Core/ChangeLog 2022-03-22 17:55:46 UTC (rev 291651)
+++ branches/safari-613-branch/Source/_javascript_Core/ChangeLog 2022-03-22 17:55:50 UTC (rev 291652)
@@ -1,5 +1,54 @@
2022-03-21 Alan Coon <alanc...@apple.com>
+ Cherry-pick r290981. rdar://problem/83326232
+
+ Remove invalid ASSERT in LocaleIDBuilder::overrideLanguageScriptRegion().
+ https://bugs.webkit.org/show_bug.cgi?id=237573
+ <rdar://problem/83326232>
+
+ Reviewed by Yusuke Suzuki.
+
+ JSTests:
+
+ * stress/handle-empty-localeID-in-localeIDBufferForLanguageTagWithNullTerminator.js: Added.
+
+ Source/_javascript_Core:
+
+ The ASSERT(length) in LocaleIDBuilder::overrideLanguageScriptRegion() is simply
+ incorrect. The length can be 0 if uloc_forLanguageTag returns a 0 length in
+ localeIDBufferForLanguageTagWithNullTerminator(). LocaleIDBuilder::overrideLanguageScriptRegion()
+ already handles this scenario correctly. We just need to remove this incorrect ASSERT.
+
+ Also verified that we're producing the same result on the attached test case as
+ Chrome and Firefox produces.
+
+ * runtime/IntlObject.cpp:
+ (JSC::localeIDBufferForLanguageTagWithNullTerminator):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-03-08 Mark Lam <mark....@apple.com>
+
+ Remove invalid ASSERT in LocaleIDBuilder::overrideLanguageScriptRegion().
+ https://bugs.webkit.org/show_bug.cgi?id=237573
+ <rdar://problem/83326232>
+
+ Reviewed by Yusuke Suzuki.
+
+ The ASSERT(length) in LocaleIDBuilder::overrideLanguageScriptRegion() is simply
+ incorrect. The length can be 0 if uloc_forLanguageTag returns a 0 length in
+ localeIDBufferForLanguageTagWithNullTerminator(). LocaleIDBuilder::overrideLanguageScriptRegion()
+ already handles this scenario correctly. We just need to remove this incorrect ASSERT.
+
+ Also verified that we're producing the same result on the attached test case as
+ Chrome and Firefox produces.
+
+ * runtime/IntlObject.cpp:
+ (JSC::localeIDBufferForLanguageTagWithNullTerminator):
+
+2022-03-21 Alan Coon <alanc...@apple.com>
+
Cherry-pick r290873. rdar://problem/89770507
Fix JITOperationList::addPointers() to support JIT_OPERATION_VALIDATION_ASSERT_ENABLED.
Modified: branches/safari-613-branch/Source/_javascript_Core/runtime/IntlLocale.cpp (291651 => 291652)
--- branches/safari-613-branch/Source/_javascript_Core/runtime/IntlLocale.cpp 2022-03-22 17:55:46 UTC (rev 291651)
+++ branches/safari-613-branch/Source/_javascript_Core/runtime/IntlLocale.cpp 2022-03-22 17:55:50 UTC (rev 291652)
@@ -117,7 +117,6 @@
void LocaleIDBuilder::overrideLanguageScriptRegion(StringView language, StringView script, StringView region)
{
unsigned length = strlen(m_buffer.data());
- ASSERT(length);
StringView localeIDView { m_buffer.data(), length };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes