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 75504 5691363f380fe07517235de738216fb40837fb1b
parent 75503 1dccbc1234f4b8869449c0242f8d4f9e3052162e
child 75505 ec4956f17090631ec826f27e3da5ac6956717083
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewersdmandelin
bugs547875
milestone9.0a1
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;