Bug 1255956: Check for OOM after flushing constant pools; r=luke
authorBenjamin Bouvier <benj@benj.me>
Mon, 14 Mar 2016 16:43:24 +0100
changeset 288601 583f746e9e55311a6f586e1b5bc67ff059ec55fe
parent 288600 716358ed5dd8f090fb9cda2f55a55bd9cad64fb4
child 288602 85b84b87c6a7f56571a1872f8bb76591031df306
push id18174
push usercbook@mozilla.com
push dateTue, 15 Mar 2016 09:44:58 +0000
treeherderfx-team@dd0baa33759d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs1255956
milestone48.0a1
Bug 1255956: Check for OOM after flushing constant pools; r=luke MozReview-Commit-ID: KPOxVZ2D4vi
js/src/jit/CodeGenerator.cpp
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -8327,16 +8327,18 @@ CodeGenerator::generateAsmJS(wasm::FuncO
     // Note the end of the inline code and start of the OOL code.
     gen->perfSpewer().noteEndInlineCode(masm);
 #endif
 
     if (!generateOutOfLineCode())
         return false;
 
     masm.flush();
+    if (masm.oom())
+        return false;
 
     offsets->end = masm.currentOffset();
 
     MOZ_ASSERT(!masm.failureLabel()->used());
     MOZ_ASSERT(snapshots_.listSize() == 0);
     MOZ_ASSERT(snapshots_.RVATableSize() == 0);
     MOZ_ASSERT(recovers_.size() == 0);
     MOZ_ASSERT(bailouts_.empty());