Skip to content

Commit

Permalink
Revert 0dbab9b
Browse files Browse the repository at this point in the history
Superseded by 1b440ef
  • Loading branch information
Jarred-Sumner committed Aug 3, 2023
1 parent 3a53c6a commit 157bd25
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions Source/JavaScriptCore/builtins/TypedArrayConstructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,6 @@ function from(items /* [ , mapfn [ , thisArg ] ] */)
}

var iteratorMethod = items.@@iterator;

if (!mapFn && @isTypedArrayView(arrayLike)) {
var arrayLikeLength = @toLength(arrayLike.length);

var result = new this(arrayLikeLength);
if (@typedArrayLength(result) < arrayLikeLength)
@throwTypeError("TypedArray.from constructed typed array of insufficient length");

// This is not precise enough I think?
// .slice() isn't exactly right because the arrays could be a different type
this.prototype.set.@call(result, arrayLike);
return result;
}

if (!@isUndefinedOrNull(iteratorMethod)) {
if (!@isCallable(iteratorMethod))
@throwTypeError("TypedArray.from requires that the property of the first argument, items[Symbol.iterator], when exists, be a function");
Expand Down

0 comments on commit 157bd25

Please sign in to comment.