mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1048271 - Fix more bad implicit constructors in netwerk; r=mcmanus
This commit is contained in:
parent
a7206dd7d4
commit
9745a79694
@ -17,7 +17,7 @@ class nsStreamListenerWrapper MOZ_FINAL : public nsIStreamListener
|
||||
, public nsIThreadRetargetableStreamListener
|
||||
{
|
||||
public:
|
||||
nsStreamListenerWrapper(nsIStreamListener *listener)
|
||||
explicit nsStreamListenerWrapper(nsIStreamListener *listener)
|
||||
: mListener(listener)
|
||||
{
|
||||
NS_ASSERTION(mListener, "no stream listener specified");
|
||||
|
@ -803,7 +803,7 @@ Predictor::EnsureInitStorage()
|
||||
class PredictorThreadShutdownRunner : public nsRunnable
|
||||
{
|
||||
public:
|
||||
PredictorThreadShutdownRunner(nsIThread *ioThread)
|
||||
explicit PredictorThreadShutdownRunner(nsIThread *ioThread)
|
||||
:mIOThread(ioThread)
|
||||
{ }
|
||||
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
* @param aCopier
|
||||
* The nsAsyncStreamCopier requesting the information.
|
||||
*/
|
||||
AsyncApplyBufferingPolicyEvent(nsAsyncStreamCopier* aCopier)
|
||||
explicit AsyncApplyBufferingPolicyEvent(nsAsyncStreamCopier* aCopier)
|
||||
: mCopier(aCopier)
|
||||
, mTarget(NS_GetCurrentThread())
|
||||
{ }
|
||||
|
@ -27,7 +27,7 @@ CopyProperties(const nsAString &key, nsIVariant *data, void *closure)
|
||||
// This class is used to suspend a request across a function scope.
|
||||
class ScopedRequestSuspender {
|
||||
public:
|
||||
ScopedRequestSuspender(nsIRequest *request)
|
||||
explicit ScopedRequestSuspender(nsIRequest *request)
|
||||
: mRequest(request) {
|
||||
if (mRequest && NS_FAILED(mRequest->Suspend())) {
|
||||
NS_WARNING("Couldn't suspend pump");
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
NS_DECL_NSIINPUTSTREAM
|
||||
NS_DECL_NSIASYNCINPUTSTREAM
|
||||
|
||||
nsBaseContentStream(bool nonBlocking)
|
||||
explicit nsBaseContentStream(bool nonBlocking)
|
||||
: mStatus(NS_OK)
|
||||
, mNonBlocking(nonBlocking) {
|
||||
}
|
||||
|
@ -497,7 +497,7 @@ nsIOService::GetProtocolFlags(const char* scheme, uint32_t *flags)
|
||||
class AutoIncrement
|
||||
{
|
||||
public:
|
||||
AutoIncrement(uint32_t *var) : mVar(var)
|
||||
explicit AutoIncrement(uint32_t *var) : mVar(var)
|
||||
{
|
||||
++*var;
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ static PRLogModuleInfo* gLoadGroupLog = nullptr;
|
||||
class RequestMapEntry : public PLDHashEntryHdr
|
||||
{
|
||||
public:
|
||||
RequestMapEntry(nsIRequest *aRequest) :
|
||||
explicit RequestMapEntry(nsIRequest *aRequest) :
|
||||
mKey(aRequest)
|
||||
{
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// nsLoadGroup methods:
|
||||
|
||||
nsLoadGroup(nsISupports* outer);
|
||||
explicit nsLoadGroup(nsISupports* outer);
|
||||
|
||||
nsresult Init();
|
||||
|
||||
|
@ -33,10 +33,10 @@ class nsMediaFragmentURIParser
|
||||
{
|
||||
public:
|
||||
// Create a parser with the provided URI.
|
||||
nsMediaFragmentURIParser(nsIURI* aURI);
|
||||
explicit nsMediaFragmentURIParser(nsIURI* aURI);
|
||||
|
||||
// Create a parser with the provided URI reference portion.
|
||||
nsMediaFragmentURIParser(nsCString& aRef);
|
||||
explicit nsMediaFragmentURIParser(nsCString& aRef);
|
||||
|
||||
// True if a valid temporal media fragment indicated a start time.
|
||||
bool HasStartTime() const { return !mStart.empty(); }
|
||||
|
@ -97,7 +97,7 @@ private:
|
||||
class ShutdownThread MOZ_FINAL : public nsRunnable
|
||||
{
|
||||
public:
|
||||
ShutdownThread(nsIThread *thread)
|
||||
explicit ShutdownThread(nsIThread *thread)
|
||||
: mThread(thread)
|
||||
{
|
||||
}
|
||||
@ -122,7 +122,7 @@ private:
|
||||
class PACLoadComplete MOZ_FINAL : public nsRunnable
|
||||
{
|
||||
public:
|
||||
PACLoadComplete(nsPACMan *aPACMan)
|
||||
explicit PACLoadComplete(nsPACMan *aPACMan)
|
||||
: mPACMan(aPACMan)
|
||||
{
|
||||
}
|
||||
@ -149,7 +149,7 @@ class ExecutePACThreadAction MOZ_FINAL : public nsRunnable
|
||||
{
|
||||
public:
|
||||
// by default we just process the queue
|
||||
ExecutePACThreadAction(nsPACMan *aPACMan)
|
||||
explicit ExecutePACThreadAction(nsPACMan *aPACMan)
|
||||
: mPACMan(aPACMan)
|
||||
, mCancel(false)
|
||||
, mSetupPAC(false)
|
||||
|
@ -41,7 +41,7 @@ protected:
|
||||
class nsARequestObserverEvent : public nsRunnable
|
||||
{
|
||||
public:
|
||||
nsARequestObserverEvent(nsIRequest *);
|
||||
explicit nsARequestObserverEvent(nsIRequest *);
|
||||
|
||||
protected:
|
||||
virtual ~nsARequestObserverEvent() {}
|
||||
|
@ -410,7 +410,7 @@ class ServerSocketListenerProxy MOZ_FINAL : public nsIServerSocketListener
|
||||
~ServerSocketListenerProxy() {}
|
||||
|
||||
public:
|
||||
ServerSocketListenerProxy(nsIServerSocketListener* aListener)
|
||||
explicit ServerSocketListenerProxy(nsIServerSocketListener* aListener)
|
||||
: mListener(new nsMainThreadPtrHolder<nsIServerSocketListener>(aListener))
|
||||
, mTargetThread(do_GetCurrentThread())
|
||||
{ }
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
|
||||
// Constructor that should generally be used when constructing an object of
|
||||
// this class with |operator new|.
|
||||
nsSimpleNestedURI(nsIURI* innerURI);
|
||||
explicit nsSimpleNestedURI(nsIURI* innerURI);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSINESTEDURI
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
|
||||
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
|
||||
|
||||
nsStandardURL(bool aSupportsFileURL = false);
|
||||
explicit nsStandardURL(bool aSupportsFileURL = false);
|
||||
|
||||
static void InitGlobalObjects();
|
||||
static void ShutdownGlobalObjects();
|
||||
@ -111,7 +111,7 @@ public: /* internal -- HPUX compiler can't handle this being private */
|
||||
class nsSegmentEncoder
|
||||
{
|
||||
public:
|
||||
nsSegmentEncoder(const char *charset);
|
||||
explicit nsSegmentEncoder(const char *charset);
|
||||
|
||||
// Encode the given segment if necessary, and return the length of
|
||||
// the encoded segment. The encoded segment is appended to |buf|
|
||||
|
@ -20,7 +20,7 @@ public:
|
||||
friend class nsTemporaryFileInputStream;
|
||||
public:
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(FileDescOwner)
|
||||
FileDescOwner(PRFileDesc* aFD)
|
||||
explicit FileDescOwner(PRFileDesc* aFD)
|
||||
: mFD(aFD),
|
||||
mMutex("FileDescOwner::mMutex")
|
||||
{
|
||||
|
@ -685,7 +685,7 @@ class SocketListenerProxy MOZ_FINAL : public nsIUDPSocketListener
|
||||
~SocketListenerProxy() {}
|
||||
|
||||
public:
|
||||
SocketListenerProxy(nsIUDPSocketListener* aListener)
|
||||
explicit SocketListenerProxy(nsIUDPSocketListener* aListener)
|
||||
: mListener(new nsMainThreadPtrHolder<nsIUDPSocketListener>(aListener))
|
||||
, mTargetThread(do_GetCurrentThread())
|
||||
{ }
|
||||
|
2
netwerk/cache/nsCacheEntry.h
vendored
2
netwerk/cache/nsCacheEntry.h
vendored
@ -238,7 +238,7 @@ public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSICACHEENTRYINFO
|
||||
|
||||
nsCacheEntryInfo(nsCacheEntry* entry)
|
||||
explicit nsCacheEntryInfo(nsCacheEntry* entry)
|
||||
: mCacheEntry(entry)
|
||||
{
|
||||
}
|
||||
|
6
netwerk/cache/nsCacheService.cpp
vendored
6
netwerk/cache/nsCacheService.cpp
vendored
@ -227,7 +227,7 @@ NS_IMPL_ISUPPORTS(nsSetDiskSmartSizeCallback, nsITimerCallback)
|
||||
class nsSetSmartSizeEvent: public nsRunnable
|
||||
{
|
||||
public:
|
||||
nsSetSmartSizeEvent(int32_t smartSize)
|
||||
explicit nsSetSmartSizeEvent(int32_t smartSize)
|
||||
: mSmartSize(smartSize) {}
|
||||
|
||||
NS_IMETHOD Run()
|
||||
@ -974,7 +974,7 @@ nsCacheProfilePrefObserver::CacheCompressionLevel()
|
||||
|
||||
class nsProcessRequestEvent : public nsRunnable {
|
||||
public:
|
||||
nsProcessRequestEvent(nsCacheRequest *aRequest)
|
||||
explicit nsProcessRequestEvent(nsCacheRequest *aRequest)
|
||||
{
|
||||
MOZ_EVENT_TRACER_NAME_OBJECT(aRequest, aRequest->mKey.get());
|
||||
MOZ_EVENT_TRACER_WAIT(aRequest, "net::cache::ProcessRequest");
|
||||
@ -1347,7 +1347,7 @@ namespace {
|
||||
class EvictionNotifierRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
EvictionNotifierRunnable(nsISupports* aSubject)
|
||||
explicit EvictionNotifierRunnable(nsISupports* aSubject)
|
||||
: mSubject(aSubject)
|
||||
{ }
|
||||
|
||||
|
2
netwerk/cache/nsCacheService.h
vendored
2
netwerk/cache/nsCacheService.h
vendored
@ -393,7 +393,7 @@ private:
|
||||
// execution scope.
|
||||
class nsCacheServiceAutoLock {
|
||||
public:
|
||||
nsCacheServiceAutoLock(mozilla::Telemetry::ID mainThreadLockerID) {
|
||||
explicit nsCacheServiceAutoLock(mozilla::Telemetry::ID mainThreadLockerID) {
|
||||
nsCacheService::Lock(mainThreadLockerID);
|
||||
}
|
||||
~nsCacheServiceAutoLock() {
|
||||
|
2
netwerk/cache/nsCacheUtils.cpp
vendored
2
netwerk/cache/nsCacheUtils.cpp
vendored
@ -12,7 +12,7 @@ using namespace mozilla;
|
||||
|
||||
class nsDestroyThreadEvent : public nsRunnable {
|
||||
public:
|
||||
nsDestroyThreadEvent(nsIThread *thread)
|
||||
explicit nsDestroyThreadEvent(nsIThread *thread)
|
||||
: mThread(thread)
|
||||
{}
|
||||
NS_IMETHOD Run()
|
||||
|
2
netwerk/cache/nsCacheUtils.h
vendored
2
netwerk/cache/nsCacheUtils.h
vendored
@ -19,7 +19,7 @@ class nsIThread;
|
||||
*/
|
||||
class nsShutdownThread : public nsRunnable {
|
||||
public:
|
||||
nsShutdownThread(nsIThread *aThread);
|
||||
explicit nsShutdownThread(nsIThread *aThread);
|
||||
~nsShutdownThread();
|
||||
|
||||
NS_IMETHOD Run();
|
||||
|
4
netwerk/cache/nsDiskCacheDevice.cpp
vendored
4
netwerk/cache/nsDiskCacheDevice.cpp
vendored
@ -84,7 +84,7 @@ private:
|
||||
|
||||
class nsEvictDiskCacheEntriesEvent : public nsRunnable {
|
||||
public:
|
||||
nsEvictDiskCacheEntriesEvent(nsDiskCacheDevice *device)
|
||||
explicit nsEvictDiskCacheEntriesEvent(nsDiskCacheDevice *device)
|
||||
: mDevice(device) {}
|
||||
|
||||
NS_IMETHOD Run()
|
||||
@ -182,7 +182,7 @@ public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSICACHEDEVICEINFO
|
||||
|
||||
nsDiskCacheDeviceInfo(nsDiskCacheDevice* device)
|
||||
explicit nsDiskCacheDeviceInfo(nsDiskCacheDevice* device)
|
||||
: mDevice(device)
|
||||
{
|
||||
}
|
||||
|
6
netwerk/cache/nsDiskCacheDeviceSQL.cpp
vendored
6
netwerk/cache/nsDiskCacheDeviceSQL.cpp
vendored
@ -91,7 +91,7 @@ DecomposeCacheEntryKey(const nsCString *fullKey,
|
||||
class AutoResetStatement
|
||||
{
|
||||
public:
|
||||
AutoResetStatement(mozIStorageStatement *s)
|
||||
explicit AutoResetStatement(mozIStorageStatement *s)
|
||||
: mStatement(s) {}
|
||||
~AutoResetStatement() { mStatement->Reset(); }
|
||||
mozIStorageStatement *operator->() { return mStatement; }
|
||||
@ -275,7 +275,7 @@ public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSICACHEDEVICEINFO
|
||||
|
||||
nsOfflineCacheDeviceInfo(nsOfflineCacheDevice* device)
|
||||
explicit nsOfflineCacheDeviceInfo(nsOfflineCacheDevice* device)
|
||||
: mDevice(device)
|
||||
{}
|
||||
|
||||
@ -861,7 +861,7 @@ nsApplicationCache::GetUsage(uint32_t *usage)
|
||||
|
||||
class nsCloseDBEvent : public nsRunnable {
|
||||
public:
|
||||
nsCloseDBEvent(mozIStorageConnection *aDB)
|
||||
explicit nsCloseDBEvent(mozIStorageConnection *aDB)
|
||||
{
|
||||
mDB = aDB;
|
||||
}
|
||||
|
2
netwerk/cache/nsDiskCacheDeviceSQL.h
vendored
2
netwerk/cache/nsDiskCacheDeviceSQL.h
vendored
@ -47,7 +47,7 @@ public:
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_MOZISTORAGEFUNCTION
|
||||
|
||||
nsOfflineCacheEvictionFunction(nsOfflineCacheDevice *device)
|
||||
explicit nsOfflineCacheEvictionFunction(nsOfflineCacheDevice *device)
|
||||
: mDevice(device)
|
||||
{}
|
||||
|
||||
|
2
netwerk/cache/nsDiskCacheStreams.h
vendored
2
netwerk/cache/nsDiskCacheStreams.h
vendored
@ -23,7 +23,7 @@ class nsDiskCacheDevice;
|
||||
|
||||
class nsDiskCacheStreamIO : public nsIOutputStream {
|
||||
public:
|
||||
nsDiskCacheStreamIO(nsDiskCacheBinding * binding);
|
||||
explicit nsDiskCacheStreamIO(nsDiskCacheBinding * binding);
|
||||
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSIOUTPUTSTREAM
|
||||
|
2
netwerk/cache/nsMemoryCacheDevice.h
vendored
2
netwerk/cache/nsMemoryCacheDevice.h
vendored
@ -110,7 +110,7 @@ public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSICACHEDEVICEINFO
|
||||
|
||||
nsMemoryCacheDeviceInfo(nsMemoryCacheDevice* device)
|
||||
explicit nsMemoryCacheDeviceInfo(nsMemoryCacheDevice* device)
|
||||
: mDevice(device)
|
||||
{
|
||||
}
|
||||
|
@ -354,7 +354,7 @@ private:
|
||||
class CacheEntryHandle : public nsICacheEntry
|
||||
{
|
||||
public:
|
||||
CacheEntryHandle(CacheEntry* aEntry);
|
||||
explicit CacheEntryHandle(CacheEntry* aEntry);
|
||||
CacheEntry* Entry() const { return mEntry; }
|
||||
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
@ -376,7 +376,7 @@ private:
|
||||
virtual ~CacheOutputCloseListener();
|
||||
|
||||
NS_DECL_NSIRUNNABLE
|
||||
CacheOutputCloseListener(CacheEntry* aEntry);
|
||||
explicit CacheOutputCloseListener(CacheEntry* aEntry);
|
||||
|
||||
private:
|
||||
nsRefPtr<CacheEntry> mEntry;
|
||||
|
@ -110,7 +110,7 @@ class DoomFileHelper : public CacheFileIOListener
|
||||
public:
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
||||
DoomFileHelper(CacheFileListener *aListener)
|
||||
explicit DoomFileHelper(CacheFileListener *aListener)
|
||||
: mListener(aListener)
|
||||
{
|
||||
MOZ_COUNT_CTOR(DoomFileHelper);
|
||||
@ -409,7 +409,7 @@ CacheFile::OnFileOpened(CacheFileHandle *aHandle, nsresult aResult)
|
||||
class AutoFailDoomListener
|
||||
{
|
||||
public:
|
||||
AutoFailDoomListener(CacheFileHandle *aHandle)
|
||||
explicit AutoFailDoomListener(CacheFileHandle *aHandle)
|
||||
: mHandle(aHandle)
|
||||
, mAlreadyDoomed(false)
|
||||
{}
|
||||
|
@ -219,7 +219,7 @@ private:
|
||||
|
||||
class CacheFileAutoLock {
|
||||
public:
|
||||
CacheFileAutoLock(CacheFile *aFile)
|
||||
explicit CacheFileAutoLock(CacheFile *aFile)
|
||||
: mFile(aFile)
|
||||
, mLocked(true)
|
||||
{
|
||||
|
@ -906,7 +906,7 @@ protected:
|
||||
|
||||
class ReleaseNSPRHandleEvent : public nsRunnable {
|
||||
public:
|
||||
ReleaseNSPRHandleEvent(CacheFileHandle *aHandle)
|
||||
explicit ReleaseNSPRHandleEvent(CacheFileHandle *aHandle)
|
||||
: mHandle(aHandle)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ReleaseNSPRHandleEvent);
|
||||
|
@ -112,7 +112,7 @@ public:
|
||||
typedef const SHA1Sum::Hash& KeyType;
|
||||
typedef const SHA1Sum::Hash* KeyTypePointer;
|
||||
|
||||
HandleHashKey(KeyTypePointer aKey)
|
||||
explicit HandleHashKey(KeyTypePointer aKey)
|
||||
{
|
||||
MOZ_COUNT_CTOR(HandleHashKey);
|
||||
mHash = (SHA1Sum::Hash*)new uint8_t[SHA1Sum::kHashSize];
|
||||
|
@ -27,7 +27,7 @@ class CacheFileInputStream : public nsIAsyncInputStream
|
||||
NS_DECL_NSISEEKABLESTREAM
|
||||
|
||||
public:
|
||||
CacheFileInputStream(CacheFile *aFile);
|
||||
explicit CacheFileInputStream(CacheFile *aFile);
|
||||
|
||||
NS_IMETHOD OnChunkRead(nsresult aResult, CacheFileChunk *aChunk);
|
||||
NS_IMETHOD OnChunkWritten(nsresult aResult, CacheFileChunk *aChunk);
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
static Hash16_t Hash16(const char* aData, uint32_t aSize,
|
||||
uint32_t aInitval=0);
|
||||
|
||||
CacheHash(uint32_t aInitval=0);
|
||||
explicit CacheHash(uint32_t aInitval=0);
|
||||
|
||||
void Update(const char *aData, uint32_t aLen);
|
||||
Hash32_t GetHash();
|
||||
|
@ -166,7 +166,7 @@ class FileOpenHelper : public CacheFileIOListener
|
||||
public:
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
||||
FileOpenHelper(CacheIndex* aIndex)
|
||||
explicit FileOpenHelper(CacheIndex* aIndex)
|
||||
: mIndex(aIndex)
|
||||
, mCanceled(false)
|
||||
{}
|
||||
@ -1822,7 +1822,7 @@ CacheIndex::RemoveIndexFromDisk()
|
||||
class WriteLogHelper
|
||||
{
|
||||
public:
|
||||
WriteLogHelper(PRFileDesc *aFD)
|
||||
explicit WriteLogHelper(PRFileDesc *aFD)
|
||||
: mStatus(NS_OK)
|
||||
, mFD(aFD)
|
||||
, mBufSize(kMaxBufSize)
|
||||
|
@ -87,7 +87,7 @@ public:
|
||||
typedef const SHA1Sum::Hash& KeyType;
|
||||
typedef const SHA1Sum::Hash* KeyTypePointer;
|
||||
|
||||
CacheIndexEntry(KeyTypePointer aKey)
|
||||
explicit CacheIndexEntry(KeyTypePointer aKey)
|
||||
{
|
||||
MOZ_COUNT_CTOR(CacheIndexEntry);
|
||||
mRec = new CacheIndexRecord();
|
||||
@ -970,7 +970,7 @@ private:
|
||||
}
|
||||
|
||||
private:
|
||||
DiskConsumptionObserver(nsWeakPtr const &aWeakObserver)
|
||||
explicit DiskConsumptionObserver(nsWeakPtr const &aWeakObserver)
|
||||
: mObserver(aWeakObserver) { }
|
||||
virtual ~DiskConsumptionObserver() { }
|
||||
|
||||
@ -998,7 +998,7 @@ private:
|
||||
|
||||
class CacheIndexAutoLock {
|
||||
public:
|
||||
CacheIndexAutoLock(CacheIndex *aIndex)
|
||||
explicit CacheIndexAutoLock(CacheIndex *aIndex)
|
||||
: mIndex(aIndex)
|
||||
, mLocked(true)
|
||||
{
|
||||
@ -1030,7 +1030,7 @@ private:
|
||||
|
||||
class CacheIndexAutoUnlock {
|
||||
public:
|
||||
CacheIndexAutoUnlock(CacheIndex *aIndex)
|
||||
explicit CacheIndexAutoUnlock(CacheIndex *aIndex)
|
||||
: mIndex(aIndex)
|
||||
, mLocked(false)
|
||||
{
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
ALL_ENTRIES
|
||||
};
|
||||
|
||||
CacheEntryTable(EType aType) : mType(aType) { }
|
||||
explicit CacheEntryTable(EType aType) : mType(aType) { }
|
||||
EType Type() const
|
||||
{
|
||||
return mType;
|
||||
|
@ -357,7 +357,7 @@ private:
|
||||
class OnCacheEntryInfoRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
OnCacheEntryInfoRunnable(WalkDiskCacheRunnable* aWalker)
|
||||
explicit OnCacheEntryInfoRunnable(WalkDiskCacheRunnable* aWalker)
|
||||
: mWalker(aWalker)
|
||||
{
|
||||
}
|
||||
@ -1498,7 +1498,7 @@ class CacheEntryDoomByKeyCallback : public CacheFileIOListener
|
||||
public:
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
||||
CacheEntryDoomByKeyCallback(nsICacheEntryDoomCallback* aCallback)
|
||||
explicit CacheEntryDoomByKeyCallback(nsICacheEntryDoomCallback* aCallback)
|
||||
: mCallback(aCallback) { }
|
||||
|
||||
private:
|
||||
@ -1688,7 +1688,7 @@ CacheStorageService::DoomStorageEntries(nsCSubstring const& aContextKey,
|
||||
class Callback : public nsRunnable
|
||||
{
|
||||
public:
|
||||
Callback(nsICacheEntryDoomCallback* aCallback) : mCallback(aCallback) { }
|
||||
explicit Callback(nsICacheEntryDoomCallback* aCallback) : mCallback(aCallback) { }
|
||||
NS_IMETHODIMP Run()
|
||||
{
|
||||
mCallback->OnCacheEntryDoomed(NS_OK);
|
||||
|
@ -59,7 +59,7 @@ protected:
|
||||
DONT_REPORT = 1 << 1
|
||||
};
|
||||
|
||||
CacheMemoryConsumer(uint32_t aFlags);
|
||||
explicit CacheMemoryConsumer(uint32_t aFlags);
|
||||
~CacheMemoryConsumer() { DoMemoryReport(0); }
|
||||
void DoMemoryReport(uint32_t aCurrentSize);
|
||||
};
|
||||
@ -306,7 +306,7 @@ private:
|
||||
MEMORY,
|
||||
} mType;
|
||||
|
||||
MemoryPool(EType aType);
|
||||
explicit MemoryPool(EType aType);
|
||||
~MemoryPool();
|
||||
|
||||
nsTArray<nsRefPtr<CacheEntry> > mFrecencyArray;
|
||||
|
@ -39,7 +39,7 @@ namespace { // anon
|
||||
class DoomCallbackSynchronizer : public nsRunnable
|
||||
{
|
||||
public:
|
||||
DoomCallbackSynchronizer(nsICacheEntryDoomCallback* cb) : mCB(cb)
|
||||
explicit DoomCallbackSynchronizer(nsICacheEntryDoomCallback* cb) : mCB(cb)
|
||||
{
|
||||
MOZ_COUNT_CTOR(DoomCallbackSynchronizer);
|
||||
}
|
||||
@ -92,7 +92,7 @@ class DoomCallbackWrapper : public nsICacheListener
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSICACHELISTENER
|
||||
|
||||
DoomCallbackWrapper(nsICacheEntryDoomCallback* cb) : mCB(cb)
|
||||
explicit DoomCallbackWrapper(nsICacheEntryDoomCallback* cb) : mCB(cb)
|
||||
{
|
||||
MOZ_COUNT_CTOR(DoomCallbackWrapper);
|
||||
}
|
||||
@ -498,7 +498,7 @@ class MetaDataVisitorWrapper : public nsICacheMetaDataVisitor
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSICACHEMETADATAVISITOR
|
||||
MetaDataVisitorWrapper(nsICacheEntryMetaDataVisitor* cb) : mCB(cb) {}
|
||||
explicit MetaDataVisitorWrapper(nsICacheEntryMetaDataVisitor* cb) : mCB(cb) {}
|
||||
nsCOMPtr<nsICacheEntryMetaDataVisitor> mCB;
|
||||
};
|
||||
|
||||
|
@ -45,8 +45,8 @@ public:
|
||||
NS_IMETHOD HasWriteAccess(bool aWriteOnly, bool *aWriteAccess);
|
||||
NS_IMETHOD VisitMetaData(nsICacheEntryMetaDataVisitor*);
|
||||
|
||||
_OldCacheEntryWrapper(nsICacheEntryDescriptor* desc);
|
||||
_OldCacheEntryWrapper(nsICacheEntryInfo* info);
|
||||
explicit _OldCacheEntryWrapper(nsICacheEntryDescriptor* desc);
|
||||
explicit _OldCacheEntryWrapper(nsICacheEntryInfo* info);
|
||||
|
||||
private:
|
||||
virtual ~_OldCacheEntryWrapper();
|
||||
@ -162,7 +162,7 @@ public:
|
||||
static nsresult Get(nsICacheStorageConsumptionObserver* aCallback);
|
||||
|
||||
private:
|
||||
_OldGetDiskConsumption(nsICacheStorageConsumptionObserver* aCallback);
|
||||
explicit _OldGetDiskConsumption(nsICacheStorageConsumptionObserver* aCallback);
|
||||
virtual ~_OldGetDiskConsumption() {}
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSICACHEVISITOR
|
||||
|
@ -357,7 +357,7 @@ LogSuccess(bool aSetCookie, nsIURI *aHostURI, const nsAFlatCString &aCookieStrin
|
||||
class DBListenerErrorHandler : public mozIStorageStatementCallback
|
||||
{
|
||||
protected:
|
||||
DBListenerErrorHandler(DBState* dbState) : mDBState(dbState) { }
|
||||
explicit DBListenerErrorHandler(DBState* dbState) : mDBState(dbState) { }
|
||||
nsRefPtr<DBState> mDBState;
|
||||
virtual const char *GetOpType() = 0;
|
||||
|
||||
@ -397,7 +397,7 @@ private:
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
InsertCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
|
||||
explicit InsertCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
|
||||
NS_IMETHOD HandleResult(mozIStorageResultSet*)
|
||||
{
|
||||
NS_NOTREACHED("Unexpected call to InsertCookieDBListener::HandleResult");
|
||||
@ -433,7 +433,7 @@ private:
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
UpdateCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
|
||||
explicit UpdateCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
|
||||
NS_IMETHOD HandleResult(mozIStorageResultSet*)
|
||||
{
|
||||
NS_NOTREACHED("Unexpected call to UpdateCookieDBListener::HandleResult");
|
||||
@ -461,7 +461,7 @@ private:
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
RemoveCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
|
||||
explicit RemoveCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
|
||||
NS_IMETHOD HandleResult(mozIStorageResultSet*)
|
||||
{
|
||||
NS_NOTREACHED("Unexpected call to RemoveCookieDBListener::HandleResult");
|
||||
@ -490,7 +490,7 @@ private:
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
ReadCookieDBListener(DBState* dbState)
|
||||
explicit ReadCookieDBListener(DBState* dbState)
|
||||
: DBListenerErrorHandler(dbState)
|
||||
, mCanceled(false)
|
||||
{
|
||||
@ -566,7 +566,7 @@ class CloseCookieDBListener MOZ_FINAL : public mozIStorageCompletionCallback
|
||||
~CloseCookieDBListener() {}
|
||||
|
||||
public:
|
||||
CloseCookieDBListener(DBState* dbState) : mDBState(dbState) { }
|
||||
explicit CloseCookieDBListener(DBState* dbState) : mDBState(dbState) { }
|
||||
nsRefPtr<DBState> mDBState;
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
@ -1484,7 +1484,7 @@ RebuildDBCallback(nsCookieEntry *aEntry,
|
||||
nsCookie* cookie = cookies[i];
|
||||
|
||||
if (!cookie->IsSession()) {
|
||||
bindCookieParameters(paramsArray, aEntry, cookie);
|
||||
bindCookieParameters(paramsArray, nsCookieKey(aEntry), cookie);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
, mInBrowserElement(inBrowser)
|
||||
{}
|
||||
|
||||
nsCookieKey(KeyTypePointer other)
|
||||
explicit nsCookieKey(KeyTypePointer other)
|
||||
: mBaseDomain(other->mBaseDomain)
|
||||
, mAppId(other->mAppId)
|
||||
, mInBrowserElement(other->mInBrowserElement)
|
||||
@ -122,7 +122,7 @@ class nsCookieEntry : public nsCookieKey
|
||||
typedef nsTArray< nsRefPtr<nsCookie> > ArrayType;
|
||||
typedef ArrayType::index_type IndexType;
|
||||
|
||||
nsCookieEntry(KeyTypePointer aKey)
|
||||
explicit nsCookieEntry(KeyTypePointer aKey)
|
||||
: nsCookieKey(aKey)
|
||||
{}
|
||||
|
||||
|
@ -57,7 +57,7 @@ public:
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSIDNSRECORD
|
||||
|
||||
nsDNSRecord(nsHostRecord *hostRecord)
|
||||
explicit nsDNSRecord(nsHostRecord *hostRecord)
|
||||
: mHostRecord(hostRecord)
|
||||
, mIter(nullptr)
|
||||
, mIterGenCnt(-1)
|
||||
@ -342,7 +342,7 @@ nsDNSAsyncRequest::Cancel(nsresult reason)
|
||||
class nsDNSSyncRequest : public nsResolveHostCallback
|
||||
{
|
||||
public:
|
||||
nsDNSSyncRequest(PRMonitor *mon)
|
||||
explicit nsDNSSyncRequest(PRMonitor *mon)
|
||||
: mDone(false)
|
||||
, mStatus(NS_OK)
|
||||
, mMonitor(mon) {}
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
typedef const char* KeyType;
|
||||
typedef const char* KeyTypePointer;
|
||||
|
||||
nsDomainEntry(KeyTypePointer aEntry)
|
||||
explicit nsDomainEntry(KeyTypePointer aEntry)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,7 @@ private:
|
||||
// of gencnt.
|
||||
nsTArray<nsCString> mBlacklistedItems;
|
||||
|
||||
nsHostRecord(const nsHostKey *key); /* use Create() instead */
|
||||
explicit nsHostRecord(const nsHostKey *key); /* use Create() instead */
|
||||
~nsHostRecord();
|
||||
};
|
||||
|
||||
@ -239,8 +239,8 @@ public:
|
||||
size_t SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const;
|
||||
|
||||
private:
|
||||
nsHostResolver(uint32_t maxCacheEntries = 50, uint32_t maxCacheLifetime = 60,
|
||||
uint32_t lifetimeGracePeriod = 0);
|
||||
explicit nsHostResolver(uint32_t maxCacheEntries = 50, uint32_t maxCacheLifetime = 60,
|
||||
uint32_t lifetimeGracePeriod = 0);
|
||||
~nsHostResolver();
|
||||
|
||||
nsresult Init();
|
||||
|
@ -18,7 +18,7 @@ namespace net {
|
||||
class RemoteOpenFileParent : public PRemoteOpenFileParent
|
||||
{
|
||||
public:
|
||||
RemoteOpenFileParent(nsIFileURL* aURI)
|
||||
explicit RemoteOpenFileParent(nsIFileURL* aURI)
|
||||
: mURI(aURI)
|
||||
{}
|
||||
|
||||
|
@ -14,7 +14,7 @@ class nsIInputStream;
|
||||
|
||||
class nsDataChannel : public nsBaseChannel {
|
||||
public:
|
||||
nsDataChannel(nsIURI *uri) {
|
||||
explicit nsDataChannel(nsIURI *uri) {
|
||||
SetURI(uri);
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ public:
|
||||
NS_DECL_NSIFILECHANNEL
|
||||
NS_DECL_NSIUPLOADCHANNEL
|
||||
|
||||
nsFileChannel(nsIURI *uri);
|
||||
explicit nsFileChannel(nsIURI *uri);
|
||||
|
||||
protected:
|
||||
~nsFileChannel();
|
||||
|
@ -544,7 +544,7 @@ FTPChannelChild::DoFailedAsyncOpen(const nsresult& statusCode)
|
||||
class FTPFlushedForDiversionEvent : public ChannelEvent
|
||||
{
|
||||
public:
|
||||
FTPFlushedForDiversionEvent(FTPChannelChild* aChild)
|
||||
explicit FTPFlushedForDiversionEvent(FTPChannelChild* aChild)
|
||||
: mChild(aChild)
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(aChild);
|
||||
@ -601,7 +601,7 @@ FTPChannelChild::RecvDivertMessages()
|
||||
class FTPDeleteSelfEvent : public ChannelEvent
|
||||
{
|
||||
public:
|
||||
FTPDeleteSelfEvent(FTPChannelChild* aChild)
|
||||
explicit FTPDeleteSelfEvent(FTPChannelChild* aChild)
|
||||
: mChild(aChild) {}
|
||||
void Run() { mChild->DoDeleteSelf(); }
|
||||
private:
|
||||
|
@ -136,7 +136,7 @@ class FTPEventSinkProxy MOZ_FINAL : public nsIFTPEventSink
|
||||
~FTPEventSinkProxy() {}
|
||||
|
||||
public:
|
||||
FTPEventSinkProxy(nsIFTPEventSink* aTarget)
|
||||
explicit FTPEventSinkProxy(nsIFTPEventSink* aTarget)
|
||||
: mTarget(aTarget)
|
||||
, mTargetThread(do_GetCurrentThread())
|
||||
{ }
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
NS_DECL_NSAHTTPSEGMENTREADER
|
||||
NS_DECL_NSAHTTPSEGMENTWRITER
|
||||
|
||||
Http2Session(nsISocketTransport *);
|
||||
explicit Http2Session(nsISocketTransport *);
|
||||
|
||||
bool AddStream(nsAHttpTransaction *, int32_t,
|
||||
bool, nsIInterfaceRequestor *);
|
||||
|
@ -728,7 +728,7 @@ HttpChannelChild::DoNotifyListenerCleanup()
|
||||
class DeleteSelfEvent : public ChannelEvent
|
||||
{
|
||||
public:
|
||||
DeleteSelfEvent(HttpChannelChild* child) : mChild(child) {}
|
||||
explicit DeleteSelfEvent(HttpChannelChild* child) : mChild(child) {}
|
||||
void Run() { mChild->DeleteSelf(); }
|
||||
private:
|
||||
HttpChannelChild* mChild;
|
||||
@ -852,7 +852,7 @@ HttpChannelChild::Redirect1Begin(const uint32_t& newChannelId,
|
||||
class Redirect3Event : public ChannelEvent
|
||||
{
|
||||
public:
|
||||
Redirect3Event(HttpChannelChild* child) : mChild(child) {}
|
||||
explicit Redirect3Event(HttpChannelChild* child) : mChild(child) {}
|
||||
void Run() { mChild->Redirect3Complete(); }
|
||||
private:
|
||||
HttpChannelChild* mChild;
|
||||
@ -872,7 +872,7 @@ HttpChannelChild::RecvRedirect3Complete()
|
||||
class HttpFlushedForDiversionEvent : public ChannelEvent
|
||||
{
|
||||
public:
|
||||
HttpFlushedForDiversionEvent(HttpChannelChild* aChild)
|
||||
explicit HttpFlushedForDiversionEvent(HttpChannelChild* aChild)
|
||||
: mChild(aChild)
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(aChild);
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
NS_DECL_NSIREQUESTOBSERVER
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
|
||||
HttpChannelParentListener(HttpChannelParent* aInitialChannel);
|
||||
explicit HttpChannelParentListener(HttpChannelParent* aInitialChannel);
|
||||
|
||||
// For channel diversion from child to parent.
|
||||
nsresult DivertTo(nsIStreamListener *aListener);
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
NS_DECL_NSAHTTPSEGMENTREADER
|
||||
NS_DECL_NSAHTTPSEGMENTWRITER
|
||||
|
||||
SpdySession3(nsISocketTransport *);
|
||||
explicit SpdySession3(nsISocketTransport *);
|
||||
|
||||
bool AddStream(nsAHttpTransaction *, int32_t,
|
||||
bool, nsIInterfaceRequestor *);
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
NS_DECL_NSAHTTPSEGMENTREADER
|
||||
NS_DECL_NSAHTTPSEGMENTWRITER
|
||||
|
||||
SpdySession31(nsISocketTransport *);
|
||||
explicit SpdySession31(nsISocketTransport *);
|
||||
|
||||
bool AddStream(nsAHttpTransaction *, int32_t,
|
||||
bool, nsIInterfaceRequestor *);
|
||||
|
@ -917,7 +917,7 @@ public:
|
||||
NS_DECL_NSITRANSPORT
|
||||
NS_DECL_NSISOCKETTRANSPORT
|
||||
|
||||
SocketTransportShim(nsISocketTransport *aWrapped)
|
||||
explicit SocketTransportShim(nsISocketTransport *aWrapped)
|
||||
: mWrapped(aWrapped)
|
||||
{};
|
||||
|
||||
@ -936,7 +936,7 @@ public:
|
||||
|
||||
friend class SpdyConnectTransaction;
|
||||
|
||||
OutputStreamShim(SpdyConnectTransaction *aTrans)
|
||||
explicit OutputStreamShim(SpdyConnectTransaction *aTrans)
|
||||
: mCallback(nullptr)
|
||||
, mStatus(NS_OK)
|
||||
{
|
||||
@ -960,7 +960,7 @@ public:
|
||||
|
||||
friend class SpdyConnectTransaction;
|
||||
|
||||
InputStreamShim(SpdyConnectTransaction *aTrans)
|
||||
explicit InputStreamShim(SpdyConnectTransaction *aTrans)
|
||||
: mCallback(nullptr)
|
||||
, mStatus(NS_OK)
|
||||
{
|
||||
|
@ -154,7 +154,7 @@ WillRedirect(const nsHttpResponseHead * response)
|
||||
class AutoRedirectVetoNotifier
|
||||
{
|
||||
public:
|
||||
AutoRedirectVetoNotifier(nsHttpChannel* channel) : mChannel(channel)
|
||||
explicit AutoRedirectVetoNotifier(nsHttpChannel* channel) : mChannel(channel)
|
||||
{
|
||||
if (mChannel->mHasAutoRedirectVetoNotifier) {
|
||||
MOZ_CRASH("Nested AutoRedirectVetoNotifier on the stack");
|
||||
|
@ -1743,7 +1743,7 @@ nsHttpTransaction::ReleaseBlockingTransaction()
|
||||
|
||||
class DeleteHttpTransaction : public nsRunnable {
|
||||
public:
|
||||
DeleteHttpTransaction(nsHttpTransaction *trans)
|
||||
explicit DeleteHttpTransaction(nsHttpTransaction *trans)
|
||||
: mTrans(trans)
|
||||
{}
|
||||
|
||||
|
@ -83,7 +83,7 @@ WebSocketChannelChild::ReleaseIPDLReference()
|
||||
class WrappedChannelEvent : public nsRunnable
|
||||
{
|
||||
public:
|
||||
WrappedChannelEvent(ChannelEvent *aChannelEvent)
|
||||
explicit WrappedChannelEvent(ChannelEvent *aChannelEvent)
|
||||
: mChannelEvent(aChannelEvent)
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(aChannelEvent);
|
||||
|
@ -21,7 +21,7 @@ class WebSocketChannelChild : public BaseWebSocketChannel,
|
||||
public PWebSocketChild
|
||||
{
|
||||
public:
|
||||
WebSocketChannelChild(bool aSecure);
|
||||
explicit WebSocketChannelChild(bool aSecure);
|
||||
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSITHREADRETARGETABLEREQUEST
|
||||
|
@ -31,7 +31,7 @@ typedef mozilla::net::LoadContextInfo LoadContextInfo;
|
||||
// Must release mChannel on the main thread
|
||||
class nsWyciwygAsyncEvent : public nsRunnable {
|
||||
public:
|
||||
nsWyciwygAsyncEvent(nsWyciwygChannel *aChannel) : mChannel(aChannel) {}
|
||||
explicit nsWyciwygAsyncEvent(nsWyciwygChannel *aChannel) : mChannel(aChannel) {}
|
||||
|
||||
~nsWyciwygAsyncEvent()
|
||||
{
|
||||
@ -49,7 +49,7 @@ protected:
|
||||
|
||||
class nsWyciwygSetCharsetandSourceEvent : public nsWyciwygAsyncEvent {
|
||||
public:
|
||||
nsWyciwygSetCharsetandSourceEvent(nsWyciwygChannel *aChannel)
|
||||
explicit nsWyciwygSetCharsetandSourceEvent(nsWyciwygChannel *aChannel)
|
||||
: nsWyciwygAsyncEvent(aChannel) {}
|
||||
|
||||
NS_IMETHOD Run()
|
||||
|
@ -114,7 +114,7 @@ public:
|
||||
virtual void NotifyDataChannel(already_AddRefed<DataChannel> channel) = 0;
|
||||
};
|
||||
|
||||
DataChannelConnection(DataConnectionListener *listener);
|
||||
explicit DataChannelConnection(DataConnectionListener *listener);
|
||||
|
||||
bool Init(unsigned short aPort, uint16_t aNumStreams, bool aUsingDtls);
|
||||
void Destroy(); // So we can spawn refs tied to runnables in shutdown
|
||||
|
@ -21,7 +21,7 @@ public:
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSISOCKETPROVIDER
|
||||
|
||||
nsSOCKSSocketProvider(uint32_t version) : mVersion(version) {}
|
||||
explicit nsSOCKSSocketProvider(uint32_t version) : mVersion(version) {}
|
||||
|
||||
static nsresult CreateV4(nsISupports *, REFNSIID aIID, void **aResult);
|
||||
static nsresult CreateV5(nsISupports *, REFNSIID aIID, void **aResult);
|
||||
|
@ -38,7 +38,7 @@ class nsWifiListener
|
||||
{
|
||||
public:
|
||||
|
||||
nsWifiListener(nsMainThreadPtrHolder<nsIWifiListener>* aListener)
|
||||
explicit nsWifiListener(nsMainThreadPtrHolder<nsIWifiListener>* aListener)
|
||||
{
|
||||
mListener = aListener;
|
||||
mHasSentData = false;
|
||||
|
Loading…
Reference in New Issue
Block a user