From d93774cfeced393fcaa02d9963e03e9e0abaee58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9=20Arboleda?= Date: Sat, 5 Jul 2025 01:05:58 -0500 Subject: [PATCH] src,lib: support path and encoding in `v8.writeHeapSnapshot` output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: https://github.com/nodejs/node/issues/58857 Signed-off-by: Juan José Arboleda --- doc/api/v8.md | 6 ++ lib/v8.js | 11 +++- src/heap_utils.cc | 61 ++++++++++++++----- src/node_internals.h | 12 ++-- test/common/heap.js | 12 ++++ .../test-write-heapsnapshot-options.js | 24 +++++++- 6 files changed, 99 insertions(+), 27 deletions(-) diff --git a/doc/api/v8.md b/doc/api/v8.md index db92ad062b7e63..ec6c23b625ae89 100644 --- a/doc/api/v8.md +++ b/doc/api/v8.md @@ -511,6 +511,9 @@ disk unless [`v8.stopCoverage()`][] is invoked before the process exits.