Better fix for bug 451666 - only track new rval for primitives (r=brendan).

This commit is contained in:
David Anderson 2008-08-28 13:14:59 -07:00
parent d7c4af1e0c
commit eb051d8c73

View File

@ -3297,8 +3297,10 @@ TraceRecorder::record_JSOP_RETURN()
jsval& rval = stackval(-1);
JSStackFrame *fp = cx->fp;
if (cx->fp->flags & JSFRAME_CONSTRUCTING) {
JS_ASSERT(OBJECT_TO_JSVAL(fp->thisp) == fp->argv[-1]);
rval_ins = get(&fp->argv[-1]);
if (JSVAL_IS_PRIMITIVE(rval)) {
JS_ASSERT(OBJECT_TO_JSVAL(fp->thisp) == fp->argv[-1]);
rval_ins = get(&fp->argv[-1]);
}
} else {
rval_ins = get(&rval);
}