Skip to content

Commit

Permalink
vm: 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 8c9a9b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/api/vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,8 @@ current V8 isolate, or the main context.
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.
resolve with an object containing information about the memory usage, else it
will be rejected with `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.
Expand Down

0 comments on commit 8c9a9b7

Please sign in to comment.