Skip to content

Commit

Permalink
doc: update measure memory rejection information
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yashLadha committed Jan 22, 2022
1 parent dbe60a2 commit 7aa8305
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/api/vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -1060,8 +1060,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
resolve with an object containing information about the memory usage.
* Returns: {Promise} If the memory is successfully measured, the promise will
resolve with an object containing information about the memory usage, else it
will be rejected with an error with `ERR_CONTEXT_NOT_INITIALIZED` code property.
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.
Expand Down

0 comments on commit 7aa8305

Please sign in to comment.