LibJS: Update two comments saying "completion value"

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

See: 7913cea
This commit is contained in:
Linus Groh 2022-05-03 21:23:12 +02:00
parent 99cc442f5c
commit 03e13715ac
Notes: sideshowbarker 2024-07-17 11:20:11 +09:00
2 changed files with 4 additions and 5 deletions

View file

@ -768,7 +768,7 @@ void async_block_start(VM& vm, NonnullRefPtr<Statement> const& async_body, Promi
// 6. Assert: When we return here, asyncContext has already been removed from the execution context stack and runningContext is the currently running execution context. // 6. Assert: When we return here, asyncContext has already been removed from the execution context stack and runningContext is the currently running execution context.
VERIFY(&vm.running_execution_context() == &running_context); VERIFY(&vm.running_execution_context() == &running_context);
// 7. Assert: result is a normal completion with a value of unused. The possible sources of completion values are Await or, if the async function doesn't await anything, step 3.g above. // 7. Assert: result is a normal completion with a value of unused. The possible sources of this value are Await or, if the async function doesn't await anything, step 3.g above.
VERIFY(result.has_value() && result.value().is_undefined()); VERIFY(result.has_value() && result.value().is_undefined());
// 8. Return unused. // 8. Return unused.

View file

@ -934,10 +934,9 @@ void VM::import_module_dynamically(ScriptOrModule referencing_script_or_module,
// - At some future time, the host environment must perform FinishDynamicImport(referencingScriptOrModule, moduleRequest, promiseCapability, promise), // - At some future time, the host environment must perform FinishDynamicImport(referencingScriptOrModule, moduleRequest, promiseCapability, promise),
// where promise is a Promise resolved with undefined. // where promise is a Promise resolved with undefined.
// - Any subsequent call to HostResolveImportedModule after FinishDynamicImport has completed, // - Any subsequent call to HostResolveImportedModule after FinishDynamicImport has completed,
// given the arguments referencingScriptOrModule and moduleRequest, must complete normally. // given the arguments referencingScriptOrModule and specifier, must return a normal completion
// - The completion value of any subsequent call to HostResolveImportedModule after FinishDynamicImport has completed, // containing a module which has already been evaluated, i.e. whose Evaluate concrete method has
// given the arguments referencingScriptOrModule and moduleRequest, must be a module which has already been evaluated, // already been called and returned a normal completion.
// i.e. whose Evaluate concrete method has already been called and returned a normal completion.
// Failure path: // Failure path:
// - At some future time, the host environment must perform // - At some future time, the host environment must perform
// FinishDynamicImport(referencingScriptOrModule, moduleRequest, promiseCapability, promise), // FinishDynamicImport(referencingScriptOrModule, moduleRequest, promiseCapability, promise),