xref: /third_party/node/test/parallel/test-async-hooks-vm-gc.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/parallel/
11cb0ef41Sopenharmony_ci// Flags: --expose-gc
21cb0ef41Sopenharmony_ci'use strict';
31cb0ef41Sopenharmony_ci
41cb0ef41Sopenharmony_cirequire('../common');
51cb0ef41Sopenharmony_ciconst asyncHooks = require('async_hooks');
61cb0ef41Sopenharmony_ciconst vm = require('vm');
71cb0ef41Sopenharmony_ci
81cb0ef41Sopenharmony_ci// This is a regression test for https://github.com/nodejs/node/issues/39019
91cb0ef41Sopenharmony_ci//
101cb0ef41Sopenharmony_ci// It should not segfault.
111cb0ef41Sopenharmony_ci
121cb0ef41Sopenharmony_ciconst hook = asyncHooks.createHook({ init() {} }).enable();
131cb0ef41Sopenharmony_civm.createContext();
141cb0ef41Sopenharmony_ciglobalThis.gc();
151cb0ef41Sopenharmony_cihook.disable();
16

Indexes created Thu Nov 07 10:32:03 CST 2024