Bug 547875 - No OOM check on trace when creating a null closure in JSOP_LAMBDA r=dmandelin
authorTerrence Cole <terrence@trainedmonkeystudios.org>
Thu, 18 Aug 2011 21:50:18 +0200
changeset 76813 5691363f380fe07517235de738216fb40837fb1b
parent 76812 1dccbc1234f4b8869449c0242f8d4f9e3052162e
child 76814 ec4956f17090631ec826f27e3da5ac6956717083
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdmandelin
bugs547875
milestone9.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 547875 - No OOM check on trace when creating a null closure in JSOP_LAMBDA r=dmandelin
js/src/jstracer.cpp
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -15493,16 +15493,19 @@ TraceRecorder::record_JSOP_LAMBDA()
             }
         }
 
         LIns *proto_ins;
         CHECK_STATUS_A(getClassPrototype(JSProto_Function, proto_ins));
 
         LIns* args[] = { w.immpObjGC(globalObj), proto_ins, w.immpFunGC(fun), cx_ins };
         LIns* x = w.call(&js_NewNullClosure_ci, args);
+        guard(false,
+              w.name(w.eqp0(x), "guard(js_NewNullClosure_ci)"),
+              OOM_EXIT);
         stack(0, x);
         return ARECORD_CONTINUE;
     }
 
     if (GetBlockChainFast(cx, cx->fp(), JSOP_LAMBDA, JSOP_LAMBDA_LENGTH))
         RETURN_STOP_A("Unable to trace creating lambda in let");
 
     LIns *proto_ins;