1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:27:45 +00:00

LibJS: Mark concrete method calls of Environment Records with ?/!

This is an editorial change in the ECMA-262 spec.

See: 7ae3ecf
This commit is contained in:
Linus Groh 2022-05-24 18:19:49 +01:00
parent cdc5ed2fb5
commit 89d4094709
3 changed files with 8 additions and 10 deletions

View file

@ -61,10 +61,10 @@ ThrowCompletionOr<void> SyntheticModule::link(VM& vm)
// 5. For each exportName in module.[[ExportNames]],
for (auto& export_name : m_export_names) {
// a. Perform ! envRec.CreateMutableBinding(exportName, false).
environment->create_mutable_binding(global_object, export_name, false);
MUST(environment->create_mutable_binding(global_object, export_name, false));
// b. Perform ! envRec.InitializeBinding(exportName, undefined).
environment->initialize_binding(global_object, export_name, js_undefined());
MUST(environment->initialize_binding(global_object, export_name, js_undefined()));
}
// 6. Return unused.