Bug 1563051 - Fix a debugger leak of BaselineDebugModeOSRInfo in DebugEpilogue. r=iain

The other caller of EnsureBareExitFrame is when unwinding in the exception
handler and we already call deleteDebugModeOSRInfo there.

Differential Revision: https://phabricator.services.mozilla.com/D36759

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jan de Mooij 2019-07-04 11:17:36 +00:00
parent 6937395c0b
commit e3a4316acf
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,11 @@
// |jit-test| error:123
var g = newGlobal({newCompartment: true});
var dbg = new Debugger;
dbg.addDebuggee(g);
dbg.onEnterFrame = function(frame) {
frame.onPop = function() {
dbg.removeDebuggee(g);
throw 123;
}
}
g.eval("(function() {})()");

View File

@ -922,6 +922,7 @@ bool DebugEpilogue(JSContext* cx, BaselineFrame* frame, jsbytecode* pc,
if (!ok) {
// Pop this frame by updating packedExitFP, so that the exception
// handling code will start at the previous frame.
frame->deleteDebugModeOSRInfo();
JitFrameLayout* prefix = frame->framePrefix();
EnsureBareExitFrame(cx->activation()->asJit(), prefix);
return false;