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 /src/node_internals.h
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 'src/node_internals.h')
-rw-r--r--src/node_internals.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_internals.h b/src/node_internals.h
index fc82053cdbd..5a33dad196d 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 {