From c94b2e29452e20f0468983914b3b9ffca5013214 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Wed, 10 Dec 2014 17:49:42 -0500 Subject: [PATCH] Bug 1109697 - Fix more bad implicit constructors in netwerk; r=mcmanus --- netwerk/base/src/OfflineObserver.h | 2 +- netwerk/base/src/ProxyAutoConfig.cpp | 2 +- netwerk/protocol/http/AlternateServices.h | 2 +- netwerk/protocol/http/InterceptedChannel.h | 2 +- netwerk/protocol/websocket/WebSocketChannel.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/netwerk/base/src/OfflineObserver.h b/netwerk/base/src/OfflineObserver.h index 865bc0daa20c..bcddd6f65c0f 100644 --- a/netwerk/base/src/OfflineObserver.h +++ b/netwerk/base/src/OfflineObserver.h @@ -48,7 +48,7 @@ class OfflineObserver public: // A nsRefPtr to this object should be kept by the disconnectable parent. - OfflineObserver(DisconnectableParent * parent); + explicit OfflineObserver(DisconnectableParent * parent); // This method needs to be called in the destructor of the parent // It removes the observer from the nsObserverService list, and it clears // the pointer it holds to the disconnectable parent. diff --git a/netwerk/base/src/ProxyAutoConfig.cpp b/netwerk/base/src/ProxyAutoConfig.cpp index 5a5bc666d1bf..af17dd661e43 100644 --- a/netwerk/base/src/ProxyAutoConfig.cpp +++ b/netwerk/base/src/ProxyAutoConfig.cpp @@ -559,7 +559,7 @@ private: static const JSClass sGlobalClass; - JSRuntimeWrapper(JSRuntime* rt) + explicit JSRuntimeWrapper(JSRuntime* rt) : mRuntime(rt), mContext(nullptr), mGlobal(rt, nullptr), mOK(false) { MOZ_COUNT_CTOR(JSRuntimeWrapper); diff --git a/netwerk/protocol/http/AlternateServices.h b/netwerk/protocol/http/AlternateServices.h index e7603a64bc1f..5055a0b64e9e 100644 --- a/netwerk/protocol/http/AlternateServices.h +++ b/netwerk/protocol/http/AlternateServices.h @@ -101,7 +101,7 @@ public: NS_DECL_NSISPECULATIVECONNECTIONOVERRIDER NS_DECL_NSIINTERFACEREQUESTOR - AltSvcOverride(nsIInterfaceRequestor *aRequestor) + explicit AltSvcOverride(nsIInterfaceRequestor *aRequestor) : mCallbacks(aRequestor) {} private: diff --git a/netwerk/protocol/http/InterceptedChannel.h b/netwerk/protocol/http/InterceptedChannel.h index 1ba5c2edc772..695f5d5befa3 100644 --- a/netwerk/protocol/http/InterceptedChannel.h +++ b/netwerk/protocol/http/InterceptedChannel.h @@ -39,7 +39,7 @@ protected: virtual ~InterceptedChannelBase(); public: - InterceptedChannelBase(nsINetworkInterceptController* aController); + explicit InterceptedChannelBase(nsINetworkInterceptController* aController); // Notify the interception controller that the channel has been intercepted // and prepare the response body output stream. diff --git a/netwerk/protocol/websocket/WebSocketChannel.cpp b/netwerk/protocol/websocket/WebSocketChannel.cpp index 9034b0024b04..48432d6b4113 100644 --- a/netwerk/protocol/websocket/WebSocketChannel.cpp +++ b/netwerk/protocol/websocket/WebSocketChannel.cpp @@ -1969,7 +1969,7 @@ class RemoveObserverRunnable : public nsRunnable nsRefPtr mChannel; public: - RemoveObserverRunnable(WebSocketChannel* aChannel) + explicit RemoveObserverRunnable(WebSocketChannel* aChannel) : mChannel(aChannel) {}