1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:47:44 +00:00

LibJS: Propagate out-of-memory errors from HostImportModuleDynamically

This commit is contained in:
Timothy Flynn 2023-02-17 07:30:42 -05:00 committed by Tim Flynn
parent f98d0acd27
commit f6503577f6
4 changed files with 12 additions and 9 deletions

View file

@ -3589,7 +3589,7 @@ Completion ImportCall::execute(Interpreter& interpreter) const
ModuleRequest request { specifier_string, assertions };
// 12. Perform HostImportModuleDynamically(referencingScriptOrModule, moduleRequest, promiseCapability).
interpreter.vm().host_import_module_dynamically(referencing_script_or_module, move(request), promise_capability);
MUST_OR_THROW_OOM(interpreter.vm().host_import_module_dynamically(referencing_script_or_module, move(request), promise_capability));
// 13. Return promiseCapability.[[Promise]].
return Value { promise_capability->promise() };