Bug 1453795 - Necko - Initialize member fields in classes/ structures. r=michal

This commit is contained in:
Andi-Bogdan Postelnicu 2018-06-14 11:19:07 +03:00
Родитель 96ec577e6e
Коммит 90ac230485
57 изменённых файлов: 239 добавлений и 21 удалений

Просмотреть файл

@ -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:

Просмотреть файл

@ -17,6 +17,7 @@ NS_IMPL_ISUPPORTS(MemoryDownloader,
MemoryDownloader::MemoryDownloader(IObserver* aObserver)
: mObserver(aObserver)
, mStatus(NS_ERROR_NOT_INITIALIZED)
{
}

Просмотреть файл

@ -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!");

Просмотреть файл

@ -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());

Просмотреть файл

@ -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,

Просмотреть файл

@ -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));

Просмотреть файл

@ -59,6 +59,7 @@ nsBaseChannel::nsBaseChannel()
, mAllowThreadRetargeting(true)
, mWaitingOnAsyncRedirect(false)
, mOpenRedirectChannel(false)
, mRedirectFlags{ 0 }
, mStatus(NS_OK)
, mContentDispositionHint(UINT32_MAX)
, mContentLength(-1)

Просмотреть файл

@ -46,7 +46,8 @@ using mozilla::Some;
// nsBufferedStream
nsBufferedStream::nsBufferedStream()
: mBuffer(nullptr),
: mBufferSize(0),
mBuffer(nullptr),
mBufferStartOffset(0),
mCursor(0),
mFillPoint(0),

Просмотреть файл

@ -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");

Просмотреть файл

@ -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)

Просмотреть файл

@ -277,6 +277,7 @@ PendingPACQuery::PendingPACQuery(nsPACMan* pacMan,
nsPACManCallback* callback,
bool mainThreadResponse)
: Runnable("net::PendingPACQuery")
, mPort(0)
, mPACMan(pacMan)
, mCallback(callback)
, mOnMainThreadOnly(mainThreadResponse)

Просмотреть файл

@ -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)

Просмотреть файл

@ -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

Просмотреть файл

@ -474,7 +474,9 @@ public:
return NS_OK;
}
explicit TemplatedMutator() = default;
explicit TemplatedMutator() : mMarkedFileURL(false)
{
}
private:
virtual ~TemplatedMutator() = default;

Просмотреть файл

@ -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.

5
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);

2
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)

2
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),

12
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();

Просмотреть файл

@ -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<CacheFileHandle*> const& specialHandles)
: Runnable("net::SizeOfHandlesRunnable")
, mMonitor("SizeOfHandlesRunnable.mMonitor")
, mMonitorNotified(false)
, mMallocSizeOf(mallocSizeOf)
, mHandles(handles)
, mSpecialHandles(specialHandles)
, mSize(0)
{
}

Просмотреть файл

@ -1209,6 +1209,7 @@ private:
explicit DiskConsumptionObserver(nsWeakPtr const& aWeakObserver)
: Runnable("net::CacheIndex::DiskConsumptionObserver")
, mObserver(aWeakObserver)
, mSize(0)
{
}
virtual ~DiskConsumptionObserver() {

Просмотреть файл

@ -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();

Просмотреть файл

@ -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);
}

Просмотреть файл

@ -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)

Просмотреть файл

@ -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)
{
}

Просмотреть файл

@ -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)

Просмотреть файл

@ -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<restrictionProfile>(0))
, mIDNUseWhitelist(false)
{
MOZ_ASSERT(NS_IsMainThread());

Просмотреть файл

@ -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,

Просмотреть файл

@ -257,7 +257,8 @@ nsFileUploadContentStream::OnCopyComplete()
//-----------------------------------------------------------------------------
nsFileChannel::nsFileChannel(nsIURI *uri)
: mFileURI(uri)
: mUploadLength(0)
, mFileURI(uri)
{
}

Просмотреть файл

@ -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

Просмотреть файл

@ -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));
}

Просмотреть файл

@ -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;

Просмотреть файл

@ -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)

Просмотреть файл

@ -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.

Просмотреть файл

@ -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));

Просмотреть файл

@ -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");

Просмотреть файл

