Bug 906241 - Trigger post barriers for writes to tenured call objects; r=bhackett

This commit is contained in:
Terrence Cole 2013-08-21 14:20:15 -07:00
parent 670fe89119
commit cef19d593c
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,8 @@
for (let y in []);
(function f(x) {
Float64Array(ArrayBuffer());
{
f(x)
function t() {}
}
})();

View File

@ -458,7 +458,17 @@ JSObject *
NewCallObject(JSContext *cx, HandleScript script,
HandleShape shape, HandleTypeObject type, HeapSlot *slots)
{
return CallObject::create(cx, script, shape, type, slots);
JSObject *obj = CallObject::create(cx, script, shape, type, slots);
#ifdef JSGC_GENERATIONAL
// The JIT creates call objects in the nursery, so elides barriers for
// the initializing writes. The interpreter, however, may have allocated
// the call object tenured, so barrier as needed before re-entering.
if (!IsInsideNursery(cx->runtime(), obj))
cx->runtime()->gcStoreBuffer.putWholeCell(obj);
#endif
return obj;
}
JSObject *