Bug 1924993 - [devtools] Debugger tests wait before typing in conditional panel r...
[gecko.git] / tools / profiler / tests / xpcshell / test_enterjit_osr_disabling.js
blob558c9b0c3b753af0e0862809256d9086bf154b4f
1 function run_test() {
2 Assert.ok(!Services.profiler.IsActive());
4 Services.profiler.StartProfiler(100, 10, ["js"]);
5 // The function is entered with the profiler enabled
6 (function () {
7 Services.profiler.StopProfiler();
8 let n = 10000;
9 // eslint-disable-next-line no-empty
10 while (--n) {} // OSR happens here with the profiler disabled.
11 // An assertion will fail when this function returns, if the
12 // profiler stack was misbalanced.
13 })();