Bug 1398507 - Use a fallible allocator for LoopAliasInfo allocations. r=tcampbell
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Tue, 12 Sep 2017 13:32:59 +0000
changeset 429788 061de9b749ef47e75cb59a424b7d07bd95a7998b
parent 429787 3e638bc2c4f321d442e2bb13e89985bf921f4421
child 429789 9c581d290dc3dd1dc0119b60dcf688901e5b1498
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell
bugs1398507
milestone57.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 1398507 - Use a fallible allocator for LoopAliasInfo allocations. r=tcampbell
js/src/jit/AliasAnalysis.cpp
--- a/js/src/jit/AliasAnalysis.cpp
+++ b/js/src/jit/AliasAnalysis.cpp
@@ -148,17 +148,19 @@ AliasAnalysis::analyze()
     uint32_t newId = 0;
 
     for (ReversePostorderIterator block(graph_.rpoBegin()); block != graph_.rpoEnd(); block++) {
         if (mir->shouldCancel("Alias Analysis (main loop)"))
             return false;
 
         if (block->isLoopHeader()) {
             JitSpew(JitSpew_Alias, "Processing loop header %d", block->id());
-            loop_ = new(alloc()) LoopAliasInfo(alloc(), loop_, *block);
+            loop_ = new(alloc().fallible()) LoopAliasInfo(alloc(), loop_, *block);
+            if (!loop_)
+                return false;
         }
 
         for (MPhiIterator def(block->phisBegin()), end(block->phisEnd()); def != end; ++def)
             def->setId(newId++);
 
         for (MInstructionIterator def(block->begin()), end(block->begin(block->lastIns()));
              def != end;
              ++def)