Skip to content

Commit ad6757e

Browse files
RafaelGSSaduh95
authored andcommitted
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 <contact@viniciusl.com.br> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
1 parent 3da5bc0 commit ad6757e

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)