Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
doc,v8: clarify v8.writeHeapSnapshot may return undefined
  • Loading branch information
kyranet committed Dec 31, 2021
commit 2bdbaf6c1d27cf23bccb6a62b5b736e3ed13e381
3 changes: 2 additions & 1 deletion doc/api/v8.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ added: v11.13.0
generated, where `{pid}` will be the PID of the Node.js process,
`{thread_id}` will be `0` when `writeHeapSnapshot()` is called from
the main Node.js thread or the id of a worker thread.
* Returns: {string} The filename where the snapshot was saved.
* Returns: {string|undefined} The filename where the snapshot was saved, or
`undefined` if the file failed to write.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`undefined` if the file failed to write.
`undefined` if the process failed to write the file.


Generates a snapshot of the current V8 heap and writes it to a JSON
file. This file is intended to be used with tools such as Chrome
Expand Down