[webkit-changes] [WebKit/WebKit] d9e584: [JSC] Create (async) generator object after perfor...
Commit Queue
noreply at github.com
Thu Oct 26 13:14:30 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d9e5846a73b15cd274436a0f8abff8d1c00241fb
https://github.com/WebKit/WebKit/commit/d9e5846a73b15cd274436a0f8abff8d1c00241fb
Author: Alexey Shvayka <ashvayka at apple.com>
Date: 2023-10-26 (Thu, 26 Oct 2023)
Changed paths:
A JSTests/stress/regress-263617.js
M JSTests/test262/expectations.yaml
M Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
Log Message:
-----------
[JSC] Create (async) generator object after performing FunctionDeclarationInstantiation
https://bugs.webkit.org/show_bug.cgi?id=263617
<rdar://problem/117439419>
Reviewed by Justin Michaud.
initializeDefaultParameterValuesAndSetupFunctionScopeStack(), which implements steps 25-26 of
FunctionDeclarationInstantiation [1], may call into arbitrary userland code when evaluating
default parameters, affecting the [[Prototype]] of created & returned (async) generator object.
With this change, (async) generator object creation happens after parameter initialization,
aligning JSC with the spec [1][2] and SpiderMonkey.
[1]: https://tc39.es/ecma262/#sec-functiondeclarationinstantiation
[2]: https://tc39.es/ecma262/#sec-runtime-semantics-evaluategeneratorbody (step 2)
[3]: https://tc39.es/ecma262/#sec-runtime-semantics-evaluateasyncgeneratorbody (step 2)
* JSTests/stress/regress-263617.js: Added.
* JSTests/test262/expectations.yaml: Mark 8 tests as passing.
* Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
Canonical link: https://commits.webkit.org/269823@main
More information about the webkit-changes
mailing list