[webkit-changes] [WebKit/WebKit] b56ff5: [JSC] DataView constructor should check if byteOff...

SUZUKI Sosuke noreply at github.com
Sat May 4 20:46:46 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b56ff58373f19371af18fbb1a77833d898e80de9
      https://github.com/WebKit/WebKit/commit/b56ff58373f19371af18fbb1a77833d898e80de9
  Author: sosukesuzuki <aosukeke at gmail.com>
  Date:   2024-05-04 (Sat, 04 May 2024)

  Changed paths:
    M JSTests/stress/dataview-construct.js
    M JSTests/test262/expectations.yaml
    M Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h

  Log Message:
  -----------
  [JSC] DataView constructor should check if byteOffset exceeds source ArrayBuffer length before creating an instance
https://bugs.webkit.org/show_bug.cgi?id=273689

Reviewed by Yusuke Suzuki.

According to the spec[1], should check if byteOffset exceeds source ArrayBuffer length before
creating an instance. This patch fixes the test case that is failing in test262[2].

[1]: https://tc39.es/ecma262/#sec-dataview-buffer-byteoffset-bytelength
[2]: https://github.com/tc39/test262/blob/main/test/built-ins/DataView/byteOffset-validated-against-initial-buffer-length.js

* JSTests/stress/dataview-construct.js:
(shouldThrow):
* JSTests/test262/expectations.yaml:
* Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::constructGenericTypedArrayViewImpl):

Canonical link: https://commits.webkit.org/278385@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list