From 90ac230485f6b50e1433c246e9992e9bbc34c397 Mon Sep 17 00:00:00 2001 From: Andi-Bogdan Postelnicu Date: Thu, 14 Jun 2018 11:19:07 +0300 Subject: [PATCH] Bug 1453795 - Necko - Initialize member fields in classes/ structures. r=michal --- netwerk/base/Dashboard.cpp | 11 ++++++-- netwerk/base/MemoryDownloader.cpp | 1 + netwerk/base/Predictor.cpp | 3 +++ netwerk/base/RequestContextService.cpp | 3 ++- netwerk/base/TCPFastOpenLayer.cpp | 12 ++++++++- netwerk/base/nsAsyncStreamCopier.cpp | 2 ++ netwerk/base/nsBaseChannel.cpp | 1 + netwerk/base/nsBufferedStreams.cpp | 3 ++- netwerk/base/nsIURIMutatorUtils.cpp | 1 + netwerk/base/nsInputStreamPump.cpp | 4 +++ netwerk/base/nsPACMan.cpp | 1 + netwerk/base/nsServerSocket.cpp | 9 +++++++ netwerk/base/nsSocketTransport2.cpp | 4 +++ netwerk/base/nsStandardURL.h | 4 ++- netwerk/base/nsUDPSocket.cpp | 1 + netwerk/cache/nsCacheEntry.cpp | 5 +++- netwerk/cache/nsCacheEntryDescriptor.h | 2 ++ netwerk/cache/nsCacheService.cpp | 2 ++ netwerk/cache/nsDiskCacheStreams.h | 12 ++++++++- netwerk/cache2/CacheFileIOManager.cpp | 7 ++++++ netwerk/cache2/CacheIndex.h | 1 + netwerk/cache2/CacheStorageService.cpp | 11 +++++++- netwerk/dns/DNS.cpp | 2 ++ netwerk/dns/TRR.h | 1 + netwerk/dns/nsDNSService2.cpp | 6 +++++ netwerk/dns/nsHostResolver.cpp | 1 + netwerk/dns/nsIDNService.cpp | 1 + netwerk/ipc/NeckoMessageUtils.h | 7 +++++- netwerk/protocol/file/nsFileChannel.cpp | 3 ++- .../protocol/ftp/nsFtpConnectionThread.cpp | 3 +++ .../protocol/ftp/nsFtpControlConnection.cpp | 8 ++++-- netwerk/protocol/http/Http2Compression.h | 5 ++++ netwerk/protocol/http/Http2Session.cpp | 1 + netwerk/protocol/http/HttpBaseChannel.cpp | 4 +++ netwerk/protocol/http/NullHttpChannel.cpp | 4 +++ netwerk/protocol/http/TunnelUtils.cpp | 2 ++ netwerk/protocol/http/nsCORSListenerProxy.cpp | 3 +++ netwerk/protocol/http/nsHttpAuthCache.h | 4 +++ netwerk/protocol/http/nsHttpAuthManager.cpp | 6 +++++ netwerk/protocol/http/nsHttpAuthManager.h | 2 +- netwerk/protocol/http/nsHttpChannel.cpp | 2 ++ netwerk/protocol/http/nsHttpConnection.cpp | 9 ++++++- netwerk/protocol/http/nsHttpConnectionMgr.cpp | 9 ++++++- netwerk/protocol/http/nsHttpHandler.cpp | 1 + netwerk/protocol/http/nsHttpNTLMAuth.h | 2 +- netwerk/protocol/http/nsHttpTransaction.cpp | 2 ++ .../protocol/viewsource/nsViewSourceChannel.h | 3 ++- .../protocol/websocket/WebSocketChannel.cpp | 25 +++++++++++++++++++ netwerk/socket/nsSOCKSIOLayer.cpp | 19 ++++++++++++++ .../converters/nsDirIndexParser.cpp | 5 ++++ .../streamconv/converters/nsDirIndexParser.h | 2 +- .../converters/nsHTTPCompressConv.cpp | 2 ++ .../converters/nsHTTPCompressConv.h | 3 +++ .../streamconv/converters/nsIndexedToHTML.cpp | 5 ++++ .../streamconv/converters/nsIndexedToHTML.h | 2 +- .../converters/nsMultiMixedConv.cpp | 3 +++ netwerk/test/TestUDPSocket.cpp | 3 ++- 57 files changed, 239 insertions(+), 21 deletions(-) diff --git a/netwerk/base/Dashboard.cpp b/netwerk/base/Dashboard.cpp index fc9d7987477f..4868b52e701d 100644 --- a/netwerk/base/Dashboard.cpp +++ b/netwerk/base/Dashboard.cpp @@ -147,7 +147,10 @@ public: void StartTimer(uint32_t aTimeout); void StopTimer(); - explicit ConnectionData(Dashboard *target) + explicit ConnectionData(Dashboard* target) + : mPort(0) + , mProtocol(nullptr) + , mTimeout(0) { mEventTarget = nullptr; mDashboard = target; @@ -287,7 +290,11 @@ public: NS_DECL_THREADSAFE_ISUPPORTS NS_DECL_NSIDNSLISTENER - LookupHelper() = default; + LookupHelper() + : mEventTarget{ nullptr } + , mStatus{ NS_ERROR_NOT_INITIALIZED } + { + } nsresult ConstructAnswer(LookupArgument *aArgument); public: diff --git a/netwerk/base/MemoryDownloader.cpp b/netwerk/base/MemoryDownloader.cpp index 2aadf795f0c5..5a6bef065317 100644 --- a/netwerk/base/MemoryDownloader.cpp +++ b/netwerk/base/MemoryDownloader.cpp @@ -17,6 +17,7 @@ NS_IMPL_ISUPPORTS(MemoryDownloader, MemoryDownloader::MemoryDownloader(IObserver* aObserver) : mObserver(aObserver) +, mStatus(NS_ERROR_NOT_INITIALIZED) { } diff --git a/netwerk/base/Predictor.cpp b/netwerk/base/Predictor.cpp index 7cb35d821fbf..2ed15e5d54f9 100644 --- a/netwerk/base/Predictor.cpp +++ b/netwerk/base/Predictor.cpp @@ -262,6 +262,9 @@ NS_IMPL_ISUPPORTS(Predictor, Predictor::Predictor() :mInitialized(false) + ,mCleanedUp(false) + ,mStartupTime(0) + ,mLastStartupTime(0) ,mStartupCount(1) { MOZ_ASSERT(!sSelf, "multiple Predictor instances!"); diff --git a/netwerk/base/RequestContextService.cpp b/netwerk/base/RequestContextService.cpp index bd10d6d3cd09..9cdb2f071d67 100644 --- a/netwerk/base/RequestContextService.cpp +++ b/netwerk/base/RequestContextService.cpp @@ -464,7 +464,8 @@ RequestContextService *RequestContextService::sSelf = nullptr; NS_IMPL_ISUPPORTS(RequestContextService, nsIRequestContextService, nsIObserver) RequestContextService::RequestContextService() - : mNextRCID(1) + : mRCIDNamespace(0) + , mNextRCID(1) { MOZ_ASSERT(!sSelf, "multiple rcs instances!"); MOZ_ASSERT(NS_IsMainThread()); diff --git a/netwerk/base/TCPFastOpenLayer.cpp b/netwerk/base/TCPFastOpenLayer.cpp index f9fbf191aae4..787f4e1e1677 100644 --- a/netwerk/base/TCPFastOpenLayer.cpp +++ b/netwerk/base/TCPFastOpenLayer.cpp @@ -58,7 +58,17 @@ public: : mState(WAITING_FOR_CONNECT) , mFirstPacketBufLen(0) , mCondition(0) - {} + { + this->mAddr.raw.family = 0; + this->mAddr.inet.family = 0; + this->mAddr.inet.port = 0; + this->mAddr.inet.ip = 0; + this->mAddr.ipv6.family = 0; + this->mAddr.ipv6.port = 0; + this->mAddr.ipv6.flowinfo = 0; + this->mAddr.ipv6.scope_id = 0; + this->mAddr.local.family = 0; + } enum { CONNECTED, diff --git a/netwerk/base/nsAsyncStreamCopier.cpp b/netwerk/base/nsAsyncStreamCopier.cpp index 1b9031f6aa2d..b5441b1d8d4d 100644 --- a/netwerk/base/nsAsyncStreamCopier.cpp +++ b/netwerk/base/nsAsyncStreamCopier.cpp @@ -74,6 +74,8 @@ nsAsyncStreamCopier::nsAsyncStreamCopier() , mChunkSize(nsIOService::gDefaultSegmentSize) , mStatus(NS_OK) , mIsPending(false) + , mCloseSource{ false } + , mCloseSink{ false } , mShouldSniffBuffering(false) { LOG(("Creating nsAsyncStreamCopier @%p\n", this)); diff --git a/netwerk/base/nsBaseChannel.cpp b/netwerk/base/nsBaseChannel.cpp index ea57c3407363..1a50a8e589f7 100644 --- a/netwerk/base/nsBaseChannel.cpp +++ b/netwerk/base/nsBaseChannel.cpp @@ -59,6 +59,7 @@ nsBaseChannel::nsBaseChannel() , mAllowThreadRetargeting(true) , mWaitingOnAsyncRedirect(false) , mOpenRedirectChannel(false) + , mRedirectFlags{ 0 } , mStatus(NS_OK) , mContentDispositionHint(UINT32_MAX) , mContentLength(-1) diff --git a/netwerk/base/nsBufferedStreams.cpp b/netwerk/base/nsBufferedStreams.cpp index 863e8b9ae569..60a6bf26fb54 100644 --- a/netwerk/base/nsBufferedStreams.cpp +++ b/netwerk/base/nsBufferedStreams.cpp @@ -46,7 +46,8 @@ using mozilla::Some; // nsBufferedStream nsBufferedStream::nsBufferedStream() - : mBuffer(nullptr), + : mBufferSize(0), + mBuffer(nullptr), mBufferStartOffset(0), mCursor(0), mFillPoint(0), diff --git a/netwerk/base/nsIURIMutatorUtils.cpp b/netwerk/base/nsIURIMutatorUtils.cpp index 0e02232b6e65..5908b0c40cd9 100644 --- a/netwerk/base/nsIURIMutatorUtils.cpp +++ b/netwerk/base/nsIURIMutatorUtils.cpp @@ -18,6 +18,7 @@ NS_MutateURI::NS_MutateURI(nsIURI* aURI) } NS_MutateURI::NS_MutateURI(const char * aContractID) + : mStatus(NS_ERROR_NOT_INITIALIZED) { mMutator = do_CreateInstance(aContractID, &mStatus); MOZ_ASSERT(NS_SUCCEEDED(mStatus), "Called with wrong aContractID"); diff --git a/netwerk/base/nsInputStreamPump.cpp b/netwerk/base/nsInputStreamPump.cpp index 218a85c3412a..2c2a7923ed72 100644 --- a/netwerk/base/nsInputStreamPump.cpp +++ b/netwerk/base/nsInputStreamPump.cpp @@ -38,9 +38,13 @@ static mozilla::LazyLogModule gStreamPumpLog("nsStreamPump"); nsInputStreamPump::nsInputStreamPump() : mState(STATE_IDLE) , mStreamOffset(0) + , mStreamLength(0) + , mSegSize(0) + , mSegCount(0) , mStatus(NS_OK) , mSuspendCount(0) , mLoadFlags(LOAD_NORMAL) + , mIsPending(false) , mProcessingCallbacks(false) , mWaitingForInputStreamReady(false) , mCloseWhenDone(false) diff --git a/netwerk/base/nsPACMan.cpp b/netwerk/base/nsPACMan.cpp index effcf5ac96f3..d3ec6e92a13b 100644 --- a/netwerk/base/nsPACMan.cpp +++ b/netwerk/base/nsPACMan.cpp @@ -277,6 +277,7 @@ PendingPACQuery::PendingPACQuery(nsPACMan* pacMan, nsPACManCallback* callback, bool mainThreadResponse) : Runnable("net::PendingPACQuery") + , mPort(0) , mPACMan(pacMan) , mCallback(callback) , mOnMainThreadOnly(mainThreadResponse) diff --git a/netwerk/base/nsServerSocket.cpp b/netwerk/base/nsServerSocket.cpp index c1df2e690653..521804d16f9e 100644 --- a/netwerk/base/nsServerSocket.cpp +++ b/netwerk/base/nsServerSocket.cpp @@ -44,6 +44,15 @@ nsServerSocket::nsServerSocket() , mAttached(false) , mKeepWhenOffline(false) { + this->mAddr.raw.family = 0; + this->mAddr.inet.family = 0; + this->mAddr.inet.port = 0; + this->mAddr.inet.ip = 0; + this->mAddr.ipv6.family = 0; + this->mAddr.ipv6.port = 0; + this->mAddr.ipv6.flowinfo = 0; + this->mAddr.ipv6.scope_id = 0; + this->mAddr.local.family = 0; // we want to be able to access the STS directly, and it may not have been // constructed yet. the STS constructor sets gSocketTransportService. if (!gSocketTransportService) diff --git a/netwerk/base/nsSocketTransport2.cpp b/netwerk/base/nsSocketTransport2.cpp index a05c9d520b15..51986164e3e9 100644 --- a/netwerk/base/nsSocketTransport2.cpp +++ b/netwerk/base/nsSocketTransport2.cpp @@ -794,6 +794,10 @@ nsSocketTransport::nsSocketTransport() , mFirstRetryError(NS_OK) , mDoNotRetryToConnect(false) { + this->mNetAddr.raw.family = 0; + this->mNetAddr.inet = {}; + this->mSelfAddr.raw.family = 0; + this->mSelfAddr.inet = {}; SOCKET_LOG(("creating nsSocketTransport @%p\n", this)); mTimeouts[TIMEOUT_CONNECT] = UINT16_MAX; // no timeout diff --git a/netwerk/base/nsStandardURL.h b/netwerk/base/nsStandardURL.h index a5cf522cbdfa..e3b85cbcf537 100644 --- a/netwerk/base/nsStandardURL.h +++ b/netwerk/base/nsStandardURL.h @@ -474,7 +474,9 @@ public: return NS_OK; } - explicit TemplatedMutator() = default; + explicit TemplatedMutator() : mMarkedFileURL(false) + { + } private: virtual ~TemplatedMutator() = default; diff --git a/netwerk/base/nsUDPSocket.cpp b/netwerk/base/nsUDPSocket.cpp index 8c2d8ecaf488..17799739a90b 100644 --- a/netwerk/base/nsUDPSocket.cpp +++ b/netwerk/base/nsUDPSocket.cpp @@ -264,6 +264,7 @@ nsUDPSocket::nsUDPSocket() , mByteReadCount(0) , mByteWriteCount(0) { + this->mAddr.inet = {}; mAddr.raw.family = PR_AF_UNSPEC; // we want to be able to access the STS directly, and it may not have been // constructed yet. the STS constructor sets gSocketTransportService. diff --git a/netwerk/cache/nsCacheEntry.cpp b/netwerk/cache/nsCacheEntry.cpp index ad4a426fc9d5..d583c6026db0 100644 --- a/netwerk/cache/nsCacheEntry.cpp +++ b/netwerk/cache/nsCacheEntry.cpp @@ -27,13 +27,16 @@ nsCacheEntry::nsCacheEntry(const nsACString & key, mFetchCount(0), mLastFetched(0), mLastModified(0), + mLastValidated(0), mExpirationTime(nsICache::NO_EXPIRATION_TIME), mFlags(0), mPredictedDataSize(-1), mDataSize(0), mCacheDevice(nullptr), mCustomDevice(nullptr), - mData(nullptr) + mData(nullptr), + mRequestQ{}, + mDescriptorQ{} { MOZ_COUNT_CTOR(nsCacheEntry); PR_INIT_CLIST(this); diff --git a/netwerk/cache/nsCacheEntryDescriptor.h b/netwerk/cache/nsCacheEntryDescriptor.h index 668f1d7e4359..4fb0f76486ab 100644 --- a/netwerk/cache/nsCacheEntryDescriptor.h +++ b/netwerk/cache/nsCacheEntryDescriptor.h @@ -123,6 +123,7 @@ private: : nsInputStreamWrapper(desc, off) , mReadBuffer(nullptr) , mReadBufferLen(0) + , mZstream{} , mStreamInitialized(false) , mStreamEnded(false) { @@ -203,6 +204,7 @@ private: : nsOutputStreamWrapper(desc, off) , mWriteBuffer(nullptr) , mWriteBufferLen(0) + , mZstream{} , mStreamInitialized(false) , mStreamEnded(false) , mUncompressedCount(0) diff --git a/netwerk/cache/nsCacheService.cpp b/netwerk/cache/nsCacheService.cpp index 5fd6cb396ac9..b020f4a89512 100644 --- a/netwerk/cache/nsCacheService.cpp +++ b/netwerk/cache/nsCacheService.cpp @@ -1103,9 +1103,11 @@ nsCacheService::nsCacheService() mClearingEntries(false), mEnableMemoryDevice(true), mEnableDiskDevice(true), + mEnableOfflineDevice(false), mMemoryDevice(nullptr), mDiskDevice(nullptr), mOfflineDevice(nullptr), + mDoomedEntries{}, mTotalEntries(0), mCacheHits(0), mCacheMisses(0), diff --git a/netwerk/cache/nsDiskCacheStreams.h b/netwerk/cache/nsDiskCacheStreams.h index 937ba4be2e32..4736e5a5b771 100644 --- a/netwerk/cache/nsDiskCacheStreams.h +++ b/netwerk/cache/nsDiskCacheStreams.h @@ -43,7 +43,17 @@ public: // GCC 2.95.2 requires this to be defined, although we never call it. // and OS/2 requires that it not be private - nsDiskCacheStreamIO() { NS_NOTREACHED("oops"); } + nsDiskCacheStreamIO() + : mBinding(nullptr), + mDevice(nullptr), + mFD(nullptr), + mStreamEnd(0), + mBufSize(0), + mBuffer(nullptr), + mOutputStreamIsOpen(false) + { + NS_NOTREACHED("oops"); + } private: virtual ~nsDiskCacheStreamIO(); diff --git a/netwerk/cache2/CacheFileIOManager.cpp b/netwerk/cache2/CacheFileIOManager.cpp index b7e4fbb6e673..237eda56e052 100644 --- a/netwerk/cache2/CacheFileIOManager.cpp +++ b/netwerk/cache2/CacheFileIOManager.cpp @@ -1065,6 +1065,11 @@ public: , mHasHasAltData(false) , mHasOnStartTime(false) , mHasOnStopTime(false) + , mFrecency(0) + , mExpirationTime(0) + , mHasAltData(false) + , mOnStartTime(0) + , mOnStopTime(0) { if (aFrecency) { mHasFrecency = true; @@ -4279,9 +4284,11 @@ public: nsTArray const& specialHandles) : Runnable("net::SizeOfHandlesRunnable") , mMonitor("SizeOfHandlesRunnable.mMonitor") + , mMonitorNotified(false) , mMallocSizeOf(mallocSizeOf) , mHandles(handles) , mSpecialHandles(specialHandles) + , mSize(0) { } diff --git a/netwerk/cache2/CacheIndex.h b/netwerk/cache2/CacheIndex.h index ff789a750259..89db3e8ce4ad 100644 --- a/netwerk/cache2/CacheIndex.h +++ b/netwerk/cache2/CacheIndex.h @@ -1209,6 +1209,7 @@ private: explicit DiskConsumptionObserver(nsWeakPtr const& aWeakObserver) : Runnable("net::CacheIndex::DiskConsumptionObserver") , mObserver(aWeakObserver) + , mSize(0) { } virtual ~DiskConsumptionObserver() { diff --git a/netwerk/cache2/CacheStorageService.cpp b/netwerk/cache2/CacheStorageService.cpp index bcad3f84bad3..a9f94bcfa79c 100644 --- a/netwerk/cache2/CacheStorageService.cpp +++ b/netwerk/cache2/CacheStorageService.cpp @@ -368,6 +368,7 @@ public: : WalkCacheRunnable(aVisitor, aVisitEntries) , mLoadInfo(aLoadInfo) , mPass(COLLECT_STATS) + , mCount(0) { } @@ -396,6 +397,11 @@ private: explicit OnCacheEntryInfoRunnable(WalkDiskCacheRunnable* aWalker) : Runnable("net::WalkDiskCacheRunnable::OnCacheEntryInfoRunnable") , mWalker(aWalker) + , mDataSize(0) + , mFetchCount(0) + , mLastModifiedTime(0) + , mExpirationTime(0) + , mPinned(false) { } @@ -1633,7 +1639,10 @@ public: NS_DECL_NSIRUNNABLE explicit CacheEntryDoomByKeyCallback(nsICacheEntryDoomCallback* aCallback) - : mCallback(aCallback) { } + : mCallback(aCallback) + , mResult(NS_ERROR_NOT_INITIALIZED) + { + } private: virtual ~CacheEntryDoomByKeyCallback(); diff --git a/netwerk/dns/DNS.cpp b/netwerk/dns/DNS.cpp index 7d524cb46263..d958d5bf2209 100644 --- a/netwerk/dns/DNS.cpp +++ b/netwerk/dns/DNS.cpp @@ -283,6 +283,8 @@ NetAddr::operator < (const NetAddr& other) const NetAddrElement::NetAddrElement(const PRNetAddr *prNetAddr) { + this->mAddress.raw.family = 0; + this->mAddress.inet = {}; PRNetAddrToNetAddr(prNetAddr, &mAddress); } diff --git a/netwerk/dns/TRR.h b/netwerk/dns/TRR.h index 3df505bf3ed8..61753b9ae6e6 100644 --- a/netwerk/dns/TRR.h +++ b/netwerk/dns/TRR.h @@ -108,6 +108,7 @@ public: explicit TRR(AHostResolver *aResolver, bool aPB) : mozilla::Runnable("TRR") , mHostResolver(aResolver) + , mType(TRRTYPE_A) , mBodySize(0) , mFailed(false) , mPB(aPB) diff --git a/netwerk/dns/nsDNSService2.cpp b/netwerk/dns/nsDNSService2.cpp index a663811bcc35..9f78c4609594 100644 --- a/netwerk/dns/nsDNSService2.cpp +++ b/netwerk/dns/nsDNSService2.cpp @@ -493,10 +493,16 @@ nsDNSService::nsDNSService() : mLock("nsDNSServer.mLock") , mDisableIPv6(false) , mDisablePrefetch(false) + , mBlockDotOnion(false) , mNotifyResolution(false) , mOfflineLocalhost(false) , mForceResolveOn(false) + , mProxyType(0) , mTrrService(nullptr) + , mResCacheEntries(0) + , mResCacheExpiration(0) + , mResCacheGrace(0) + , mResolverPrefsUpdated(false) { } diff --git a/netwerk/dns/nsHostResolver.cpp b/netwerk/dns/nsHostResolver.cpp index c6c9801d20a7..d70e64b7ac36 100644 --- a/netwerk/dns/nsHostResolver.cpp +++ b/netwerk/dns/nsHostResolver.cpp @@ -183,6 +183,7 @@ nsHostRecord::nsHostRecord(const nsHostKey& key) , addr_info(nullptr) , addr(nullptr) , negative(false) + , mResolverMode(MODE_NATIVEONLY) , mResolving(0) , mTRRSuccess(0) , mNativeSuccess(0) diff --git a/netwerk/dns/nsIDNService.cpp b/netwerk/dns/nsIDNService.cpp index f9f71635792a..1195c7f594be 100644 --- a/netwerk/dns/nsIDNService.cpp +++ b/netwerk/dns/nsIDNService.cpp @@ -141,6 +141,7 @@ void nsIDNService::prefsChanged(nsIPrefBranch *prefBranch, const char16_t *pref) nsIDNService::nsIDNService() : mLock("DNService pref value lock") , mShowPunycode(false) + , mRestrictionProfile(static_cast(0)) , mIDNUseWhitelist(false) { MOZ_ASSERT(NS_IsMainThread()); diff --git a/netwerk/ipc/NeckoMessageUtils.h b/netwerk/ipc/NeckoMessageUtils.h index 26892416ac0c..ad60c4624ae8 100644 --- a/netwerk/ipc/NeckoMessageUtils.h +++ b/netwerk/ipc/NeckoMessageUtils.h @@ -27,7 +27,12 @@ struct Permission uint32_t capability, expireType; int64_t expireTime; - Permission() { } + Permission() + : capability(0) + , expireType(0) + , expireTime(0) + {} + Permission(const nsCString& aOrigin, const nsCString& aType, const uint32_t aCapability, diff --git a/netwerk/protocol/file/nsFileChannel.cpp b/netwerk/protocol/file/nsFileChannel.cpp index d12e0e309ddf..c97224d73c1d 100644 --- a/netwerk/protocol/file/nsFileChannel.cpp +++ b/netwerk/protocol/file/nsFileChannel.cpp @@ -257,7 +257,8 @@ nsFileUploadContentStream::OnCopyComplete() //----------------------------------------------------------------------------- nsFileChannel::nsFileChannel(nsIURI *uri) - : mFileURI(uri) + : mUploadLength(0) + , mFileURI(uri) { } diff --git a/netwerk/protocol/ftp/nsFtpConnectionThread.cpp b/netwerk/protocol/ftp/nsFtpConnectionThread.cpp index efbd98eb57a7..b1eb78a97d4e 100644 --- a/netwerk/protocol/ftp/nsFtpConnectionThread.cpp +++ b/netwerk/protocol/ftp/nsFtpConnectionThread.cpp @@ -75,6 +75,7 @@ nsFtpState::nsFtpState() , mState(FTP_INIT) , mNextState(FTP_S_USER) , mKeepRunning(true) + , mResponseCode(0) , mReceivedControlData(false) , mTryingCachedControl(false) , mRETRFailed(false) @@ -94,6 +95,8 @@ nsFtpState::nsFtpState() , mControlStatus(NS_OK) , mDeferredCallbackPending(false) { + this->mServerAddress.raw.family = 0; + this->mServerAddress.inet = {}; LOG_INFO(("FTP:(%p) nsFtpState created", this)); // make sure handler stays around diff --git a/netwerk/protocol/ftp/nsFtpControlConnection.cpp b/netwerk/protocol/ftp/nsFtpControlConnection.cpp index 8cc3cf081f33..491ae6b881c6 100644 --- a/netwerk/protocol/ftp/nsFtpControlConnection.cpp +++ b/netwerk/protocol/ftp/nsFtpControlConnection.cpp @@ -66,8 +66,12 @@ nsFtpControlConnection::OnInputStreamReady(nsIAsyncInputStream *stream) nsFtpControlConnection::nsFtpControlConnection(const nsACString& host, uint32_t port) - : mServerType(0), mSessionId(gFtpHandler->GetSessionId()) - , mUseUTF8(false), mHost(host), mPort(port) + : mServerType(0) + , mSuspendedWrite(0) + , mSessionId(gFtpHandler->GetSessionId()) + , mUseUTF8(false) + , mHost(host) + , mPort(port) { LOG_INFO(("FTP:CC created @%p", this)); } diff --git a/netwerk/protocol/http/Http2Compression.h b/netwerk/protocol/http/Http2Compression.h index e7f46f1f3b8a..7bff09d93b73 100644 --- a/netwerk/protocol/http/Http2Compression.h +++ b/netwerk/protocol/http/Http2Compression.h @@ -100,6 +100,11 @@ class Http2Decompressor final : public Http2BaseCompressor { public: Http2Decompressor() + : mOffset(0) + , mData(nullptr) + , mDataLen(0) + , mSeenNonColonHeader(false) + , mIsPush(false) { mPeakSizeID = Telemetry::HPACK_PEAK_SIZE_DECOMPRESSOR; mPeakCountID = Telemetry::HPACK_PEAK_COUNT_DECOMPRESSOR; diff --git a/netwerk/protocol/http/Http2Session.cpp b/netwerk/protocol/http/Http2Session.cpp index 859bd39d0a22..e3417e0ffcba 100644 --- a/netwerk/protocol/http/Http2Session.cpp +++ b/netwerk/protocol/http/Http2Session.cpp @@ -114,6 +114,7 @@ Http2Session::Http2Session(nsISocketTransport *aSocketTransport, enum SpdyVersio , mLastReadEpoch(PR_IntervalNow()) , mPingSentEpoch(0) , mPreviousUsed(false) + , mAggregatedHeaderSize(0) , mWaitingForSettingsAck(false) , mGoAwayOnPush(false) , mUseH2Deps(false) diff --git a/netwerk/protocol/http/HttpBaseChannel.cpp b/netwerk/protocol/http/HttpBaseChannel.cpp index 93961ebe05cb..ad644ddd7696 100644 --- a/netwerk/protocol/http/HttpBaseChannel.cpp +++ b/netwerk/protocol/http/HttpBaseChannel.cpp @@ -199,6 +199,7 @@ HttpBaseChannel::HttpBaseChannel() , mReferrerPolicy(NS_GetDefaultReferrerPolicy()) , mRedirectCount(0) , mInternalRedirectCount(0) + , mChannelCreationTime(0) , mForcePending(false) , mCorsIncludeCredentials(false) , mCorsMode(nsIHttpChannelInternal::CORS_MODE_NO_CORS) @@ -219,10 +220,13 @@ HttpBaseChannel::HttpBaseChannel() , mAltDataForChild(false) , mForceMainDocumentChannel(false) , mIsTrackingResource(false) + , mChannelId(0) , mLastRedirectFlags(0) , mReqContentLength(0U) , mPendingInputStreamLengthOperation(false) { + this->mSelfAddr.inet = {}; + this->mPeerAddr.inet = {}; LOG(("Creating HttpBaseChannel @%p\n", this)); // Subfields of unions cannot be targeted in an initializer list. diff --git a/netwerk/protocol/http/NullHttpChannel.cpp b/netwerk/protocol/http/NullHttpChannel.cpp index f6a3500573c7..ef222b921012 100644 --- a/netwerk/protocol/http/NullHttpChannel.cpp +++ b/netwerk/protocol/http/NullHttpChannel.cpp @@ -15,6 +15,8 @@ NS_IMPL_ISUPPORTS(NullHttpChannel, nsINullChannel, nsIHttpChannel, nsITimedChannel) NullHttpChannel::NullHttpChannel() + : mAllRedirectsSameOrigin(false) + , mAllRedirectsPassTimingAllowCheck(false) { mChannelCreationTime = PR_Now(); mChannelCreationTimestamp = TimeStamp::Now(); @@ -22,6 +24,8 @@ NullHttpChannel::NullHttpChannel() } NullHttpChannel::NullHttpChannel(nsIHttpChannel * chan) + : mAllRedirectsSameOrigin(false) + , mAllRedirectsPassTimingAllowCheck(false) { nsIScriptSecurityManager* ssm = nsContentUtils::GetSecurityManager(); ssm->GetChannelURIPrincipal(chan, getter_AddRefs(mResourcePrincipal)); diff --git a/netwerk/protocol/http/TunnelUtils.cpp b/netwerk/protocol/http/TunnelUtils.cpp index db4b30bb9169..15d9faa557fa 100644 --- a/netwerk/protocol/http/TunnelUtils.cpp +++ b/netwerk/protocol/http/TunnelUtils.cpp @@ -43,7 +43,9 @@ TLSFilterTransaction::TLSFilterTransaction(nsAHttpTransaction *aWrapped, , mEncryptedTextSize(0) , mSegmentReader(aReader) , mSegmentWriter(aWriter) + , mFilterReadCode(NS_ERROR_NOT_INITIALIZED) , mForce(false) + , mReadSegmentBlocked(false) , mNudgeCounter(0) { MOZ_ASSERT(OnSocketThread(), "not on socket thread"); diff --git a/netwerk/protocol/http/nsCORSListenerProxy.cpp b/netwerk/protocol/http/nsCORSListenerProxy.cpp index 53340cea9154..01fa8a012754 100644 --- a/netwerk/protocol/http/nsCORSListenerProxy.cpp +++ b/netwerk/protocol/http/nsCORSListenerProxy.cpp @@ -419,6 +419,9 @@ nsCORSListenerProxy::nsCORSListenerProxy(nsIStreamListener* aOuter, mWithCredentials(aWithCredentials && !gDisableCORSPrivateData), mRequestApproved(false), mHasBeenCrossSite(false), +#ifdef DEBUG + mInited(false), +#endif mMutex("nsCORSListenerProxy") { } diff --git a/netwerk/protocol/http/nsHttpAuthCache.h b/netwerk/protocol/http/nsHttpAuthCache.h index 98a10e06e35b..269479130d11 100644 --- a/netwerk/protocol/http/nsHttpAuthCache.h +++ b/netwerk/protocol/http/nsHttpAuthCache.h @@ -43,6 +43,8 @@ public: const char16_t *user, const char16_t *password) : mUser(nullptr) + , mPass{ nullptr } + , mDomain{ nullptr } { DebugOnly rv = Set(domain, user, password); MOZ_ASSERT(NS_SUCCEEDED(rv)); @@ -106,6 +108,8 @@ private: : mRoot(nullptr) , mTail(nullptr) , mRealm(nullptr) + , mCreds{ nullptr } + , mChallenge{ nullptr } { DebugOnly rv = Set(path, realm, creds, challenge, ident, metadata); MOZ_ASSERT(NS_SUCCEEDED(rv)); diff --git a/netwerk/protocol/http/nsHttpAuthManager.cpp b/netwerk/protocol/http/nsHttpAuthManager.cpp index 3457be6741a1..4386f9efba1b 100644 --- a/netwerk/protocol/http/nsHttpAuthManager.cpp +++ b/netwerk/protocol/http/nsHttpAuthManager.cpp @@ -16,6 +16,12 @@ namespace net { NS_IMPL_ISUPPORTS(nsHttpAuthManager, nsIHttpAuthManager) +nsHttpAuthManager::nsHttpAuthManager() + : mAuthCache(nullptr) + , mPrivateAuthCache(nullptr) +{ +} + nsresult nsHttpAuthManager::Init() { // get reference to the auth cache. we assume that we will live diff --git a/netwerk/protocol/http/nsHttpAuthManager.h b/netwerk/protocol/http/nsHttpAuthManager.h index 4df1b936316a..331c5899484d 100644 --- a/netwerk/protocol/http/nsHttpAuthManager.h +++ b/netwerk/protocol/http/nsHttpAuthManager.h @@ -19,7 +19,7 @@ public: NS_DECL_ISUPPORTS NS_DECL_NSIHTTPAUTHMANAGER - nsHttpAuthManager() = default; + nsHttpAuthManager(); MOZ_MUST_USE nsresult Init(); protected: diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp index 60c4adcc3d32..1cfe7a188f0f 100644 --- a/netwerk/protocol/http/nsHttpChannel.cpp +++ b/netwerk/protocol/http/nsHttpChannel.cpp @@ -304,6 +304,7 @@ nsHttpChannel::nsHttpChannel() , mRequestTime(0) , mOfflineCacheLastModifiedTime(0) , mSuspendTotalTime(0) + , mRedirectType(0) , mCacheOpenWithPriority(false) , mCacheQueueSizeWhenOpen(0) , mCachedContentIsValid(false) @@ -333,6 +334,7 @@ nsHttpChannel::nsHttpChannel() , mUsedNetwork(0) , mAuthConnectionRestartable(0) , mPushedStream(nullptr) + , mLocalBlocklist(false) , mOnTailUnblock(nullptr) , mWarningReporter(nullptr) , mIsReadingFromCache(false) diff --git a/netwerk/protocol/http/nsHttpConnection.cpp b/netwerk/protocol/http/nsHttpConnection.cpp index 2be2707e1dcc..18bc3f2678a8 100644 --- a/netwerk/protocol/http/nsHttpConnection.cpp +++ b/netwerk/protocol/http/nsHttpConnection.cpp @@ -46,9 +46,14 @@ namespace net { //----------------------------------------------------------------------------- nsHttpConnection::nsHttpConnection() - : mTransaction(nullptr) + : mSocketInCondition(NS_ERROR_NOT_INITIALIZED) + , mSocketOutCondition(NS_ERROR_NOT_INITIALIZED) + , mTransaction(nullptr) , mHttpHandler(gHttpHandler) , mCallbacksLock("nsHttpConnection::mCallbacksLock") + , mLastReadTime(0) + , mLastWriteTime(0) + , mMaxHangTime(0) , mConsiderReusedAfterInterval(0) , mConsiderReusedAfterEpoch(0) , mCurrentBytesRead(0) @@ -56,6 +61,7 @@ nsHttpConnection::nsHttpConnection() , mTotalBytesRead(0) , mTotalBytesWritten(0) , mContentBytesWritten(0) + , mRtt(0) , mUrgentStartPreferred(false) , mUrgentStartPreferredKnown(false) , mConnectedTransport(false) @@ -70,6 +76,7 @@ nsHttpConnection::nsHttpConnection() , mExperienced(false) , mInSpdyTunnel(false) , mForcePlainText(false) + , mTrafficCount(0) , mTrafficStamp(false) , mHttp1xTransactionCount(0) , mRemainingConnectionUses(0xffffffff) diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.cpp b/netwerk/protocol/http/nsHttpConnectionMgr.cpp index 9fe654c69b13..a12c35f790f0 100644 --- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp +++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp @@ -464,7 +464,14 @@ nsHttpConnectionMgr::DoShiftReloadConnectionCleanup(nsHttpConnectionInfo *aCI) class SpeculativeConnectArgs : public ARefBase { public: - SpeculativeConnectArgs() { mOverridesOK = false; } + SpeculativeConnectArgs() + : mParallelSpeculativeConnectLimit(0) + , mIgnoreIdle(false) + , mIsFromPredictor(false) + , mAllow1918(false) + { + mOverridesOK = false; + } NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SpeculativeConnectArgs, override) public: // intentional! diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp index 1ab6b57091f1..82baba69f1f2 100644 --- a/netwerk/protocol/http/nsHttpHandler.cpp +++ b/netwerk/protocol/http/nsHttpHandler.cpp @@ -226,6 +226,7 @@ nsHttpHandler::nsHttpHandler() , mTailDelayQuantum(600) , mTailDelayQuantumAfterDCL(100) , mTailDelayMax(6000) + , mTailTotalMax(0) , mRedirectionLimit(10) , mPhishyUserPassLength(1) , mQoSBits(0x00) diff --git a/netwerk/protocol/http/nsHttpNTLMAuth.h b/netwerk/protocol/http/nsHttpNTLMAuth.h index 6beb3b67a7d5..c24b57f4f889 100644 --- a/netwerk/protocol/http/nsHttpNTLMAuth.h +++ b/netwerk/protocol/http/nsHttpNTLMAuth.h @@ -15,7 +15,7 @@ public: NS_DECL_ISUPPORTS NS_DECL_NSIHTTPAUTHENTICATOR - nsHttpNTLMAuth() = default; + nsHttpNTLMAuth() : mUseNative(false) {} private: virtual ~nsHttpNTLMAuth() = default; diff --git a/netwerk/protocol/http/nsHttpTransaction.cpp b/netwerk/protocol/http/nsHttpTransaction.cpp index c9824d83ce26..7eae2a51d9d4 100644 --- a/netwerk/protocol/http/nsHttpTransaction.cpp +++ b/netwerk/protocol/http/nsHttpTransaction.cpp @@ -146,6 +146,8 @@ nsHttpTransaction::nsHttpTransaction() , mEarlyDataDisposition(EARLY_NONE) , mFastOpenStatus(TFO_NOT_TRIED) { + this->mSelfAddr.inet = {}; + this->mPeerAddr.inet = {}; LOG(("Creating nsHttpTransaction @%p\n", this)); #ifdef MOZ_VALGRIND diff --git a/netwerk/protocol/viewsource/nsViewSourceChannel.h b/netwerk/protocol/viewsource/nsViewSourceChannel.h index a8a8b6c1eb5d..694f09660064 100644 --- a/netwerk/protocol/viewsource/nsViewSourceChannel.h +++ b/netwerk/protocol/viewsource/nsViewSourceChannel.h @@ -46,7 +46,8 @@ public: // nsViewSourceChannel methods: nsViewSourceChannel() : mIsDocument(false) - , mOpened(false) {} + , mOpened(false) + , mIsSrcdocChannel(false) {} MOZ_MUST_USE nsresult Init(nsIURI* uri); diff --git a/netwerk/protocol/websocket/WebSocketChannel.cpp b/netwerk/protocol/websocket/WebSocketChannel.cpp index f94ea45cfdd4..4bf4982fb888 100644 --- a/netwerk/protocol/websocket/WebSocketChannel.cpp +++ b/netwerk/protocol/websocket/WebSocketChannel.cpp @@ -787,6 +787,28 @@ public: , mResetDeflater(false) , mMessageDeflated(false) { + this->mDeflater.next_in = nullptr; + this->mDeflater.avail_in = 0; + this->mDeflater.total_in = 0; + this->mDeflater.next_out = nullptr; + this->mDeflater.avail_out = 0; + this->mDeflater.total_out = 0; + this->mDeflater.msg = nullptr; + this->mDeflater.state = nullptr; + this->mDeflater.data_type = 0; + this->mDeflater.adler = 0; + this->mDeflater.reserved = 0; + this->mInflater.next_in = nullptr; + this->mInflater.avail_in = 0; + this->mInflater.total_in = 0; + this->mInflater.next_out = nullptr; + this->mInflater.avail_out = 0; + this->mInflater.total_out = 0; + this->mInflater.msg = nullptr; + this->mInflater.state = nullptr; + this->mInflater.data_type = 0; + this->mInflater.adler = 0; + this->mInflater.reserved = 0; MOZ_COUNT_CTOR(PMCECompression); mDeflater.zalloc = mInflater.zalloc = Z_NULL; @@ -1158,6 +1180,7 @@ WebSocketChannel::WebSocketChannel() : mOpenTimeout(20000), mConnecting(NOT_CONNECTING), mMaxConcurrentConnections(200), + mInnerWindowID(0), mGotUpgradeOK(0), mRecvdHttpUpgradeTransport(0), mAutoFollowRedirects(0), @@ -1184,6 +1207,8 @@ WebSocketChannel::WebSocketChannel() : mBufferSize(kIncomingBufferInitialSize), mCurrentOut(nullptr), mCurrentOutSent(0), + mHdrOutToSend(0), + mHdrOut(nullptr), mDynamicOutputSize(0), mDynamicOutput(nullptr), mPrivateBrowsing(false), diff --git a/netwerk/socket/nsSOCKSIOLayer.cpp b/netwerk/socket/nsSOCKSIOLayer.cpp index f18c0edc3cf6..6d5d6658489f 100644 --- a/netwerk/socket/nsSOCKSIOLayer.cpp +++ b/netwerk/socket/nsSOCKSIOLayer.cpp @@ -231,6 +231,7 @@ nsSOCKSSocketInfo::nsSOCKSSocketInfo() , mDataLength(0) , mReadOffset(0) , mAmountToRead(0) + , mLookupStatus(NS_ERROR_NOT_INITIALIZED) , mFD(nullptr) , mVersion(-1) , mDestinationFamily(AF_INET) @@ -238,6 +239,24 @@ nsSOCKSSocketInfo::nsSOCKSSocketInfo() , mTlsFlags(0) , mTimeout(PR_INTERVAL_NO_TIMEOUT) { + this->mInternalProxyAddr.inet.family = 0; + this->mInternalProxyAddr.inet6.family = 0; + this->mInternalProxyAddr.inet6.port = 0; + this->mInternalProxyAddr.inet6.flowinfo = 0; + this->mInternalProxyAddr.inet6.scope_id = 0; + this->mInternalProxyAddr.local.family = 0; + this->mExternalProxyAddr.inet.family = 0; + this->mExternalProxyAddr.inet6.family = 0; + this->mExternalProxyAddr.inet6.port = 0; + this->mExternalProxyAddr.inet6.flowinfo = 0; + this->mExternalProxyAddr.inet6.scope_id = 0; + this->mExternalProxyAddr.local.family = 0; + this->mDestinationAddr.inet.family = 0; + this->mDestinationAddr.inet6.family = 0; + this->mDestinationAddr.inet6.port = 0; + this->mDestinationAddr.inet6.flowinfo = 0; + this->mDestinationAddr.inet6.scope_id = 0; + this->mDestinationAddr.local.family = 0; mData = new uint8_t[BUFFER_SIZE]; mInternalProxyAddr.raw.family = AF_INET; diff --git a/netwerk/streamconv/converters/nsDirIndexParser.cpp b/netwerk/streamconv/converters/nsDirIndexParser.cpp index ee0b1e885242..8bc175ce1054 100644 --- a/netwerk/streamconv/converters/nsDirIndexParser.cpp +++ b/netwerk/streamconv/converters/nsDirIndexParser.cpp @@ -25,6 +25,11 @@ NS_IMPL_ISUPPORTS(nsDirIndexParser, nsIStreamListener, nsIDirIndexParser) +nsDirIndexParser::nsDirIndexParser() + : mLineStart(0) + , mHasDescription(false) { +} + nsresult nsDirIndexParser::Init() { mLineStart = 0; diff --git a/netwerk/streamconv/converters/nsDirIndexParser.h b/netwerk/streamconv/converters/nsDirIndexParser.h index 18ce128d1bb2..694012a579a8 100644 --- a/netwerk/streamconv/converters/nsDirIndexParser.h +++ b/netwerk/streamconv/converters/nsDirIndexParser.h @@ -26,7 +26,7 @@ public: NS_DECL_NSIREQUESTOBSERVER NS_DECL_NSIDIRINDEXPARSER - nsDirIndexParser() = default; + nsDirIndexParser(); nsresult Init(); enum fieldType { diff --git a/netwerk/streamconv/converters/nsHTTPCompressConv.cpp b/netwerk/streamconv/converters/nsHTTPCompressConv.cpp index b06a4d16f506..cf71b5571aff 100644 --- a/netwerk/streamconv/converters/nsHTTPCompressConv.cpp +++ b/netwerk/streamconv/converters/nsHTTPCompressConv.cpp @@ -46,6 +46,8 @@ nsHTTPCompressConv::nsHTTPCompressConv() , mCheckHeaderDone(false) , mStreamEnded(false) , mStreamInitialized(false) + , mDummyStreamInitialised(false) + , d_stream{} , mLen(0) , hMode(0) , mSkipCount(0) diff --git a/netwerk/streamconv/converters/nsHTTPCompressConv.h b/netwerk/streamconv/converters/nsHTTPCompressConv.h index 50fe06e17a67..258865d0143c 100644 --- a/netwerk/streamconv/converters/nsHTTPCompressConv.h +++ b/netwerk/streamconv/converters/nsHTTPCompressConv.h @@ -61,6 +61,9 @@ public: : mTotalOut(0) , mStatus(NS_OK) , mBrotliStateIsStreamEnd(false) + , mRequest(nullptr) + , mContext(nullptr) + , mSourceOffset(0) { BrotliDecoderStateInit(&mState, 0, 0, 0); } diff --git a/netwerk/streamconv/converters/nsIndexedToHTML.cpp b/netwerk/streamconv/converters/nsIndexedToHTML.cpp index f811a290ce28..7650283dde5d 100644 --- a/netwerk/streamconv/converters/nsIndexedToHTML.cpp +++ b/netwerk/streamconv/converters/nsIndexedToHTML.cpp @@ -54,6 +54,11 @@ static void AppendNonAsciiToNCR(const nsAString& in, nsCString& out) } } +nsIndexedToHTML::nsIndexedToHTML() + : mExpectAbsLoc(false) +{ +} + nsresult nsIndexedToHTML::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) { nsresult rv; diff --git a/netwerk/streamconv/converters/nsIndexedToHTML.h b/netwerk/streamconv/converters/nsIndexedToHTML.h index 30739c773b2e..8919747050a2 100644 --- a/netwerk/streamconv/converters/nsIndexedToHTML.h +++ b/netwerk/streamconv/converters/nsIndexedToHTML.h @@ -27,7 +27,7 @@ public: NS_DECL_NSISTREAMLISTENER NS_DECL_NSIDIRINDEXLISTENER - nsIndexedToHTML() = default; + nsIndexedToHTML(); nsresult Init(nsIStreamListener *aListener); diff --git a/netwerk/streamconv/converters/nsMultiMixedConv.cpp b/netwerk/streamconv/converters/nsMultiMixedConv.cpp index 17f5b98de506..1dafb66d8b9b 100644 --- a/netwerk/streamconv/converters/nsMultiMixedConv.cpp +++ b/netwerk/streamconv/converters/nsMultiMixedConv.cpp @@ -27,6 +27,8 @@ nsPartChannel::nsPartChannel(nsIChannel *aMultipartChannel, uint32_t aPartID, mMultipartChannel(aMultipartChannel), mListener(aListener), mStatus(NS_OK), + mLoadFlags(0), + mContentDisposition(0), mContentLength(UINT64_MAX), mIsByteRangeRequest(false), mByteRangeStart(0), @@ -813,6 +815,7 @@ nsMultiMixedConv::SwitchToControlParsing() nsMultiMixedConv::nsMultiMixedConv() : mCurrentPartID(0), mInOnDataAvailable(false), + mResponseHeader(HEADER_UNKNOWN), // XXX: This is a hack to bypass the raw pointer to refcounted object in // lambda analysis. It should be removed and replaced when the // IncrementalTokenizer API is improved to avoid the need for such diff --git a/netwerk/test/TestUDPSocket.cpp b/netwerk/test/TestUDPSocket.cpp index ce54a7064618..ca2ce48bc4ff 100644 --- a/netwerk/test/TestUDPSocket.cpp +++ b/netwerk/test/TestUDPSocket.cpp @@ -213,7 +213,8 @@ protected: public: explicit MulticastTimerCallback(WaitForCondition* waiter) - : mWaiter(waiter) + : mResult(NS_ERROR_NOT_INITIALIZED) + , mWaiter(waiter) { } NS_DECL_THREADSAFE_ISUPPORTS