Bug 535656 - remove JSStackFrame::dormantNext and varobj (r=waldo)
This commit is contained in:
@@ -714,8 +714,8 @@ JS_FRIEND_DATA(JSClass) js_GeneratorClass = {
|
||||
* from the activation in fp, so we can steal away fp->callobj and fp->argsobj
|
||||
* if they are non-null.
|
||||
*/
|
||||
JSObject *
|
||||
js_NewGenerator(JSContext *cx, JSStackFrame *fp)
|
||||
JS_REQUIRES_STACK JSObject *
|
||||
js_NewGenerator(JSContext *cx)
|
||||
{
|
||||
JSObject *obj;
|
||||
uintN argc, nargs, nslots;
|
||||
@@ -727,6 +727,7 @@ js_NewGenerator(JSContext *cx, JSStackFrame *fp)
|
||||
return NULL;
|
||||
|
||||
/* Load and compute stack slot counts. */
|
||||
JSStackFrame *fp = cx->fp;
|
||||
argc = fp->argc;
|
||||
nargs = JS_MAX(argc, fp->fun->nargs);
|
||||
nslots = 2 + nargs + fp->script->nslots;
|
||||
@@ -752,7 +753,6 @@ js_NewGenerator(JSContext *cx, JSStackFrame *fp)
|
||||
}
|
||||
|
||||
/* These two references can be shared with fp until it goes away. */
|
||||
gen->frame.varobj = fp->varobj;
|
||||
gen->frame.thisv = fp->thisv;
|
||||
|
||||
/* Copy call-invariant script and function references. */
|
||||
@@ -786,7 +786,6 @@ js_NewGenerator(JSContext *cx, JSStackFrame *fp)
|
||||
gen->frame.regs = &gen->savedRegs;
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user