Commit e99f5f6
committed
toLocaleLowerCase and toLocaleUpperCase do not throw on empty string
https://bugs.webkit.org/show_bug.cgi?id=250903
rdar://104568214
Reviewed by Alexey Shvayka.
This patch aligns our toLocaleLowerCase and toLocaleUpperCase for invalid locale tag + empty string edge case to the spec.
We should optimize empty string case only when locale is not specified.
* JSTests/stress/empty-string-locale-case-convert.js: Added.
(shouldThrow):
* Source/JavaScriptCore/runtime/StringPrototype.cpp:
(JSC::toLocaleCase):
Canonical link: https://commits.webkit.org/259242@main1 parent e73104b commit e99f5f6
File tree
2 files changed
+31
-2
lines changed- JSTests/stress
- Source/JavaScriptCore/runtime
2 files changed
+31
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1370 | 1370 | | |
1371 | 1371 | | |
1372 | 1372 | | |
| 1373 | + | |
| 1374 | + | |
1373 | 1375 | | |
1374 | | - | |
| 1376 | + | |
1375 | 1377 | | |
1376 | 1378 | | |
1377 | 1379 | | |
1378 | | - | |
| 1380 | + | |
1379 | 1381 | | |
1380 | 1382 | | |
1381 | 1383 | | |
| |||
0 commit comments