Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Román <kyradiscord@gmail.com>2022-01-12 11:39:49 +0300
committerGitHub <noreply@github.com>2022-01-12 11:39:49 +0300
commit74b9baa4265a8f0d112dabc3efc63c2e13276488 (patch)
treef52a6628e5da68ef9ce85b2453fc9e4098793515 /doc/api/v8.md
parent36035e06578bcda0e10cf02d06b7930996d5201a (diff)
v8: make writeHeapSnapshot throw if fopen fails
If the file fails to be written (e.g. missing permissions, no space left on device, etc), `writeHeapSnapshot` will now throw an exception. This commit also adds error handling for the `fclose` call, returning false if a non-zero value was returned. Fixes: https://github.com/nodejs/node/issues/41346 PR-URL: https://github.com/nodejs/node/pull/41373 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'doc/api/v8.md')
-rw-r--r--doc/api/v8.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/api/v8.md b/doc/api/v8.md
index 6c14615e08e..0359b20396f 100644
--- a/doc/api/v8.md
+++ b/doc/api/v8.md
@@ -267,6 +267,10 @@ disk unless [`v8.stopCoverage()`][] is invoked before the process exits.
<!-- YAML
added: v11.13.0
+changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/41373
+ description: An exception will now be thrown if the file could not be written.
-->
* `filename` {string} The file path where the V8 heap snapshot is to be