Bug 1199175 - Fix Debugger::slowPathOnLeaveFrame to remove the frame on OOM too. r=shu

This commit is contained in:
Jan de Mooij 2015-09-19 20:00:14 +02:00
Родитель 42b1701245
Коммит cee00a968a
1 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -601,6 +601,13 @@ Debugger::slowPathOnLeaveFrame(JSContext* cx, AbstractFramePtr frame, bool frame
if (frameRange.empty())
return frameOk;
auto frameMapsGuard = MakeScopeExit([&] {
// Clean up all Debugger.Frame instances. This call creates a fresh
// FrameRange, as one debugger's onPop handler could have caused another
// debugger to create its own Debugger.Frame instance.
removeFromFrameMapsAndClearBreakpointsIn(cx, frame);
});
/* Save the frame's completion value. */
JSTrapStatus status;
RootedValue value(cx);
@ -661,13 +668,6 @@ Debugger::slowPathOnLeaveFrame(JSContext* cx, AbstractFramePtr frame, bool frame
}
}
/*
* Clean up all Debugger.Frame instances. This call creates a fresh
* FrameRange, as one debugger's onPop handler could have caused another
* debugger to create its own Debugger.Frame instance.
*/
removeFromFrameMapsAndClearBreakpointsIn(cx, frame);
/* Establish (status, value) as our resumption value. */
switch (status) {
case JSTRAP_RETURN: