You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b807f03
Browse filesBrowse the repository at this point in the historyBrowse files
[JSC] Support @@species in ArrayBuffer / SharedArrayBuffer slice
https://bugs.webkit.org/show_bug.cgi?id=218697
Reviewed by Ross Kirsling.
JSTests:
* test262/expectations.yaml:
Source/JavaScriptCore:
This patch adds support for @@species in ArrayBuffer/SharedArrayBuffer.prototype.slice.
We leverage the mechanism similar to Array's @@species handling: adding fast path with watchpoint.
When we found that some of critical properties (e.g. %Prototype%.constructor, %Constructor%[@@species])
are modified, watchpoint is fired and we go to the slow path. Until that, we use fast path that is
basically the same to the code before this patch.
* runtime/ArrayBuffer.cpp:
(JSC::ArrayBuffer::slice const):
(JSC::ArrayBuffer::sliceWithClampedIndex const):
(JSC::ArrayBuffer::sliceImpl const): Deleted.
* runtime/ArrayBuffer.h:
* runtime/ArrayBufferSharingMode.h:
* runtime/ArrayPrototype.cpp:
(JSC::speciesWatchpointIsValid):
* runtime/JSArrayBufferPrototype.cpp:
(JSC::speciesWatchpointIsValid):
(JSC::arrayBufferSlice):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
(JSC::JSGlobalObject::tryInstallSpeciesWatchpoint):
(JSC::JSGlobalObject::tryInstallArraySpeciesWatchpoint):
(JSC::JSGlobalObject::tryInstallArrayBufferSpeciesWatchpoint):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::arrayBufferSpeciesWatchpointSet):
(JSC::JSGlobalObject::arrayBufferPrototype const):
(JSC::JSGlobalObject::arrayBufferStructure const):
(JSC::JSGlobalObject::arrayBufferConstructor const):
Source/WTF:
Remove ENABLE(SHARED_ARRAY_BUFFER) flag. We use Options::useSharedArrayBuffer() runtime flag instead.
* wtf/PlatformEnable.h:
Canonical link: https://commits.webkit.org/231365@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
default: 'Test262Error: An initialized binding is not created prior to evaluation Expected a ReferenceError to be thrown but no exception was thrown at all'
0 commit comments