Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
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: #41346 PR-URL: #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>
- Loading branch information
Showing
with
32 additions
and 10 deletions.
- +4 −0 doc/api/v8.md
- +1 −1 src/env.cc
- +13 −8 src/heap_utils.cc
- +1 −1 src/node_internals.h
- +13 −0 test/sequential/test-heapdump.js
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -379,7 +379,7 @@ class DiagnosticFilename { | ||
| }; | ||
|
|
||
| namespace heap { | ||
| bool WriteSnapshot(Environment* env, const char* filename); | ||
| } | ||
|
|
||
| class TraceEventScope { | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters

