mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
Bug 674843 - Censor pushed-but-not-active InvokeSessionGuard frames from the debugger's view (r=waldo)
--HG-- extra : rebase_source : 1003735f0bce7b0de41c794702e0840cc6452edf
This commit is contained in:
parent
bedee819a3
commit
5aebc4671c
@ -1,11 +1,6 @@
|
||||
// |jit-test| debug;mjit
|
||||
|
||||
/*
|
||||
* NOTE: this evalInFrame is explicitly exposing an optimization artifact that
|
||||
* InvokeSessionGuard leaves the callee frame on the stack between invocations.
|
||||
* If this ever gets fixed or InvokeSessionGuard gets removed, this test will
|
||||
* fail and it can be removed.
|
||||
*/
|
||||
o = { toString:function() { return evalInFrame(1, "arguments; x") } }
|
||||
o = { toString:function() { return evalInFrame(1, "x") } }
|
||||
var x = 'C';
|
||||
var s = "aaaaaaaaaa".replace(/a/g, function() { var x = 'B'; return o });
|
||||
assertEq(s, "BBBBBBBBBB");
|
||||
assertEq(s, "CCCCCCCCCC");
|
||||
|
@ -709,6 +709,9 @@ InvokeSessionGuard::start(JSContext *cx, const Value &calleev, const Value &this
|
||||
savedCallee_ = args_.calleev() = calleev;
|
||||
savedThis_ = args_.thisv() = thisv;
|
||||
|
||||
/* If anyone (through jsdbgapi) finds this frame, make it safe. */
|
||||
MakeRangeGCSafe(args_.argv(), args_.argc());
|
||||
|
||||
do {
|
||||
/* Hoist dynamic checks from scripted Invoke. */
|
||||
if (!calleev.isObject())
|
||||
|
@ -963,6 +963,12 @@ StackIter::settleOnNewState()
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Censor pushed-but-not-active frames from InvokeSessionGuard. */
|
||||
if (containsCall && !calls_->active() && calls_->argv() == fp_->actualArgs()) {
|
||||
popFrame();
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* As an optimization, there is no CallArgsList element pushed for
|
||||
* natives called directly by a script (compiled or interpreted).
|
||||
|
Loading…
Reference in New Issue
Block a user