Changeset 270371 in webkit
- Timestamp:
- Dec 2, 2020 2:57:13 PM (20 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/test262/expectations.yaml (modified) (1 diff)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r270344 r270371 1 2020-12-02 Ross Kirsling <ross.kirsling@sony.com> 2 3 %TypedArray%#slice shouldn't care about source buffer detachment if there's nothing to copy 4 https://bugs.webkit.org/show_bug.cgi?id=219451 5 6 Reviewed by Yusuke Suzuki. 7 8 * test262/expectations.yaml: 9 Mark four test cases as passing. 10 1 11 2020-12-02 Dmitry Bezhetskov <dbezhetskov@igalia.com> 2 12 -
trunk/JSTests/test262/expectations.yaml
r270005 r270371 833 833 default: 'Test262Error: Expected a TypeError to be thrown but no exception was thrown at all (Testing with Float64Array.)' 834 834 strict mode: 'Test262Error: Expected a TypeError to be thrown but no exception was thrown at all (Testing with Float64Array.)' 835 test/built-ins/TypedArray/prototype/slice/detached-buffer-zero-count-custom-ctor-other-targettype.js:836 default: 'TypeError: Underlying ArrayBuffer has been detached from the view (Testing with Float64Array.)'837 strict mode: 'TypeError: Underlying ArrayBuffer has been detached from the view (Testing with Float64Array.)'838 test/built-ins/TypedArray/prototype/slice/detached-buffer-zero-count-custom-ctor-same-targettype.js:839 default: 'TypeError: Underlying ArrayBuffer has been detached from the view (Testing with Float64Array.)'840 strict mode: 'TypeError: Underlying ArrayBuffer has been detached from the view (Testing with Float64Array.)'841 835 test/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-to-number-detachbuffer.js: 842 836 default: 'Test262Error: Expected a TypeError but got a RangeError (Testing with Float64Array.)' -
trunk/Source/JavaScriptCore/ChangeLog
r270344 r270371 1 2020-12-02 Ross Kirsling <ross.kirsling@sony.com> 2 3 %TypedArray%#slice shouldn't care about source buffer detachment if there's nothing to copy 4 https://bugs.webkit.org/show_bug.cgi?id=219451 5 6 Reviewed by Yusuke Suzuki. 7 8 From https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice: 9 13. Let A be ? TypedArraySpeciesCreate(O, « 𝔽(count) »). 10 14. If count > 0, then 11 a. If IsDetachedBuffer(O.[[ViewedArrayBuffer]]) is true, throw a TypeError exception. 12 ... 13 15. Return A. 14 15 We had step 14.a raised above 14; this patch fixes the ordering. 16 17 * runtime/JSGenericTypedArrayViewPrototypeFunctions.h: 18 (JSC::genericTypedArrayViewProtoFuncSlice): 19 1 20 2020-12-02 Dmitry Bezhetskov <dbezhetskov@igalia.com> 2 21 -
trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h
r269670 r270371 453 453 }); 454 454 RETURN_IF_EXCEPTION(scope, encodedJSValue()); 455 456 455 ASSERT(!result->isDetached()); 457 if (thisObject->isDetached())458 return throwVMTypeError(globalObject, scope, typedArrayBufferHasBeenDetachedErrorMessage);459 456 460 457 // We return early here since we don't allocate a backing store if length is 0 and memmove does not like nullptrs 461 458 if (!length) 462 459 return JSValue::encode(result); 460 461 if (thisObject->isDetached()) 462 return throwVMTypeError(globalObject, scope, typedArrayBufferHasBeenDetachedErrorMessage); 463 463 464 464 // The species constructor may return an array with any arbitrary length.
Note: See TracChangeset
for help on using the changeset viewer.