diff options
author | Antonio Román <kyradiscord@gmail.com> | 2022-01-12 09:39:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-12 08:39:49 +0000 |
commit | 74b9baa4265a8f0d112dabc3efc63c2e13276488 (patch) | |
tree | f52a6628e5da68ef9ce85b2453fc9e4098793515 /src/node_internals.h | |
parent | 36035e06578bcda0e10cf02d06b7930996d5201a (diff) | |
download | node-new-74b9baa4265a8f0d112dabc3efc63c2e13276488.tar.gz |
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 'src/node_internals.h')
-rw-r--r-- | src/node_internals.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_internals.h b/src/node_internals.h index fc82053cdb..5a33dad196 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -379,7 +379,7 @@ class DiagnosticFilename { }; namespace heap { -bool WriteSnapshot(v8::Isolate* isolate, const char* filename); +bool WriteSnapshot(Environment* env, const char* filename); } class TraceEventScope { |