From 157bd2504f48b9a961a2bcdeeff85026b249af1c Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Wed, 2 Aug 2023 23:14:56 -0700 Subject: [PATCH] Revert 0dbab9b59262b0e710cd6443c94aae64d2b16da4 Superseded by 1b440efcb4ae8dbc2a031e14ad222cc411e6e61b --- .../builtins/TypedArrayConstructor.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/Source/JavaScriptCore/builtins/TypedArrayConstructor.js b/Source/JavaScriptCore/builtins/TypedArrayConstructor.js index 7f0f593d15662..c3acd21a270f5 100644 --- a/Source/JavaScriptCore/builtins/TypedArrayConstructor.js +++ b/Source/JavaScriptCore/builtins/TypedArrayConstructor.js @@ -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");