haikuwebkit/LayoutTests/platform/glib/js/dom
Ross Kirsling 0250716efb [JSC] Add missing detached buffer errors for DataView
https://bugs.webkit.org/show_bug.cgi?id=216062

Reviewed by Yusuke Suzuki.

JSTests:

* stress/detached-buffer-typeerror.js:
Add new test.

* stress/dataview-jit-neuter.js:
* stress/native-constructors-length.js:
Update existing tests.

* test262/expectations.yaml:
Mark 74 test cases as passing.

Source/JavaScriptCore:

DataView methods are often expected to throw a TypeError if the underlying ArrayBuffer is detached
(or neutered, in older terminology) -- this patch adds a slew of missing cases from the following spec section:
  - https://tc39.es/ecma262/#sec-properties-of-the-dataview-prototype-object

At the same time:
 - get rid of JSDataView::getOwnPropertySlot, which was turning dataViewProtoGetterByte{Length,Offset}
   into mostly unreachable code and erroneously causing byte{Length,Offset} to have property descriptors
 - perform some simple cleanup of neighboring error calls / messages
 - fix value of DataView.length (our only other DataView spec bug)

* runtime/JSDataView.cpp:
(JSC::JSDataView::create):
(JSC::JSDataView::getOwnPropertySlot): Deleted.
* runtime/JSDataView.h:
* runtime/JSDataViewPrototype.cpp:
(JSC::getData):
(JSC::setData):
(JSC::dataViewProtoGetterByteLength):
(JSC::dataViewProtoGetterByteOffset):
* runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::JSGenericTypedArrayViewConstructor<ViewClass>::finishCreation):

LayoutTests:

* fast/canvas/webgl/arraybuffer-transfer-of-control.html:
* js/dom/constructor-length.html:
* js/script-tests/typedarray-constructors.js:
* js/typedarray-constructors-expected.txt:
* platform/glib/js/dom/constructor-length-expected.txt:
* platform/ios/js/dom/constructor-length-expected.txt:
* platform/mac/js/dom/constructor-length-expected.txt:
* platform/win/js/dom/constructor-length-expected.txt:
* platform/wincairo/js/dom/constructor-length-expected.txt:
Update tests and expectations.


Canonical link: https://commits.webkit.org/228931@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-03 17:04:09 +00:00
..
constructor-length-expected.txt [JSC] Add missing detached buffer errors for DataView 2020-09-03 17:04:09 +00:00