11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_cirequire('../common'); 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ci// Refers to https://github.com/nodejs/node/issues/39548 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ci// The test fails if this crashes. If it closes normally, 81cb0ef41Sopenharmony_ci// then all is good. 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_ciconst { 111cb0ef41Sopenharmony_ci PerformanceObserver, 121cb0ef41Sopenharmony_ci} = require('perf_hooks'); 131cb0ef41Sopenharmony_ci 141cb0ef41Sopenharmony_ci// We don't actually care if the observer callback is called here. 151cb0ef41Sopenharmony_ciconst gcObserver = new PerformanceObserver(() => {}); 161cb0ef41Sopenharmony_ci 171cb0ef41Sopenharmony_cigcObserver.observe({ entryTypes: ['gc'] }); 181cb0ef41Sopenharmony_ci 191cb0ef41Sopenharmony_cigcObserver.disconnect(); 201cb0ef41Sopenharmony_ci 211cb0ef41Sopenharmony_ciconst gcObserver2 = new PerformanceObserver(() => {}); 221cb0ef41Sopenharmony_ci 231cb0ef41Sopenharmony_cigcObserver2.observe({ entryTypes: ['gc'] }); 241cb0ef41Sopenharmony_ci 251cb0ef41Sopenharmony_cigcObserver2.disconnect(); 26