зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1231378 - part 3 - Fix uninitialized members of classes in modules/libjar and mfbt, r=smaug
This commit is contained in:
Родитель
83b88d383f
Коммит
fa1db4f4b7
|
@ -177,7 +177,10 @@ class FastBernoulliTrial {
|
|||
* random number generator; both may not be zero.
|
||||
*/
|
||||
FastBernoulliTrial(double aProbability, uint64_t aState0, uint64_t aState1)
|
||||
: mGenerator(aState0, aState1)
|
||||
: mProbability(0)
|
||||
, mInvLogNotProbability(0)
|
||||
, mGenerator(aState0, aState1)
|
||||
, mSkipCount(0)
|
||||
{
|
||||
setProbability(aProbability);
|
||||
}
|
||||
|
|
|
@ -95,6 +95,10 @@ class ThreadLocal
|
|||
};
|
||||
|
||||
public:
|
||||
ThreadLocal()
|
||||
: mKey(0), mInited(false)
|
||||
{}
|
||||
|
||||
MOZ_WARN_UNUSED_RESULT inline bool init();
|
||||
|
||||
inline T get() const;
|
||||
|
|
|
@ -84,6 +84,7 @@ nsJAR::nsJAR(): mZip(new nsZipArchive()),
|
|||
mReleaseTime(PR_INTERVAL_NO_TIMEOUT),
|
||||
mCache(nullptr),
|
||||
mLock("nsJAR::mLock"),
|
||||
mMtime(0),
|
||||
mTotalItemsInManifest(0),
|
||||
mOpened(false)
|
||||
{
|
||||
|
@ -1055,6 +1056,7 @@ NS_IMPL_ISUPPORTS(nsZipReaderCache, nsIZipReaderCache, nsIObserver, nsISupportsW
|
|||
|
||||
nsZipReaderCache::nsZipReaderCache()
|
||||
: mLock("nsZipReaderCache.mLock")
|
||||
, mCacheSize(0)
|
||||
, mZips()
|
||||
#ifdef ZIP_CACHE_HIT_RATE
|
||||
,
|
||||
|
|
|
@ -102,7 +102,7 @@ class nsJAR final : public nsIZipReader
|
|||
//-- Private data members
|
||||
nsCOMPtr<nsIFile> mZipFile; // The zip/jar file on disk
|
||||
nsCString mOuterZipEntry; // The entry in the zip this zip is reading from
|
||||
RefPtr<nsZipArchive> mZip; // The underlying zip archive
|
||||
RefPtr<nsZipArchive> mZip; // The underlying zip archive
|
||||
ManifestDataHashtable mManifestData; // Stores metadata for each entry
|
||||
bool mParsedManifest; // True if manifest has been parsed
|
||||
nsCOMPtr<nsIX509Cert> mSigningCert; // The entity which signed this file
|
||||
|
@ -166,7 +166,8 @@ public:
|
|||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSIUTF8STRINGENUMERATOR
|
||||
|
||||
explicit nsJAREnumerator(nsZipFind *aFind) : mFind(aFind), mName(nullptr) {
|
||||
explicit nsJAREnumerator(nsZipFind *aFind)
|
||||
: mFind(aFind), mName(nullptr), mNameLen(0) {
|
||||
NS_ASSERTION(mFind, "nsJAREnumerator: Missing zipFind.");
|
||||
}
|
||||
|
||||
|
|
|
@ -195,6 +195,7 @@ nsJARInputThunk::IsNonBlocking(bool *nonBlocking)
|
|||
|
||||
nsJARChannel::nsJARChannel()
|
||||
: mOpened(false)
|
||||
, mContentDisposition(0)
|
||||
, mAppURI(nullptr)
|
||||
, mContentLength(-1)
|
||||
, mLoadFlags(LOAD_NORMAL)
|
||||
|
|
|
@ -21,8 +21,8 @@ class nsJARInputStream final : public nsIInputStream
|
|||
{
|
||||
public:
|
||||
nsJARInputStream() :
|
||||
mOutSize(0), mInCrc(0), mOutCrc(0), mCurPos(0),
|
||||
mMode(MODE_NOTINITED)
|
||||
mOutSize(0), mInCrc(0), mOutCrc(0), mNameLen(0),
|
||||
mCurPos(0), mArrPos(0), mMode(MODE_NOTINITED)
|
||||
{
|
||||
memset(&mZs, 0, sizeof(z_stream));
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ class nsJARInputStream final : public nsIInputStream
|
|||
z_stream mZs; // zip data structure
|
||||
|
||||
/* For directory reading */
|
||||
RefPtr<nsJAR> mJar; // string reference to zipreader
|
||||
RefPtr<nsJAR> mJar; // string reference to zipreader
|
||||
uint32_t mNameLen; // length of dirname
|
||||
nsCString mBuffer; // storage for generated text of stream
|
||||
uint32_t mCurPos; // Current position in buffer
|
||||
|
|
|
@ -52,9 +52,10 @@ NS_IMPL_ISUPPORTS(nsZipWriter, nsIZipWriter,
|
|||
nsIRequestObserver)
|
||||
|
||||
nsZipWriter::nsZipWriter()
|
||||
{
|
||||
mInQueue = false;
|
||||
}
|
||||
: mCDSOffset(0)
|
||||
, mCDSDirty(false)
|
||||
, mInQueue(false)
|
||||
{}
|
||||
|
||||
nsZipWriter::~nsZipWriter()
|
||||
{
|
||||
|
|
|
@ -200,7 +200,10 @@ protected:
|
|||
virtual ~nsPrefBranch();
|
||||
|
||||
nsPrefBranch() /* disallow use of this constructer */
|
||||
{ }
|
||||
: mPrefRootLength(0)
|
||||
, mIsDefault(false)
|
||||
, mFreeingObserverList(false)
|
||||
{}
|
||||
|
||||
nsresult GetDefaultFromPropertiesFile(const char *aPrefName, char16_t **return_buf);
|
||||
// As SetCharPref, but without any check on the length of |aValue|
|
||||
|
|
Загрузка…
Ссылка в новой задаче