mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
ea0154814a
Signed-off-by: James M Snell <jasnell@gmail.com> Fixes: https://github.com/nodejs/node/issues/38412 PR-URL: https://github.com/nodejs/node/pull/38414 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
18 lines
413 B
JavaScript
18 lines
413 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
|
|
// Verifies that setting up two observers to listen
|
|
// to gc performance does not crash.
|
|
|
|
const {
|
|
PerformanceObserver,
|
|
} = require('perf_hooks');
|
|
|
|
// We don't actually care if the callback is ever invoked in this test
|
|
const obs = new PerformanceObserver(() => {});
|
|
const obs2 = new PerformanceObserver(() => {});
|
|
|
|
obs.observe({ type: 'gc' });
|
|
obs2.observe({ type: 'gc' });
|