Skip to content

Commit

Permalink
fix: fix javascriptcore raw runtime detection
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
  • Loading branch information
jerome-benoit committed Nov 6, 2024
1 parent 4c77a22 commit d97574f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ export default class Task extends EventTarget {
const promises: Promise<void>[] = []; // only for task level concurrency
while (
(totalTime < time
|| samples.length + limit.activeCount + limit.pendingCount < iterations)
|| samples.length + limit.activeCount + limit.pendingCount
< iterations)
&& !this.bench.signal?.aborted
) {
if (this.bench.concurrency === 'task') {
Expand Down
3 changes: 1 addition & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ const isSpiderMonkey = !!(globalThis as any).inIon && !!(globalThis as any).perf
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
const isJsc = !!(globalThis as any).$
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
&& 'IsHTMLDDA' in (globalThis as any).$
&& new Error().stack?.startsWith('runtime@');
&& 'IsHTMLDDA' in (globalThis as any).$;
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
const isBrowser = !!(globalThis as any).window && !!(globalThis as any).navigator;

Expand Down

0 comments on commit d97574f

Please sign in to comment.