Bug 1258999: Check for OOM after flushing pools when merging MacroAssemblers; r=efaust
authorBenjamin Bouvier <benj@benj.me>
Wed, 23 Mar 2016 17:49:24 +0100
changeset 290147 6efe1b395bcf7918a752cf46a1b5725c31693ba6
parent 290146 87bd1283a5f442355f2ecb8fde5f29e4f4fe7ea6
child 290148 bbc95a357cfdfd7226945d817a88d21675b1824f
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersefaust
bugs1258999
milestone48.0a1
Bug 1258999: Check for OOM after flushing pools when merging MacroAssemblers; r=efaust MozReview-Commit-ID: 19IdBYtzqHZ
js/src/jit/arm/Assembler-arm.cpp
--- a/js/src/jit/arm/Assembler-arm.cpp
+++ b/js/src/jit/arm/Assembler-arm.cpp
@@ -633,16 +633,18 @@ Assembler::finish()
     isFinished = true;
 }
 
 bool
 Assembler::asmMergeWith(Assembler& other)
 {
     flush();
     other.flush();
+    if (other.oom())
+        return false;
     if (!AssemblerShared::asmMergeWith(size(), other))
         return false;
     return m_buffer.appendBuffer(other.m_buffer);
 }
 
 void
 Assembler::executableCopy(uint8_t* buffer)
 {