Fix recompilation hazard in CALLELEMENT, bug 686107. r=dvander

This commit is contained in:
Brian Hackett 2011-10-07 07:45:50 -07:00
parent d9e0fb12d5
commit a83ee9105a

View File

@ -2879,6 +2879,8 @@ ic::CallElement(VMFrame &f, ic::GetElementIC *ic)
return;
}
RecompilationMonitor monitor(cx);
Value thisv = f.regs.sp[-2];
JSObject *thisObj = ValuePropertyBearer(cx, thisv, -2);
if (!thisObj)
@ -2891,7 +2893,7 @@ ic::CallElement(VMFrame &f, ic::GetElementIC *ic)
else if (!js_InternNonIntElementId(cx, thisObj, idval, &id))
THROW();
if (ic->shouldUpdate(cx)) {
if (!monitor.recompiled() && ic->shouldUpdate(cx)) {
#ifdef DEBUG
f.regs.sp[-2] = MagicValue(JS_GENERIC_MAGIC);
#endif