1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:47:45 +00:00

LibJS: Do not throw a TypeError when sorting a detached TypedArray

This is a normative change in the ECMA-262 spec. See:
e0c74e1
This commit is contained in:
Timothy Flynn 2022-04-07 13:14:06 -04:00 committed by Linus Groh
parent d04a683f85
commit 84a81dd466
2 changed files with 18 additions and 3 deletions

View file

@ -952,9 +952,6 @@ static ThrowCompletionOr<void> typed_array_merge_sort(GlobalObject& global_objec
auto value = TRY(result.to_number(global_object));
if (buffer.is_detached())
return vm.throw_completion<TypeError>(global_object, ErrorType::DetachedArrayBuffer);
if (value.is_nan())
comparison_result = 0;
else