Bug 605033 diagnostic: look for holes being returned via GETELEM, r=lw, a=betaN+

This commit is contained in:
David Mandelin 2010-11-15 15:26:03 -08:00
parent 013bbe38d4
commit cb91a18cdb
2 changed files with 4 additions and 0 deletions

View File

@ -516,6 +516,8 @@ ArgGetter(JSContext *cx, JSObject *obj, jsid id, Value *vp)
uintN arg = uintN(JSID_TO_INT(id));
if (arg < obj->getArgsInitialLength()) {
JS_ASSERT(!obj->getArgsElement(arg).isMagic(JS_ARGS_HOLE));
if (obj->getArgsElement(arg).isMagic(JS_ARGS_HOLE))
*(int *) 0xe0 = 0;
if (JSStackFrame *fp = (JSStackFrame *) obj->getPrivate())
*vp = fp->canonicalActualArg(arg);
else

View File

@ -498,6 +498,8 @@ stubs::GetElem(VMFrame &f)
end_getelem:
f.regs.sp[-2] = *copyFrom;
if (regs.sp[-2].isMagic(JS_ARGS_HOLE))
*(int *) 0xc0 = 0;
}
static inline bool