mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1047782 - Fix some bad impliciit constructors in netwerk/; r=mcmanus
This commit is contained in:
parent
77dfc12d57
commit
7207465c1b
@ -57,7 +57,7 @@ class MessageChannel : HasResultCodes
|
||||
typedef IPC::Message Message;
|
||||
typedef mozilla::ipc::Transport Transport;
|
||||
|
||||
MessageChannel(MessageListener *aListener);
|
||||
explicit MessageChannel(MessageListener *aListener);
|
||||
~MessageChannel();
|
||||
|
||||
// "Open" from the perspective of the transport layer; the underlying
|
||||
@ -381,7 +381,7 @@ class MessageChannel : HasResultCodes
|
||||
class RefCountedTask
|
||||
{
|
||||
public:
|
||||
RefCountedTask(CancelableTask* aTask)
|
||||
explicit RefCountedTask(CancelableTask* aTask)
|
||||
: mTask(aTask)
|
||||
{ }
|
||||
private:
|
||||
@ -401,7 +401,7 @@ class MessageChannel : HasResultCodes
|
||||
class DequeueTask : public Task
|
||||
{
|
||||
public:
|
||||
DequeueTask(RefCountedTask* aTask)
|
||||
explicit DequeueTask(RefCountedTask* aTask)
|
||||
: mTask(aTask)
|
||||
{ }
|
||||
void Run() { mTask->Run(); }
|
||||
@ -441,7 +441,7 @@ class MessageChannel : HasResultCodes
|
||||
|
||||
class AutoEnterPendingReply {
|
||||
public:
|
||||
AutoEnterPendingReply(size_t &replyVar)
|
||||
explicit AutoEnterPendingReply(size_t &replyVar)
|
||||
: mReplyVar(replyVar)
|
||||
{
|
||||
mReplyVar++;
|
||||
@ -487,7 +487,7 @@ class MessageChannel : HasResultCodes
|
||||
class AutoEnterRPCTransaction
|
||||
{
|
||||
public:
|
||||
AutoEnterRPCTransaction(MessageChannel *aChan)
|
||||
explicit AutoEnterRPCTransaction(MessageChannel *aChan)
|
||||
: mChan(aChan),
|
||||
mOldTransaction(mChan->mCurrentRPCTransaction)
|
||||
{
|
||||
|
@ -92,7 +92,7 @@ private:
|
||||
class nsAsyncRedirectAutoCallback
|
||||
{
|
||||
public:
|
||||
nsAsyncRedirectAutoCallback(nsIAsyncVerifyRedirectCallback* aCallback)
|
||||
explicit nsAsyncRedirectAutoCallback(nsIAsyncVerifyRedirectCallback* aCallback)
|
||||
: mCallback(aCallback)
|
||||
{
|
||||
mResult = NS_OK;
|
||||
|
@ -19,7 +19,7 @@ public:
|
||||
typedef nsIURI* KeyType;
|
||||
typedef const nsIURI* KeyTypePointer;
|
||||
|
||||
nsURIHashKey(const nsIURI* aKey) :
|
||||
explicit nsURIHashKey(const nsIURI* aKey) :
|
||||
mKey(const_cast<nsIURI*>(aKey)) { MOZ_COUNT_CTOR(nsURIHashKey); }
|
||||
nsURIHashKey(const nsURIHashKey& toCopy) :
|
||||
mKey(toCopy.mKey) { MOZ_COUNT_CTOR(nsURIHashKey); }
|
||||
|
@ -141,7 +141,7 @@ public:
|
||||
void StartTimer(uint32_t aTimeout);
|
||||
void StopTimer();
|
||||
|
||||
ConnectionData(Dashboard *target)
|
||||
explicit ConnectionData(Dashboard *target)
|
||||
{
|
||||
mThread = nullptr;
|
||||
mDashboard = target;
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSICANCELABLE
|
||||
|
||||
TokenBucketCancelable(class ATokenBucketEvent *event);
|
||||
explicit TokenBucketCancelable(class ATokenBucketEvent *event);
|
||||
void Fire();
|
||||
|
||||
private:
|
||||
|
@ -151,7 +151,7 @@ nsNetMon_AcceptRead(PRFileDesc *listenSock,
|
||||
|
||||
class NotifyNetworkActivity : public nsRunnable {
|
||||
public:
|
||||
NotifyNetworkActivity(NetworkActivityMonitor::Direction aDirection)
|
||||
explicit NotifyNetworkActivity(NetworkActivityMonitor::Direction aDirection)
|
||||
: mDirection(aDirection)
|
||||
{}
|
||||
NS_IMETHOD Run()
|
||||
|
@ -19,7 +19,7 @@ public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSINETADDR
|
||||
|
||||
nsNetAddr(mozilla::net::NetAddr* addr);
|
||||
explicit nsNetAddr(mozilla::net::NetAddr* addr);
|
||||
|
||||
private:
|
||||
mozilla::net::NetAddr mAddr;
|
||||
|
@ -44,7 +44,7 @@ public:
|
||||
private:
|
||||
friend class nsProtocolProxyService;
|
||||
|
||||
nsProxyInfo(const char *type = nullptr)
|
||||
explicit nsProxyInfo(const char *type = nullptr)
|
||||
: mType(type)
|
||||
, mPort(-1)
|
||||
, mFlags(0)
|
||||
|
@ -1608,7 +1608,7 @@ nsSocketTransport::GetFD_Locked()
|
||||
class ThunkPRClose : public nsRunnable
|
||||
{
|
||||
public:
|
||||
ThunkPRClose(PRFileDesc *fd) : mFD(fd) {}
|
||||
explicit ThunkPRClose(PRFileDesc *fd) : mFD(fd) {}
|
||||
|
||||
NS_IMETHOD Run()
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
NS_DECL_NSIINPUTSTREAM
|
||||
NS_DECL_NSIASYNCINPUTSTREAM
|
||||
|
||||
nsSocketInputStream(nsSocketTransport *);
|
||||
explicit nsSocketInputStream(nsSocketTransport *);
|
||||
virtual ~nsSocketInputStream();
|
||||
|
||||
bool IsReferenced() { return mReaderRefCnt > 0; }
|
||||
@ -77,7 +77,7 @@ public:
|
||||
NS_DECL_NSIOUTPUTSTREAM
|
||||
NS_DECL_NSIASYNCOUTPUTSTREAM
|
||||
|
||||
nsSocketOutputStream(nsSocketTransport *);
|
||||
explicit nsSocketOutputStream(nsSocketTransport *);
|
||||
virtual ~nsSocketOutputStream();
|
||||
|
||||
bool IsReferenced() { return mWriterRefCnt > 0; }
|
||||
@ -181,8 +181,8 @@ private:
|
||||
public:
|
||||
typedef mozilla::MutexAutoLock MutexAutoLock;
|
||||
|
||||
PRFileDescAutoLock(nsSocketTransport *aSocketTransport,
|
||||
nsresult *aConditionWhileLocked = nullptr)
|
||||
explicit PRFileDescAutoLock(nsSocketTransport *aSocketTransport,
|
||||
nsresult *aConditionWhileLocked = nullptr)
|
||||
: mSocketTransport(aSocketTransport)
|
||||
, mFd(nullptr)
|
||||
{
|
||||
@ -223,7 +223,7 @@ private:
|
||||
class LockedPRFileDesc
|
||||
{
|
||||
public:
|
||||
LockedPRFileDesc(nsSocketTransport *aSocketTransport)
|
||||
explicit LockedPRFileDesc(nsSocketTransport *aSocketTransport)
|
||||
: mSocketTransport(aSocketTransport)
|
||||
, mFd(nullptr)
|
||||
{
|
||||
|
@ -118,7 +118,7 @@ union NetAddr {
|
||||
// which is converted to a mozilla::dns::NetAddr.
|
||||
class NetAddrElement : public LinkedListElement<NetAddrElement> {
|
||||
public:
|
||||
NetAddrElement(const PRNetAddr *prNetAddr);
|
||||
explicit NetAddrElement(const PRNetAddr *prNetAddr);
|
||||
NetAddrElement(const NetAddrElement& netAddr);
|
||||
~NetAddrElement();
|
||||
|
||||
|
@ -40,7 +40,7 @@ class ChannelEventQueue MOZ_FINAL
|
||||
NS_INLINE_DECL_REFCOUNTING(ChannelEventQueue)
|
||||
|
||||
public:
|
||||
ChannelEventQueue(nsISupports *owner)
|
||||
explicit ChannelEventQueue(nsISupports *owner)
|
||||
: mSuspendCount(0)
|
||||
, mSuspended(false)
|
||||
, mForced(false)
|
||||
@ -165,7 +165,7 @@ ChannelEventQueue::MaybeFlushQueue()
|
||||
class AutoEventEnqueuer
|
||||
{
|
||||
public:
|
||||
AutoEventEnqueuer(ChannelEventQueue *queue) : mEventQueue(queue) {
|
||||
explicit AutoEventEnqueuer(ChannelEventQueue *queue) : mEventQueue(queue) {
|
||||
mEventQueue->StartForcedQueueing();
|
||||
}
|
||||
~AutoEventEnqueuer() {
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
NS_IMETHOD Suspend();
|
||||
NS_IMETHOD Resume();
|
||||
|
||||
FTPChannelChild(nsIURI* uri);
|
||||
explicit FTPChannelChild(nsIURI* uri);
|
||||
|
||||
void AddIPDLReference();
|
||||
void ReleaseIPDLReference();
|
||||
|
@ -393,7 +393,7 @@ template <class T>
|
||||
class HttpAsyncAborter
|
||||
{
|
||||
public:
|
||||
HttpAsyncAborter(T *derived) : mThis(derived), mCallOnResume(0) {}
|
||||
explicit HttpAsyncAborter(T *derived) : mThis(derived), mCallOnResume(0) {}
|
||||
|
||||
// Aborts channel: calls OnStart/Stop with provided status, removes channel
|
||||
// from loadGroup.
|
||||
|
@ -244,7 +244,7 @@ private:
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
AppDataClearObserver(nsHttpAuthCache* aOwner) : mOwner(aOwner) {}
|
||||
explicit AppDataClearObserver(nsHttpAuthCache* aOwner) : mOwner(aOwner) {}
|
||||
nsHttpAuthCache* mOwner;
|
||||
};
|
||||
|
||||
|
@ -160,7 +160,7 @@ public: /* internal necko use only */
|
||||
class AutoCacheWaitFlags
|
||||
{
|
||||
public:
|
||||
AutoCacheWaitFlags(nsHttpChannel* channel)
|
||||
explicit AutoCacheWaitFlags(nsHttpChannel* channel)
|
||||
: mChannel(channel)
|
||||
, mKeep(0)
|
||||
{
|
||||
|
@ -274,7 +274,7 @@ private:
|
||||
class nsConnectionEntry
|
||||
{
|
||||
public:
|
||||
nsConnectionEntry(nsHttpConnectionInfo *ci);
|
||||
explicit nsConnectionEntry(nsHttpConnectionInfo *ci);
|
||||
~nsConnectionEntry();
|
||||
|
||||
nsRefPtr<nsHttpConnectionInfo> mConnInfo;
|
||||
@ -401,7 +401,7 @@ private:
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSAHTTPCONNECTION(mConn)
|
||||
|
||||
nsConnectionHandle(nsHttpConnection *conn) { NS_ADDREF(mConn = conn); }
|
||||
explicit nsConnectionHandle(nsHttpConnection *conn) { NS_ADDREF(mConn = conn); }
|
||||
|
||||
nsHttpConnection *mConn;
|
||||
};
|
||||
|
@ -267,7 +267,7 @@ SECITEM_AllocItem(SECItem & item, uint32_t len)
|
||||
class ScopedAutoSECItem MOZ_FINAL : public SECItem
|
||||
{
|
||||
public:
|
||||
ScopedAutoSECItem(uint32_t initialAllocatedLen = 0)
|
||||
explicit ScopedAutoSECItem(uint32_t initialAllocatedLen = 0)
|
||||
{
|
||||
data = nullptr;
|
||||
len = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user