Bug 969012 - Not only flag an oom, but also, don't continue running the current function; r=terrence
☠☠ backed out by 4e33e9729ab6 ☠ ☠
authorMarty Rosenberg <mrosenberg@mozilla.com>
Thu, 08 May 2014 14:18:00 -0700
changeset 182274 01f27ad85b1bae4b6b8f8b4acebd8623684d2cc1
parent 182273 f844291b895bd36b104f6d00e8e16af4ec4722b7
child 182275 28c41be02b211e5b07594002c81f62dd6fdfc7e5
push id26755
push usercbook@mozilla.com
push dateFri, 09 May 2014 11:54:47 +0000
treeherdermozilla-central@5700a88f895f [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;