Skip to content

Commit 4fbf127

Browse files
committed
test: add regression test for v8.getHeapSnapshot() crash
Fixes: nodejs#35559
1 parent 0c43862 commit 4fbf127

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
require('../common');
3+
const v8 = require('v8');
4+
5+
// Regression test for https://github.com/nodejs/node/issues/35559
6+
// It is important that the return value of the first call is not used, i.e.
7+
// that the first snapshot is GC-able while the second one is being created.
8+
v8.getHeapSnapshot();
9+
v8.getHeapSnapshot();

0 commit comments

Comments
 (0)