mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-14 07:02:54 +00:00
When using VM::set_variable() to put the created ScriptFunction onto a ScopeObject, we would previously unexpectedly reach the global object as set_variable() checks each traversed scope for an existing Variable with the given name - which would cause a leak of the inner function past the outer function (we even had a test expecting that behaviour!). Now we first declare functions (as DeclarationKind::Var) before setting them. This will need some more work to make hoisting across non-lexical scopes work, but it fixes this specific issue for now. Fixes #6766. |
||
---|---|---|
.. | ||
arrow-functions.js | ||
constructor-basic.js | ||
function-default-parameters.js | ||
function-duplicate-parameters.js | ||
function-hoisting.js | ||
function-length.js | ||
function-missing-arg.js | ||
function-name.js | ||
function-nesting.js | ||
function-new-target.js | ||
function-prototype-writable.js | ||
function-rest-params.js | ||
function-spread.js | ||
function-strict-mode.js | ||
function-this-in-arguments.js | ||
function-TypeError.js |