diff options
author | davidot <davidot@serenityos.org> | 2021-11-15 01:48:55 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-11-21 21:46:39 +0000 |
commit | 5d0f666f22db855fb6ecede5e6a570ba66efbec5 (patch) | |
tree | ebad032de01afaa1f2e1be9114590217bc1c63d3 /Userland/Libraries/LibJS/Runtime/FunctionConstructor.cpp | |
parent | de46a2cff1411519a71bfb04490ce9b805e2c09b (diff) | |
download | serenity-5d0f666f22db855fb6ecede5e6a570ba66efbec5.zip |
LibJS: Don't set a prototype property on async functions
This is now as defined in the spec. However since we execute async
functions in bytecode by transforming it to a generator function it must
have a prototype for the GeneratorObject. We check whether it is an
async function and in that case use the hardcoded generator object
prototype. This also ensures that user code cannot override this
property thus preventing exposing internal implementation details.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/FunctionConstructor.cpp')
0 files changed, 0 insertions, 0 deletions