Properly initialized mSaveDepth in JSAutoSuspendRequest, r=sayrer.

This commit is contained in:
Ben Turner 2008-09-08 15:09:41 -07:00
parent 107ed7aaa9
commit 1ec2c83e49

View File

@ -455,7 +455,7 @@ class JSAutoRequest {
class JSAutoSuspendRequest {
public:
JSAutoSuspendRequest(JSContext *cx) : mContext(cx) {
JSAutoSuspendRequest(JSContext *cx) : mContext(cx), mSaveDepth(0) {
if (mContext) {
mSaveDepth = JS_SuspendRequest(mContext);
}