Properly initialized mSaveDepth in JSAutoSuspendRequest, r=sayrer.
authorBen Turner <bent.mozilla@gmail.com>
Mon, 08 Sep 2008 15:09:41 -0700
changeset 19004 ce0b8bf8621c66606bb46120773b2fc6036610bb
parent 19003 4b2977a03aba9d9ca4b719cdc7f95c9441a7da6f
child 19005 71c48ddc9e8c86193c298a7f9a4b78c7e46a52b0
push id1899
push userbturner@mozilla.com
push dateMon, 08 Sep 2008 22:09:51 +0000
treeherderautoland@ce0b8bf8621c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssayrer
milestone1.9.1b1pre
Properly initialized mSaveDepth in JSAutoSuspendRequest, r=sayrer.
js/src/jsapi.h
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -450,17 +450,17 @@ class JSAutoRequest {
   private:
     static void *operator new(size_t) CPP_THROW_NEW { return 0; };
     static void operator delete(void *, size_t) { };
 #endif
 };
 
 class JSAutoSuspendRequest {
   public:
-    JSAutoSuspendRequest(JSContext *cx) : mContext(cx) {
+    JSAutoSuspendRequest(JSContext *cx) : mContext(cx), mSaveDepth(0) {
         if (mContext) {
             mSaveDepth = JS_SuspendRequest(mContext);
         }
     }
     ~JSAutoSuspendRequest() {
         resume();
     }