mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix FrameState::forgetType with eval (bug 598696, r=sstangl).
This commit is contained in:
parent
a042240626
commit
2055a5d505
@ -524,7 +524,14 @@ FrameState::syncData(const FrameEntry *fe, Address to, Assembler &masm) const
|
||||
inline void
|
||||
FrameState::forgetType(FrameEntry *fe)
|
||||
{
|
||||
JS_ASSERT(fe->isTypeKnown() && !fe->type.synced());
|
||||
/*
|
||||
* The type may have been forgotten with an intervening storeLocal in the
|
||||
* presence of eval or closed variables. For defense in depth and to make
|
||||
* callers' lives simpler, bail out if the type is not known.
|
||||
*/
|
||||
if (!fe->isTypeKnown())
|
||||
return;
|
||||
|
||||
syncType(fe, addressOf(fe), masm);
|
||||
fe->type.setMemory();
|
||||
}
|
||||
|
6
js/src/trace-test/tests/jaeger/bug598696.js
Normal file
6
js/src/trace-test/tests/jaeger/bug598696.js
Normal file
@ -0,0 +1,6 @@
|
||||
function f() {
|
||||
eval();
|
||||
var i = 0;
|
||||
assertEq(++i, 1);
|
||||
}
|
||||
f();
|
Loading…
Reference in New Issue
Block a user