mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Add incremental GC barrier for generator frames associated with args/call objects, bug 716013. r=billm
This commit is contained in:
parent
83e209b524
commit
07c3a6041b
4
js/src/jit-test/tests/basic/bug716013.js
Normal file
4
js/src/jit-test/tests/basic/bug716013.js
Normal file
@ -0,0 +1,4 @@
|
||||
f = (function() {
|
||||
for (x in [arguments, arguments]) yield(gczeal(4, function(){}))
|
||||
})
|
||||
for (i in f()) {}
|
@ -794,6 +794,17 @@ ContextStack::pushGeneratorFrame(JSContext *cx, JSGenerator *gen, GeneratorFrame
|
||||
gfg->gen_ = gen;
|
||||
gfg->stackvp_ = stackvp;
|
||||
|
||||
/*
|
||||
* Trigger incremental barrier on the floating frame's generator object.
|
||||
* This is normally traced through only by associated arguments/call
|
||||
* objects, but only when the generator is not actually on the stack.
|
||||
* We don't need to worry about generational barriers as the generator
|
||||
* object has a trace hook and cannot be nursery allocated.
|
||||
*/
|
||||
JSObject *genobj = js_FloatingFrameToGenerator(genfp)->obj;
|
||||
JS_ASSERT(genobj->getClass()->trace);
|
||||
JSObject::writeBarrierPre(genobj);
|
||||
|
||||
/* Copy from the generator's floating frame to the stack. */
|
||||
stackfp->stealFrameAndSlots(stackvp, genfp, genvp, gen->regs.sp);
|
||||
stackfp->resetGeneratorPrev(cx);
|
||||
|
Loading…
Reference in New Issue
Block a user