Bug 1263558 - Part 0.1: Handle OOM inside BuildDominatorTree at AnalyzeNewScriptDefiniteProperties and AnalyzeArgumentsUsage. r=jandem
authorTooru Fujisawa <arai_a@mac.com>
Fri, 22 Apr 2016 00:29:22 +0900
changeset 332204 611130fe9f93305ba081ce37a923d3383ccf3419
parent 332203 991c721d2e551357d8f7213a4c484b3bcba53736
child 332205 344a4bcc9015457aa8deadbaac79eead70acbb60
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1263558
milestone48.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 1263558 - Part 0.1: Handle OOM inside BuildDominatorTree at AnalyzeNewScriptDefiniteProperties and AnalyzeArgumentsUsage. r=jandem
js/src/jit/IonAnalysis.cpp
--- a/js/src/jit/IonAnalysis.cpp
+++ b/js/src/jit/IonAnalysis.cpp
@@ -3772,18 +3772,20 @@ jit::AnalyzeNewScriptDefiniteProperties(
     FinishDefinitePropertiesAnalysis(cx, constraints);
 
     if (!SplitCriticalEdges(graph))
         return false;
 
     if (!RenumberBlocks(graph))
         return false;
 
-    if (!BuildDominatorTree(graph))
+    if (!BuildDominatorTree(graph)) {
+        ReportOutOfMemory(cx);
         return false;
+    }
 
     if (!EliminatePhis(&builder, graph, AggressiveObservability))
         return false;
 
     MDefinition* thisValue = graph.entryBlock()->getSlot(info.thisSlot());
 
     // Get a list of instructions using the |this| value in the order they
     // appear in the graph.
@@ -3991,18 +3993,20 @@ jit::AnalyzeArgumentsUsage(JSContext* cx
     }
 
     if (!SplitCriticalEdges(graph))
         return false;
 
     if (!RenumberBlocks(graph))
         return false;
 
-    if (!BuildDominatorTree(graph))
+    if (!BuildDominatorTree(graph)) {
+        ReportOutOfMemory(cx);
         return false;
+    }
 
     if (!EliminatePhis(&builder, graph, AggressiveObservability))
         return false;
 
     MDefinition* argumentsValue = graph.entryBlock()->getSlot(info.argsObjSlot());
 
     bool argumentsContentsObserved = false;