1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 13:35:07 +00:00

LibJS: Add an initialize binding hint to all initialize_binding methods

This will allow us to specify things like SyncDispose and perhaps
AsyncDispose in the future.
This commit is contained in:
davidot 2022-12-14 13:26:10 +01:00 committed by Linus Groh
parent 3353cf68f1
commit a746739cb0
14 changed files with 68 additions and 57 deletions

View file

@ -61,8 +61,8 @@ ThrowCompletionOr<void> SyntheticModule::link(VM& vm)
// a. Perform ! envRec.CreateMutableBinding(exportName, false).
MUST(environment->create_mutable_binding(vm, export_name, false));
// b. Perform ! envRec.InitializeBinding(exportName, undefined).
MUST(environment->initialize_binding(vm, export_name, js_undefined()));
// b. Perform ! envRec.InitializeBinding(exportName, undefined, normal).
MUST(environment->initialize_binding(vm, export_name, js_undefined(), Environment::InitializeBindingHint::Normal));
}
// 6. Return unused.