xref: /third_party/node/test/fixtures/inspector-global-function.mjs
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/fixtures/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_cilet invocations = 0;
31cb0ef41Sopenharmony_ciconst interval = setInterval(() => {}, 1000);
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ciglobal.sum = function() {
61cb0ef41Sopenharmony_ci  const a = 1;
71cb0ef41Sopenharmony_ci  const b = 2;
81cb0ef41Sopenharmony_ci  const c = a + b;
91cb0ef41Sopenharmony_ci  clearInterval(interval);
101cb0ef41Sopenharmony_ci  console.log(invocations++, c);
111cb0ef41Sopenharmony_ci};
121cb0ef41Sopenharmony_ci
131cb0ef41Sopenharmony_ci// NOTE(mmarchini): Calls console.log two times to ensure we loaded every
141cb0ef41Sopenharmony_ci// internal module before pausing. See
151cb0ef41Sopenharmony_ci// https://bugs.chromium.org/p/v8/issues/detail?id=10287.
161cb0ef41Sopenharmony_ciconsole.log('Loading');
171cb0ef41Sopenharmony_ciconsole.log('Ready!');
18

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