Skip to content

Commit da0309f

Browse files
authored
avoid minification trap (#172633)
fixes #172623
1 parent 1ed7421 commit da0309f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/services/timer/browser/timerService.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ export abstract class AbstractTimerService implements ITimerService {
519519
// we use fibonacci numbers to have a performance baseline that indicates
520520
// how slow/fast THIS machine actually is.
521521

522-
const jsSrc = (function computeBaseline(this: WindowOrWorkerGlobalScope) {
522+
const jsSrc = (function (this: WindowOrWorkerGlobalScope) {
523523
// the following operation took ~16ms (one frame at 64FPS) to complete on my machine. We derive performance observations
524524
// from that. We also bail if that took too long (>1s)
525525
let tooSlow = false;
@@ -543,7 +543,7 @@ export abstract class AbstractTimerService implements ITimerService {
543543

544544
}).toString();
545545

546-
const blob = new Blob([`${jsSrc};\ncomputeBaseline();`], { type: 'application/javascript' });
546+
const blob = new Blob([`(${jsSrc})();`], { type: 'application/javascript' });
547547
const blobUrl = URL.createObjectURL(blob);
548548

549549
const worker = createBlobWorker(blobUrl, { name: 'perfBaseline' });

0 commit comments

Comments
 (0)