mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 517041 - Instead of giving pseudo frames an sp, protect against null sps during GC. r=brendan
This commit is contained in:
parent
c39783bcf1
commit
f823db9527
@ -644,7 +644,7 @@ js_watch_set(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
||||
JS_ASSERT(script->length >= JSOP_STOP_LENGTH);
|
||||
regs.pc = script->code + script->length
|
||||
- JSOP_STOP_LENGTH;
|
||||
regs.sp = frame.slots;
|
||||
regs.sp = NULL;
|
||||
frame.regs = ®s;
|
||||
if (fun &&
|
||||
JSFUN_HEAVYWEIGHT_TEST(fun->flags) &&
|
||||
|
@ -2358,11 +2358,12 @@ js_TraceStackFrame(JSTracer *trc, JSStackFrame *fp)
|
||||
* Don't mark what has not been pushed yet, or what has been
|
||||
* popped already.
|
||||
*/
|
||||
if (fp->regs) {
|
||||
if (fp->regs && fp->regs->sp) {
|
||||
nslots = (uintN) (fp->regs->sp - fp->slots);
|
||||
JS_ASSERT(nslots >= fp->script->nfixed);
|
||||
} else {
|
||||
nslots = fp->script->nfixed;
|
||||
JS_ASSERT_IF(!fp->regs->sp, nslots == 0);
|
||||
}
|
||||
TRACE_JSVALS(trc, nslots, fp->slots, "slot");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user