[webkit-changes] [WebKit/WebKit] 2da729: [JSC] `GroupBy` should throw when the number of it...

SUZUKI Sosuke noreply at github.com
Sun Oct 6 04:20:55 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2da72919849f061936ab55e1b918381c662d86c7
      https://github.com/WebKit/WebKit/commit/2da72919849f061936ab55e1b918381c662d86c7
  Author: Sosuke Suzuki <aosukeke at gmail.com>
  Date:   2024-10-06 (Sun, 06 Oct 2024)

  Changed paths:
    M Source/JavaScriptCore/builtins/MapConstructor.js
    M Source/JavaScriptCore/builtins/ObjectConstructor.js

  Log Message:
  -----------
  [JSC] `GroupBy` should throw when the number of iterations exceed 2^53 - 1
https://bugs.webkit.org/show_bug.cgi?id=280927

Reviewed by Yusuke Suzuki.

According to the spec[1], `GroupBy` should throw a TypeError when the number of iterations exceeds
2^53-1. Although it takes a very long time to reach this condition, it is not impossible. However,
the current JSC does not throw a TypeError in such cases.

This patch changes the behavior to conform to the specification.

[1]: https://tc39.es/ecma262/#sec-groupby

* Source/JavaScriptCore/builtins/MapConstructor.js:
(groupBy):
* Source/JavaScriptCore/builtins/ObjectConstructor.js:
(groupBy):

Canonical link: https://commits.webkit.org/284739@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list