Ignore:
Timestamp:
Oct 5, 2020, 11:31:06 PM (5 years ago)
Author:
Ross Kirsling
Message:

%TypedArray%.from must do mapping and putting in lockstep
https://bugs.webkit.org/show_bug.cgi?id=217349

Reviewed by Yusuke Suzuki.

JSTests:

  • test262/expectations.yaml:

Mark two test cases as passing.

Source/JavaScriptCore:

%TypedArray%.from first turns the input iterator into a list to find the size for the resulting typed array,
then it fills the typed array with the list elements.

If a map function is provided, however, it must be called during the *second* phase, not the first,
because if an element throws upon valueOf, that should prevent all further calls of the map function.

  • builtins/TypedArrayConstructor.js:

(from):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r268013 r268037  
     12020-10-05  Ross Kirsling  <[email protected]>
     2
     3        %TypedArray%.from must do mapping and putting in lockstep
     4        https://bugs.webkit.org/show_bug.cgi?id=217349
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        %TypedArray%.from first turns the input iterator into a list to find the size for the resulting typed array,
     9        then it fills the typed array with the list elements.
     10
     11        If a map function is provided, however, it must be called during the *second* phase, not the first,
     12        because if an element throws upon valueOf, that should prevent all further calls of the map function.
     13
     14        * builtins/TypedArrayConstructor.js:
     15        (from):
     16
    1172020-10-05  Yusuke Suzuki  <[email protected]>
    218
Note: See TracChangeset for help on using the changeset viewer.