Skip to content

Commit d97574f

Browse files
committed
fix: fix javascriptcore raw runtime detection
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
1 parent 4c77a22 commit d97574f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/task.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ export default class Task extends EventTarget {
107107
const promises: Promise<void>[] = []; // only for task level concurrency
108108
while (
109109
(totalTime < time
110-
|| samples.length + limit.activeCount + limit.pendingCount < iterations)
110+
|| samples.length + limit.activeCount + limit.pendingCount
111+
< iterations)
111112
&& !this.bench.signal?.aborted
112113
) {
113114
if (this.bench.concurrency === 'task') {

src/utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ const isSpiderMonkey = !!(globalThis as any).inIon && !!(globalThis as any).perf
6262
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
6363
const isJsc = !!(globalThis as any).$
6464
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
65-
&& 'IsHTMLDDA' in (globalThis as any).$
66-
&& new Error().stack?.startsWith('runtime@');
65+
&& 'IsHTMLDDA' in (globalThis as any).$;
6766
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
6867
const isBrowser = !!(globalThis as any).window && !!(globalThis as any).navigator;
6968

0 commit comments

Comments
 (0)