Bug 881370 - Remove entry from Debugger HashMap before instead of after mutating the HashMap. r=jimb

--HG--
extra : rebase_source : e630194150bb9c81279ac006a70128234732e306
This commit is contained in:
Jan de Mooij 2013-06-12 20:00:07 +02:00
parent b571892116
commit d8e6f40ee9

View File

@ -3397,14 +3397,14 @@ Debugger::handleBaselineOsr(JSContext *cx, StackFrame *from, ion::BaselineFrame
return false;
frameobj->setPrivate(data);
// Remove the old entry before mutating the HashMap.
r.removeFrontFrame();
// Add the frame object with |to| as key.
if (!dbg->frames.putNew(to, frameobj)) {
js_ReportOutOfMemory(cx);
return false;
}
// Remove the old entry.
r.removeFrontFrame();
}
return true;