Skip to content

Commit 081a6ff

Browse files
yashLadhaMoLow
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 dc318f2 commit 081a6ff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/api/vm.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1140,8 +1140,9 @@ current V8 isolate, or the main context.
11401140
exits before the next GC). With eager execution, the GC will be started
11411141
right away to measure the memory.
11421142
**Default:** `'default'`
1143-
* Returns: {Promise} If the memory is successfully measured the promise will
1143+
* Returns: {Promise} If the memory is successfully measured, the promise will
11441144
resolve with an object containing information about the memory usage.
1145+
Otherwise it will be rejected with an `ERR_CONTEXT_NOT_INITIALIZED` error.
11451146
11461147
The format of the object that the returned Promise may resolve with is
11471148
specific to the V8 engine and may change from one version of V8 to the next.

0 commit comments

Comments
 (0)