Skip to content

Commit 8a5993e

Browse files
fixup! vm: make vm.Module.evaluate() conditionally synchronous #60205
Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
1 parent d308c89 commit 8a5993e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/vm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ in the ECMAScript specification.
621621
Evaluate the module and its depenendencies. Corresponds to the [Evaluate() concrete method][] field of
622622
[Cyclic Module Record][]s in the ECMAScript specification.
623623

624-
If the module is a `vm.SourceTextModule`,`evaluate()` must be called after the module has been at least linked;
624+
If the module is a `vm.SourceTextModule`, `evaluate()` must be called after the module has been instantiated;
625625
otherwise `evaluate()` will return a rejected promise.
626626

627627
For a `vm.SourceTextModule`, the promise returned by `evaluate()` may be fulfilled either
@@ -631,7 +631,7 @@ synchronously or asynchronously:
631631
fulfilled _synchronously_ after the module and all its dependencies have been evaluated.
632632
1. If the evaluation succeeds, the promise will be _synchronously_ resolved to `undefined`.
633633
2. If the evaluation results in an exception, the promise will be _synchronously_ rejected with the exception
634-
that causes the evaluation to fail.
634+
`module.error` that causes the evaluation to fail and .
635635
2. If the `vm.SourceTextModule` has top-level `await` in itself or any of its dependencies, the promise will be
636636
fulfilled _asynchronously_ after the module and all its dependencies have been evaluated.
637637
1. If the evaluation succeeds, the promise will be _asynchronously_ resolved to `undefined`.

0 commit comments

Comments
 (0)