Bug 514981 - JSStackFrame::sharp{Array,Depth} should be locals allocated due to #n[#=] usage (r=igor).

This commit is contained in:
Brendan Eich
2009-09-09 20:21:15 -07:00
parent 1a4fcf9a01
commit 69d96ff91b
19 changed files with 247 additions and 83 deletions

View File

@@ -763,11 +763,9 @@ js_NewGenerator(JSContext *cx, JSStackFrame *fp)
gen->savedRegs.pc = fp->regs->pc;
gen->frame.regs = &gen->savedRegs;
/* Copy remaining state (XXX sharp* and xml* should be local vars). */
gen->frame.sharpDepth = 0;
gen->frame.sharpArray = NULL;
gen->frame.flags = (fp->flags & ~JSFRAME_ROOTED_ARGV) | JSFRAME_GENERATOR;
gen->frame.dormantNext = NULL;
/* JSOP_GENERATOR appears in the prologue, outside all blocks. */
JS_ASSERT(!fp->blockChain);
gen->frame.blockChain = NULL;