@ -419,6 +419,9 @@ nsCORSListenerProxy::nsCORSListenerProxy(nsIStreamListener* aOuter,
mWithCredentials(aWithCredentials && !gDisableCORSPrivateData),
mRequestApproved(false),
mHasBeenCrossSite(false),
#ifdef DEBUG
mInited(false),
#endif
mMutex("nsCORSListenerProxy")
{
}

Просмотреть файл

@ -43,6 +43,8 @@ public:
const char16_t *user,
const char16_t *password)
: mUser(nullptr)
, mPass{ nullptr }
, mDomain{ nullptr }
{
DebugOnly<nsresult> 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<nsresult> rv = Set(path, realm, creds, challenge, ident, metadata);
MOZ_ASSERT(NS_SUCCEEDED(rv));

Просмотреть файл

@ -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

Просмотреть файл

@ -19,7 +19,7 @@ public:
NS_DECL_ISUPPORTS
NS_DECL_NSIHTTPAUTHMANAGER
nsHttpAuthManager() = default;
nsHttpAuthManager();
MOZ_MUST_USE nsresult Init();
protected:

Просмотреть файл

@ -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)

Просмотреть файл

@ -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)

Просмотреть файл

@ -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!

Просмотреть файл

@ -226,6 +226,7 @@ nsHttpHandler::nsHttpHandler()
, mTailDelayQuantum(600)
, mTailDelayQuantumAfterDCL(100)
, mTailDelayMax(6000)
, mTailTotalMax(0)
, mRedirectionLimit(10)
, mPhishyUserPassLength(1)
, mQoSBits(0x00)

Просмотреть файл

@ -15,7 +15,7 @@ public:
NS_DECL_ISUPPORTS
NS_DECL_NSIHTTPAUTHENTICATOR
nsHttpNTLMAuth() = default;
nsHttpNTLMAuth() : mUseNative(false) {}
private:
virtual ~nsHttpNTLMAuth() = default;

Просмотреть файл

@ -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

Просмотреть файл

@ -46,7 +46,8 @@ public:
// nsViewSourceChannel methods:
nsViewSourceChannel()
: mIsDocument(false)
, mOpened(false) {}
, mOpened(false)
, mIsSrcdocChannel(false) {}
MOZ_MUST_USE nsresult Init(nsIURI* uri);

Просмотреть файл

@ -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),

Просмотреть файл

@ -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;

Просмотреть файл

@ -25,6 +25,11 @@ NS_IMPL_ISUPPORTS(nsDirIndexParser,
nsIStreamListener,
nsIDirIndexParser)
nsDirIndexParser::nsDirIndexParser()
: mLineStart(0)
, mHasDescription(false) {
}
nsresult
nsDirIndexParser::Init() {
mLineStart = 0;

Просмотреть файл

@ -26,7 +26,7 @@ public:
NS_DECL_NSIREQUESTOBSERVER
NS_DECL_NSIDIRINDEXPARSER
nsDirIndexParser() = default;
nsDirIndexParser();
nsresult Init();
enum fieldType {

Просмотреть файл

@ -46,6 +46,8 @@ nsHTTPCompressConv::nsHTTPCompressConv()
, mCheckHeaderDone(false)
, mStreamEnded(false)
, mStreamInitialized(false)
, mDummyStreamInitialised(false)
, d_stream{}
, mLen(0)
, hMode(0)
, mSkipCount(0)

Просмотреть файл

@ -61,6 +61,9 @@ public:
: mTotalOut(0)
, mStatus(NS_OK)
, mBrotliStateIsStreamEnd(false)
, mRequest(nullptr)
, mContext(nullptr)
, mSourceOffset(0)
{
BrotliDecoderStateInit(&mState, 0, 0, 0);
}

Просмотреть файл

@ -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;

Просмотреть файл

@ -27,7 +27,7 @@ public:
NS_DECL_NSISTREAMLISTENER
NS_DECL_NSIDIRINDEXLISTENER
nsIndexedToHTML() = default;
nsIndexedToHTML();
nsresult Init(nsIStreamListener *aListener);

Просмотреть файл

@ -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

Просмотреть файл

@ -213,7 +213,8 @@ protected:
public:
explicit MulticastTimerCallback(WaitForCondition* waiter)
: mWaiter(waiter)
: mResult(NS_ERROR_NOT_INITIALIZED)
, mWaiter(waiter)
{ }
NS_DECL_THREADSAFE_ISUPPORTS