Closed
Description
There's an upstream bug in v8 that was cherry-picked today and merged. The bug is as follows and also is reproducible in node itself:
Bug Description:
- https://bugs.chromium.org/p/chromium/issues/detail?id=604033
- https://codereview.chromium.org/2088783002
function foo() {
return typeof null === 'undefined';
}
var a = 0;
var b = 0;
for (var i = 0; i < 10000; i++) {
foo() === true ? a++ : b++;
}
var pa = ((a / (a + b)) * 100).toFixed(2);
var pb = ((b / (a + b)) * 100).toFixed(2);
console.log('true ' + pa + '%');
console.log('false ' + pb + '%');
Outcome:
node typeof_null.js
true 47.44%
false 52.56%
node typeof_null.js
true 40.94%
false 59.06%