Bug 969012 - Not only flag an oom, but also, don't continue running the current function; r=terrence
authorMarty Rosenberg <mrosenberg@mozilla.com>
Thu, 08 May 2014 14:18:00 -0700
changeset 182493 1a7b71c4b284497ead3e0f62071a654e683b6521
parent 182492 472087bf46267ba22cec3981c7fe98b4da3a31aa
child 182494 accdf191ac4e1154c6ea5867db67f9cc7266c1d1
push id26764
push usercbook@mozilla.com
push dateMon, 12 May 2014 11:35:17 +0000
treeherdermozilla-central@a64ed5aba131 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs969012
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 969012 - Not only flag an oom, but also, don't continue running the current function; r=terrence
js/src/jit/shared/IonAssemblerBuffer.h
--- a/js/src/jit/shared/IonAssemblerBuffer.h
+++ b/js/src/jit/shared/IonAssemblerBuffer.h
@@ -240,18 +240,20 @@ struct AssemblerBuffer
     }
     BufferOffset prevOffset() const {
         MOZ_ASSUME_UNREACHABLE("Don't current record lastInstSize");
     }
 
     // Break the instruction stream so we can go back and edit it at this point
     void perforate() {
         Slice *tmp = newSlice(LifoAlloc_);
-        if (!tmp)
+        if (!tmp) {
             m_oom = true;
+            return;
+        }
         bufferSize += tail->size();
         tail->setNext(tmp);
         tail = tmp;
     }
 
     class AssemblerBufferInstIterator {
       private:
         BufferOffset bo;