Skip to content

Commit 9209504

Browse files
authored
benchmark: fix sqlite-is-transaction
The variable deadCodeElimination is declared but not initialized, making it undefined by default. When using the &&= operator with an undefined left operand, the result will always remain undefined regardless of how many iterations run. ```js let deadCodeElimination; deadCodeElimination &&= true deadCodeElimination // undefined ``` PR-URL: #59170 Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Edy Silva <[email protected]>
1 parent 91a131e commit 9209504

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

benchmark/sqlite/sqlite-is-transaction.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function main(conf) {
1616
}
1717

1818
let i;
19-
let deadCodeElimination;
19+
let deadCodeElimination = true;
2020

2121
bench.start();
2222
for (i = 0; i < conf.n; i += 1)

0 commit comments

Comments
 (0)