[Webkit-unassigned] [Bug 232723] New: Array.prototype.toLocaleString does not respect deletion of Object.prototype.toLocaleString

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 4 13:24:46 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=232723

            Bug ID: 232723
           Summary: Array.prototype.toLocaleString does not respect
                    deletion of Object.prototype.toLocaleString
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: richard.gibson at gmail.com

The algorithm at https://tc39.es/ecma402/#sup-array.prototype.tolocalestring requires looking up a "toLocaleString" property on each non-undefined non-null element of the receiver array, invoking it as a method, and (absent an exception) passing the result through ToString. However, JSC appears to have a hidden but always-present default method.

The following statement list should throw an exception, but does not:
  delete Object.prototype.toLocaleString;
  [{}].toLocaleString();

Also reported to test262 for coverage: https://github.com/tc39/test262/issues/3298

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211104/fc7168df/attachment-0001.htm>


More information about the webkit-unassigned mailing list