Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: add regression test for v8.getHeapSnapshot() crash
Fixes: #35559
  • Loading branch information
addaleax committed Oct 12, 2020
commit 4fbf12746b6cdac7f4c51dfad04be53da6aa4651
9 changes: 9 additions & 0 deletions test/parallel/test-v8-getheapsnapshot-twice.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';
require('../common');
const v8 = require('v8');

// Regression test for https://github.com/nodejs/node/issues/35559
// It is important that the return value of the first call is not used, i.e.
// that the first snapshot is GC-able while the second one is being created.
v8.getHeapSnapshot();
v8.getHeapSnapshot();