mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix assert when comparing identical values, bug 599488. r=dvander
This commit is contained in:
parent
bd21beac91
commit
944cb69b95
@ -722,6 +722,8 @@ mjit::Compiler::jsop_relational(JSOp op, BoolStub stub, jsbytecode *target, JSOp
|
||||
emitStubCmpOp(stub, target, fused);
|
||||
} else if (!target && (lhs->isType(JSVAL_TYPE_STRING) || rhs->isType(JSVAL_TYPE_STRING))) {
|
||||
emitStubCmpOp(stub, target, fused);
|
||||
} else if (frame.haveSameBacking(lhs, rhs)) {
|
||||
emitStubCmpOp(stub, target, fused);
|
||||
} else {
|
||||
jsop_equality_int_string(op, stub, target, fused);
|
||||
}
|
||||
|
9
js/src/trace-test/tests/jaeger/bug599488.js
Normal file
9
js/src/trace-test/tests/jaeger/bug599488.js
Normal file
@ -0,0 +1,9 @@
|
||||
/* Don't crash. */
|
||||
function foo(y) {
|
||||
var x = y;
|
||||
if (x != x)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
assertEq(foo("three"), false);
|
||||
assertEq(foo(NaN), true);
|
Loading…
Reference in New Issue
Block a user