mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Make the JS debugger consistently ignore dummy frames, fixing an assertion failure. Bug 678086, r=jimb.
This commit is contained in:
parent
68e5914814
commit
bf70c01d6a
@ -0,0 +1,9 @@
|
||||
// Debugger.prototype.getNewestFrame() ignores dummy frames.
|
||||
// See bug 678086.
|
||||
|
||||
var g = newGlobal('new-compartment');
|
||||
g.f = function () { return dbg.getNewestFrame(); };
|
||||
var dbg = new Debugger;
|
||||
var gw = dbg.addDebuggee(g);
|
||||
var fw = gw.getOwnPropertyDescriptor("f").value;
|
||||
assertEq(fw.call().return, null);
|
@ -2562,7 +2562,7 @@ DebuggerFrame_getOlder(JSContext *cx, uintN argc, Value *vp)
|
||||
THIS_FRAME(cx, argc, vp, "get this", args, thisobj, thisfp);
|
||||
Debugger *dbg = Debugger::fromChildJSObject(thisobj);
|
||||
for (StackFrame *fp = thisfp->prev(); fp; fp = fp->prev()) {
|
||||
if (!fp->isDummyFrame() && dbg->observesFrame(fp))
|
||||
if (dbg->observesFrame(fp))
|
||||
return dbg->getScriptFrame(cx, fp, vp);
|
||||
}
|
||||
args.rval().setNull();
|
||||
|
@ -483,7 +483,7 @@ Debugger::observesGlobal(GlobalObject *global) const
|
||||
bool
|
||||
Debugger::observesFrame(StackFrame *fp) const
|
||||
{
|
||||
return observesGlobal(&fp->scopeChain().global());
|
||||
return !fp->isDummyFrame() && observesGlobal(&fp->scopeChain().global());
|
||||
}
|
||||
|
||||
JSTrapStatus
|
||||
|
Loading…
Reference in New Issue
Block a user