зеркало из https://github.com/mozilla/gecko-dev.git
Make the JS debugger consistently ignore dummy frames, fixing an assertion failure. Bug 678086, r=jimb.
This commit is contained in:
Родитель
1e79bb239a
Коммит
b8aa7263d8
|
@ -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);
|
|
@ -2560,7 +2560,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
|
||||
|
|
Загрузка…
Ссылка в новой задаче