Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 605bd7edf69445e082f71fc5b288b68b28c36045
      
https://github.com/WebKit/WebKit/commit/605bd7edf69445e082f71fc5b288b68b28c36045
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    A JSTests/stress/async-generator-fast-consumer-species-tamper-during.js
    M Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
    M Source/JavaScriptCore/jit/JITCall.cpp
    M Source/JavaScriptCore/jit/JITOperations.cpp
    M Source/JavaScriptCore/jit/JITOperations.h
    M Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
    M Source/JavaScriptCore/runtime/AsyncGeneratorPrototype.cpp
    M Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
    M Source/JavaScriptCore/runtime/JSAsyncGenerator.h
    M Source/JavaScriptCore/runtime/JSMicrotask.cpp
    M Source/JavaScriptCore/runtime/JSMicrotask.h

  Log Message:
  -----------
  [JSC] for-await fast consumer must re-check the Promise species watchpoint
https://bugs.webkit.org/show_bug.cgi?id=319530
rdar://182353926

Reviewed by Yijia Huang.

FastAsyncGenerator fast path should skip promise creation only when
promise watchpoint is not fired since PromiseResolve accesses 
promise.constructor,
so if we are setting a getter in Promise.prototype.constructor etc.,
skipping this is observable.

1. LLInt and Baseline checks this watchpoint. And going to the slow path
   when it is already fired.
2. In DFG / FTL, subscribing this watchpoint and calling a fast path. If
   this watchpoint is already fired, going to the slow path code.

Test: JSTests/stress/async-generator-fast-consumer-species-tamper-during.js

* JSTests/stress/async-generator-fast-consumer-species-tamper-during.js: Added.
(assert):
(armReadCounter):
(get restoreCtor):
(async asyncGeneratorTamperDuring.async g):
(async asyncGeneratorTamperDuring):
(async main):
* Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleAsyncIteratorOpen):
* Source/JavaScriptCore/jit/JITCall.cpp:
(JSC::JIT::emit_op_async_iterator_next):
* Source/JavaScriptCore/jit/JITOperations.cpp:
(JSC::JSC_DEFINE_JIT_OPERATION):
* Source/JavaScriptCore/jit/JITOperations.h:
* Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* Source/JavaScriptCore/runtime/AsyncGeneratorPrototype.cpp:
(JSC::asyncGeneratorNext):
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/CommonSlowPaths.cpp:
(JSC::asyncIteratorOpenTryFastImpl):
* Source/JavaScriptCore/runtime/JSAsyncGenerator.h:
* Source/JavaScriptCore/runtime/JSMicrotask.cpp:
(JSC::asyncIteratorNextWithDriver):
* Source/JavaScriptCore/runtime/JSMicrotask.h:

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



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

Reply via email to