Skip to content

Commit 3727964

Browse files
yashLadhatargos
authored andcommitted
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. PR-URL: #41639 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
1 parent 4197a9a commit 3727964

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/api/vm.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,8 +1143,9 @@ current V8 isolate, or the main context.
11431143
exits before the next GC). With eager execution, the GC will be started
11441144
right away to measure the memory.
11451145
**Default:** `'default'`
1146-
* Returns: {Promise} If the memory is successfully measured the promise will
1146+
* Returns: {Promise} If the memory is successfully measured, the promise will
11471147
resolve with an object containing information about the memory usage.
1148+
Otherwise it will be rejected with an `ERR_CONTEXT_NOT_INITIALIZED` error.
11481149
11491150
The format of the object that the returned Promise may resolve with is
11501151
specific to the V8 engine and may change from one version of V8 to the next.

0 commit comments

Comments
 (0)