Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d59de52c72dff2767ba7e08117743faee6bee512
      
https://github.com/WebKit/WebKit/commit/d59de52c72dff2767ba7e08117743faee6bee512
  Author: Sergey Rubanov <[email protected]>
  Date:   2026-10-07 (Wed, 07 Oct 2026)

  Changed paths:
    A JSTests/stress/array-from-async-construct-order.js
    M Source/JavaScriptCore/builtins/ArrayConstructor.js

  Log Message:
  -----------
  [JSC] Read async iterator next before Array.fromAsync constructs this
https://bugs.webkit.org/show_bug.cgi?id=326074

Reviewed by Yusuke Suzuki.

GetIteratorFromMethod reads "next" after it calls @@asyncIterator and
before Array.fromAsync constructs its this value. The async path built
that value first, so a throwing next getter ran after the constructor.
The sync path already read "next" first. The async path keeps that
next method and calls it, so the iterator is not wrapped again. The
object check and the read run in the async helper, so a throw rejects
the promise fromAsync returns.

* JSTests/stress/array-from-async-construct-order.js:
* Source/JavaScriptCore/builtins/ArrayConstructor.js:
(defaultAsyncFromAsyncIteratorWithNext):
(fromAsync):

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



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

Reply via email to