• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2
3// This test crashes most of the time unless the v8 patch:
4// https://github.com/v8/v8/commit/beebee4f80ff2eb91187ef1e8fa00b8ff82a20b3
5// is applied.
6const common = require('../../common');
7const bindings = require(`./build/${common.buildType}/binding`);
8
9function fn() { setImmediate(fn); }
10setInterval(function() {
11  for (let i = 0; i < 1000000; i++)
12    fn();
13  clearInterval(this);
14  setTimeout(process.reallyExit, 2000);
15}, 0);
16
17
18setTimeout(() => {
19  bindings.startCpuProfiler();
20}, 1000);
21