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: https://github.com/nodejs/node/pull/41639
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
This commit is contained in:
Yash Ladha authored and Moshe Atlow committed 2023-07-07 00:06:13 +03:00
1 parent dc318f26c0
commit 081a6ffaea
1 file changed
+2 -1
+2 -1
View File
@@ -1140,8 +1140,9 @@ current V8 isolate, or the main context.
exits before the next GC). With eager execution, the GC will be started
right away to measure the memory.
**Default:** `'default'`
* Returns: {Promise} If the memory is successfully measured the promise will
* Returns: {Promise} If the memory is successfully measured, the promise will
resolve with an object containing information about the memory usage.
Otherwise it will be rejected with an `ERR_CONTEXT_NOT_INITIALIZED` error.
The format of the object that the returned Promise may resolve with is
specific to the V8 engine and may change from one version of V8 to the next.