Skip to content

Commit 18f3edd

Browse files
committed
doc: update measure memory rejection information
If in case context is unable to allocate a promise then `ERR_CONTEXT_NOT_INITIALIZED` error will be thrown (as promise rejection) in the vm measureMemory call.
1 parent 2f17004 commit 18f3edd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/api/vm.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1060,8 +1060,9 @@ current V8 isolate, or the main context.
10601060
exits before the next GC). With eager execution, the GC will be started
10611061
right away to measure the memory.
10621062
**Default:** `'default'`
1063-
* Returns: {Promise} If the memory is successfully measured the promise will
1064-
resolve with an object containing information about the memory usage.
1063+
* Returns: {Promise} If the memory is successfully measured, the promise will
1064+
resolve with an object containing information about the memory usage, else it
1065+
will be rejected with an error with `ERR_CONTEXT_NOT_INITIALIZED` code property.
10651066
10661067
The format of the object that the returned Promise may resolve with is
10671068
specific to the V8 engine and may change from one version of V8 to the next.

0 commit comments

Comments
 (0)