blob: c5bc264623e7e6711de17ff141daea40c63e167f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
function run_test() {
Assert.ok(!Services.profiler.IsActive());
Services.profiler.StartProfiler(100, 10, ["js"]);
// The function is entered with the profiler enabled
(function() {
Services.profiler.StopProfiler();
let n = 10000;
// eslint-disable-next-line no-empty
while (--n) {} // OSR happens here with the profiler disabled.
// An assertion will fail when this function returns, if the
// profiler stack was misbalanced.
})();
}
|