Bug 969012 - Not only flag an oom, but also, don't continue running the current function; r=terrence

--HG--
extra : rebase_source : 995ce9bc3bf0516c7b3364ca7e393f19e4e016af
This commit is contained in:
Marty Rosenberg 2014-05-08 14:18:00 -07:00
parent 69227604e3
commit 1c7edf91d3

View File

@ -245,8 +245,10 @@ struct AssemblerBuffer
// Break the instruction stream so we can go back and edit it at this point // Break the instruction stream so we can go back and edit it at this point
void perforate() { void perforate() {
Slice *tmp = newSlice(LifoAlloc_); Slice *tmp = newSlice(LifoAlloc_);
if (!tmp) if (!tmp) {
m_oom = true; m_oom = true;
return;
}
bufferSize += tail->size(); bufferSize += tail->size();
tail->setNext(tmp); tail->setNext(tmp);
tail = tmp; tail = tmp;