[Webkit-unassigned] [Bug 193127] New: Array.prototype.flat/flatMap have a minor bug in ArraySpeciesCreate

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 3 15:49:31 PST 2019


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

            Bug ID: 193127
           Summary: Array.prototype.flat/flatMap have a minor bug in
                    ArraySpeciesCreate
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: littledan at chromium.org

There seems to be an = missing on line 764 of builtins/ArrayPrototype.js

Test case: 
new (class extends Array { static get [Symbol.species]() { return document.all; } })(1, 2, 3).flat().constructor

This should throw a TypeError (as document.all is not a constructor), but instead it returns Array (as document.all == null). map and filter have the correct error-throwing semantics.

-- 
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/20190103/53ec649a/attachment.html>


More information about the webkit-unassigned mailing list