[webkit-changes] [WebKit/WebKit] e99f5f: toLocaleLowerCase and toLocaleUpperCase do not thr...

Yusuke Suzuki noreply at github.com
Mon Jan 23 14:22:26 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e99f5f69bf9084a0fcbc0f28992e6b20d2a9ba53
      https://github.com/WebKit/WebKit/commit/e99f5f69bf9084a0fcbc0f28992e6b20d2a9ba53
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2023-01-23 (Mon, 23 Jan 2023)

  Changed paths:
    A JSTests/stress/empty-string-locale-case-convert.js
    M Source/JavaScriptCore/runtime/StringPrototype.cpp

  Log Message:
  -----------
  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@main




More information about the webkit-changes mailing list