diff --git a/modules/libpref/src/nsAutoConfig.cpp b/modules/libpref/src/nsAutoConfig.cpp index a1d4a793038..b2ffe98b984 100644 --- a/modules/libpref/src/nsAutoConfig.cpp +++ b/modules/libpref/src/nsAutoConfig.cpp @@ -326,11 +326,10 @@ NS_IMETHODIMP nsAutoConfig::DownloadAutoCfg() // Create a new timer and pass this nsAutoConfig // object as a timer callback. - nsCOMPtr timer; - timer = do_CreateInstance("@mozilla.org/timer;1",&rv); + mTimer = do_CreateInstance("@mozilla.org/timer;1",&rv); if (NS_FAILED(rv)) return rv; - rv = timer->Init(this, minutes*60*1000, NS_PRIORITY_NORMAL, + rv = mTimer->Init(this, minutes*60*1000, NS_PRIORITY_NORMAL, NS_TYPE_REPEATING_SLACK); if (NS_FAILED(rv)) return rv; diff --git a/modules/libpref/src/nsAutoConfig.h b/modules/libpref/src/nsAutoConfig.h index 600aae4c95a..0cbb21ba4ae 100644 --- a/modules/libpref/src/nsAutoConfig.h +++ b/modules/libpref/src/nsAutoConfig.h @@ -59,4 +59,5 @@ class nsAutoConfig : public nsIAutoConfig, nsCString mBuf, mCurrProfile; nsCOMPtr mPrefBranch; PRBool mLoaded; + nsCOMPtr mTimer; };