Bug 780549 part 2 - Check returned value of AutoEnterCompilation::init in Ion compilation. r=bhackett a=abillings
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Fri, 28 Dec 2012 01:05:18 -0800
changeset 126315 8468d858595c628e70f86ca4d05fc04e83c96aab
parent 126314 ef2a48aded5bb7485cc51aa2b669d74baa597fa9
child 126316 0534210e43e588d67b16c97464ac499bf62607b6
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhackett, abillings
bugs780549
milestone20.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 780549 part 2 - Check returned value of AutoEnterCompilation::init in Ion compilation. r=bhackett a=abillings
js/src/ion/Ion.cpp
--- a/js/src/ion/Ion.cpp
+++ b/js/src/ion/Ion.cpp
@@ -1173,17 +1173,18 @@ IonCompile(JSContext *cx, HandleScript s
     TypeInferenceOracle oracle;
 
     if (!oracle.init(cx, script))
         return false;
 
     AutoFlushCache afc("IonCompile");
 
     types::AutoEnterCompilation enterCompiler(cx, CompilerOutputKind(executionMode));
-    enterCompiler.init(script, false, 0);
+    if (!enterCompiler.init(script, false, 0))
+        return false;
 
     AutoTempAllocatorRooter root(cx, temp);
 
     IonBuilder *builder = alloc->new_<IonBuilder>(cx, temp, graph, &oracle, info);
     if (!compileContext.compile(builder, graph, autoDestroy)) {
         IonSpew(IonSpew_Abort, "IM Compilation failed.");
         return false;
     }