diff options
author | Linus Groh <mail@linusgroh.de> | 2022-05-05 09:28:08 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-05-05 09:28:08 +0200 |
commit | 2fc9481bb612b1a8d02c74fd1cd3f55b723ac0bb (patch) | |
tree | 6b66557e777c6945385dcef7b8d577b5bd548f8b /Userland | |
parent | 272cf3cbd5e4e7e160bb3abe8b4b25626039598f (diff) | |
download | serenity-2fc9481bb612b1a8d02c74fd1cd3f55b723ac0bb.zip |
LibJS: Correct SetMutableBinding fallibility bug in spec comment
This is an editorial change in the ECMA-262 spec.
See: https://github.com/tc39/ecma262/commit/656f0cf
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/GlobalEnvironment.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/GlobalEnvironment.cpp b/Userland/Libraries/LibJS/Runtime/GlobalEnvironment.cpp index dfa52dac16..d7f2f3d257 100644 --- a/Userland/Libraries/LibJS/Runtime/GlobalEnvironment.cpp +++ b/Userland/Libraries/LibJS/Runtime/GlobalEnvironment.cpp @@ -97,9 +97,7 @@ ThrowCompletionOr<void> GlobalEnvironment::set_mutable_binding(GlobalObject& glo // 1. Let DclRec be envRec.[[DeclarativeRecord]]. // 2. If ! DclRec.HasBinding(N) is true, then if (MUST(m_declarative_record->has_binding(name))) { - // a. Return ! DclRec.SetMutableBinding(N, V, S). - // FIXME: Using MUST here breaks 22 tests in test262 (spec issue). - // Example: `function f() { x = 1; } f(); let x;` + // a. Return ? DclRec.SetMutableBinding(N, V, S). return m_declarative_record->set_mutable_binding(global_object, name, value, strict); } |