Skip to content

Commit 83cd481

Browse files
committed
[JSC] Update TypedArray#sort to the latest resizable array buffer spec
https://bugs.webkit.org/show_bug.cgi?id=263311 rdar://117121720 Reviewed by Alexey Shvayka. This patch updates TypedArray#sort to align to the latest spec. We should not get the length again. This is observable in resizable array buffer. This patch also enables resizable array buffer test262 tests inside staging directory. * JSTests/test262/config.yaml: * Source/JavaScriptCore/builtins/TypedArrayPrototype.js: (linkTimeConstant.typedArrayMergeSort): Canonical link: https://commits.webkit.org/269458@main
1 parent 55a2864 commit 83cd481

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

JSTests/test262/config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ skip:
5555
- test/intl402/Temporal/PlainYearMonth
5656
- test/intl402/Temporal/TimeZone
5757
- test/intl402/Temporal/ZonedDateTime
58-
- test/staging
58+
- test/staging/Intl402
59+
- test/staging/JSON
60+
- test/staging/Temporal
5961
files:
6062
# https://github.com/claudepache/es-legacy-function-reflection
6163
- test/built-ins/ThrowTypeError/unique-per-realm-function-proto.js

Source/JavaScriptCore/builtins/TypedArrayPrototype.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ function typedArrayMergeSort(array, valueCount, comparator)
213213
}
214214

215215
if (src != array) {
216-
valueCount = @min(@typedArrayLength(array), valueCount);
217216
for (var i = 0; i < valueCount; ++i)
218217
array[i] = src[i];
219218
}

0 commit comments

Comments
 (0)