зеркало из https://github.com/mozilla/gecko-dev.git
Bug 510655: set argsobj->private when leaving trace only if created on trace, r=igor
This commit is contained in:
Родитель
7b74923b54
Коммит
f910ba7348
|
@ -2630,8 +2630,10 @@ FlushNativeStackFrame(JSContext* cx, unsigned callDepth, JSTraceType* mp, double
|
|||
for (; n != 0; fp = fp->down) {
|
||||
--n;
|
||||
if (fp->callee) {
|
||||
if (fp->argsobj)
|
||||
JS_SetPrivate(cx, JSVAL_TO_OBJECT(fp->argsobj), fp);
|
||||
// fp->argsobj->getPrivate() is NULL iff we created argsobj on trace.
|
||||
if (fp->argsobj && !JSVAL_TO_OBJECT(fp->argsobj)->getPrivate()) {
|
||||
JSVAL_TO_OBJECT(fp->argsobj)->setPrivate(fp);
|
||||
}
|
||||
|
||||
/*
|
||||
* We might return from trace with a different callee object, but it still
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
// This should not crash (or assert in debug builds).
|
||||
|
||||
(function () {
|
||||
for (b in [0, 0]) {
|
||||
(eval("\
|
||||
[this\
|
||||
for (b in [\
|
||||
[undefined],\
|
||||
arguments,\
|
||||
[undefined]\
|
||||
])\
|
||||
]\
|
||||
"))
|
||||
}
|
||||
})()
|
Загрузка…
Ссылка в новой задаче