diff --git a/docshell/shistory/src/nsSHEntryShared.cpp b/docshell/shistory/src/nsSHEntryShared.cpp index 1b27be5ea63..b2c173030b5 100644 --- a/docshell/shistory/src/nsSHEntryShared.cpp +++ b/docshell/shistory/src/nsSHEntryShared.cpp @@ -34,7 +34,7 @@ uint64_t gSHEntrySharedID = 0; typedef nsExpirationTracker HistoryTrackerBase; class HistoryTracker MOZ_FINAL : public HistoryTrackerBase { public: - HistoryTracker(uint32_t aTimeout) + explicit HistoryTracker(uint32_t aTimeout) : HistoryTrackerBase(1000 * aTimeout / 2) { } diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderingContext2D.cpp index 4165fac8986..cadaad5274b 100644 --- a/dom/canvas/CanvasRenderingContext2D.cpp +++ b/dom/canvas/CanvasRenderingContext2D.cpp @@ -695,7 +695,7 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(CanvasPattern, mContext) class CanvasDrawObserver { public: - CanvasDrawObserver(CanvasRenderingContext2D* aCanvasContext); + explicit CanvasDrawObserver(CanvasRenderingContext2D* aCanvasContext); // Only enumerate draw calls that could affect the heuristic enum DrawCallType { diff --git a/dom/canvas/WebGLBindableName.h b/dom/canvas/WebGLBindableName.h index 4a7f6c20831..d92616fb292 100644 --- a/dom/canvas/WebGLBindableName.h +++ b/dom/canvas/WebGLBindableName.h @@ -54,9 +54,9 @@ class WebGLBindableName { public: - WebGLBindableName(GLuint name) + explicit WebGLBindableName(GLuint aName) : WebGLBindable() - , mGLName(name) + , mGLName(aName) { } GLuint GLName() const { return mGLName; } diff --git a/dom/geolocation/nsGeolocationSettings.h b/dom/geolocation/nsGeolocationSettings.h index f9986d921e5..f7c69201591 100644 --- a/dom/geolocation/nsGeolocationSettings.h +++ b/dom/geolocation/nsGeolocationSettings.h @@ -57,7 +57,7 @@ enum GeolocationFuzzMethod { class GeolocationSetting MOZ_FINAL { public: - GeolocationSetting(const nsString& aOrigin) : + explicit GeolocationSetting(const nsString& aOrigin) : mFuzzMethod(GEO_ALA_TYPE_DEFAULT), #ifdef MOZ_APPROX_LOCATION mDistance(0), diff --git a/dom/html/nsBrowserElement.cpp b/dom/html/nsBrowserElement.cpp index 32918531093..1418bcb3dca 100644 --- a/dom/html/nsBrowserElement.cpp +++ b/dom/html/nsBrowserElement.cpp @@ -35,7 +35,7 @@ class nsBrowserElement::BrowserShownObserver : public nsIObserver , public nsSupportsWeakReference { public: - BrowserShownObserver(nsBrowserElement* aBrowserElement); + explicit BrowserShownObserver(nsBrowserElement* aBrowserElement); NS_DECL_ISUPPORTS NS_DECL_NSIOBSERVER void AddObserver(); diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 9212567042d..8bee1836ccf 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -758,7 +758,7 @@ class TabChild::DelayedDeleteRunnable MOZ_FINAL nsRefPtr mTabChild; public: - DelayedDeleteRunnable(TabChild* aTabChild) + explicit DelayedDeleteRunnable(TabChild* aTabChild) : mTabChild(aTabChild) { MOZ_ASSERT(NS_IsMainThread()); diff --git a/dom/media/MediaDevices.h b/dom/media/MediaDevices.h index af18c8639e9..cbacbd086ca 100644 --- a/dom/media/MediaDevices.h +++ b/dom/media/MediaDevices.h @@ -24,7 +24,8 @@ struct MediaStreamConstraints; class MediaDevices MOZ_FINAL : public DOMEventTargetHelper { public: - MediaDevices(nsPIDOMWindow* aWindow) : DOMEventTargetHelper(aWindow) {} + explicit MediaDevices(nsPIDOMWindow* aWindow) : + DOMEventTargetHelper(aWindow) {} NS_DECL_ISUPPORTS_INHERITED NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOM_MEDIADEVICES_IMPLEMENTATION_IID) diff --git a/dom/media/MediaPromise.h b/dom/media/MediaPromise.h index cbff154d622..8578c97190a 100644 --- a/dom/media/MediaPromise.h +++ b/dom/media/MediaPromise.h @@ -57,7 +57,7 @@ public: typedef RejectValueT RejectValueType; NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MediaPromise) - MediaPromise(const char* aCreationSite) + explicit MediaPromise(const char* aCreationSite) : mCreationSite(aCreationSite) , mMutex("MediaPromise Mutex") { @@ -138,7 +138,7 @@ protected: RejectValueType mRejectValue; }; - ThenValueBase(const char* aCallSite) : mCallSite(aCallSite) + explicit ThenValueBase(const char* aCallSite) : mCallSite(aCallSite) { MOZ_COUNT_CTOR(ThenValueBase); } diff --git a/dom/media/MediaStreamError.h b/dom/media/MediaStreamError.h index f8a6e5ac02c..13e675cb930 100644 --- a/dom/media/MediaStreamError.h +++ b/dom/media/MediaStreamError.h @@ -44,9 +44,9 @@ class MediaMgrError MOZ_FINAL : public nsISupports, public BaseMediaMgrError { public: - MediaMgrError(const nsAString& aName, - const nsAString& aMessage = EmptyString(), - const nsAString& aConstraintName = EmptyString()) + explicit MediaMgrError(const nsAString& aName, + const nsAString& aMessage = EmptyString(), + const nsAString& aConstraintName = EmptyString()) : BaseMediaMgrError(aName, aMessage, aConstraintName) {} NS_DECL_THREADSAFE_ISUPPORTS diff --git a/dom/media/MediaStreamGraph.h b/dom/media/MediaStreamGraph.h index 7c8131614ee..cf120e6578e 100644 --- a/dom/media/MediaStreamGraph.h +++ b/dom/media/MediaStreamGraph.h @@ -1211,7 +1211,7 @@ public: TrackRate GraphRate() const { return mSampleRate; } protected: - MediaStreamGraph(TrackRate aSampleRate) + explicit MediaStreamGraph(TrackRate aSampleRate) : mNextGraphUpdateIndex(1) , mSampleRate(aSampleRate) { diff --git a/dom/media/MediaTaskQueue.h b/dom/media/MediaTaskQueue.h index ce3827b52cf..439f7b97d74 100644 --- a/dom/media/MediaTaskQueue.h +++ b/dom/media/MediaTaskQueue.h @@ -92,7 +92,8 @@ private: RefPtr mRunnable; bool mForceDispatch; - TaskQueueEntry(TemporaryRef aRunnable, bool aForceDispatch = false) + explicit TaskQueueEntry(TemporaryRef aRunnable, + bool aForceDispatch = false) : mRunnable(aRunnable), mForceDispatch(aForceDispatch) {} }; diff --git a/dom/media/fmp4/SharedDecoderManager.cpp b/dom/media/fmp4/SharedDecoderManager.cpp index 344f3dfefa0..d59c95450d0 100644 --- a/dom/media/fmp4/SharedDecoderManager.cpp +++ b/dom/media/fmp4/SharedDecoderManager.cpp @@ -12,7 +12,7 @@ namespace mozilla { class SharedDecoderCallback : public MediaDataDecoderCallback { public: - SharedDecoderCallback(SharedDecoderManager* aManager) : mManager(aManager) {} + explicit SharedDecoderCallback(SharedDecoderManager* aManager) : mManager(aManager) {} virtual void Output(MediaData* aData) MOZ_OVERRIDE { diff --git a/dom/media/gmp-plugin/gmp-test-decryptor.cpp b/dom/media/gmp-plugin/gmp-test-decryptor.cpp index 60c99f5aae9..dd2e7d06c06 100644 --- a/dom/media/gmp-plugin/gmp-test-decryptor.cpp +++ b/dom/media/gmp-plugin/gmp-test-decryptor.cpp @@ -150,9 +150,9 @@ public: class SendMessageTask : public GMPTask { public: - SendMessageTask(const string& aMessage, - TestManager* aTestManager = nullptr, - const string& aTestID = "") + explicit SendMessageTask(const string& aMessage, + TestManager* aTestManager = nullptr, + const string& aTestID = "") : mMessage(aMessage), mTestmanager(aTestManager), mTestID(aTestID) {} void Run() MOZ_OVERRIDE { diff --git a/dom/media/gmp-plugin/gmp-test-decryptor.h b/dom/media/gmp-plugin/gmp-test-decryptor.h index fe9000c611e..efea3f3e8ac 100644 --- a/dom/media/gmp-plugin/gmp-test-decryptor.h +++ b/dom/media/gmp-plugin/gmp-test-decryptor.h @@ -14,7 +14,7 @@ class FakeDecryptor : public GMPDecryptor { public: - FakeDecryptor(GMPDecryptorHost* aHost); + explicit FakeDecryptor(GMPDecryptorHost* aHost); virtual void Init(GMPDecryptorCallback* aCallback) MOZ_OVERRIDE { mCallback = aCallback; diff --git a/dom/media/gmp/GMPChild.cpp b/dom/media/gmp/GMPChild.cpp index ef652d3c207..aa8057c4ef9 100644 --- a/dom/media/gmp/GMPChild.cpp +++ b/dom/media/gmp/GMPChild.cpp @@ -361,7 +361,7 @@ GMPChild::PreLoadLibraries(const std::string& aPluginPath) #if defined(XP_MACOSX) class MacOSXSandboxStarter : public SandboxStarter { public: - MacOSXSandboxStarter(GMPChild* aGMPChild) + explicit MacOSXSandboxStarter(GMPChild* aGMPChild) : mGMPChild(aGMPChild) {} virtual void Start(const char* aLibPath) MOZ_OVERRIDE { diff --git a/dom/media/gmp/GMPStorageChild.cpp b/dom/media/gmp/GMPStorageChild.cpp index e23de602ba8..30d16f27fde 100644 --- a/dom/media/gmp/GMPStorageChild.cpp +++ b/dom/media/gmp/GMPStorageChild.cpp @@ -293,7 +293,7 @@ GMPStorageChild::EnumerateRecords(RecvGMPRecordIteratorPtr aRecvIteratorFunc, class GMPRecordIteratorImpl : public GMPRecordIterator { public: - GMPRecordIteratorImpl(const InfallibleTArray& aRecordNames) + explicit GMPRecordIteratorImpl(const InfallibleTArray& aRecordNames) : mRecordNames(aRecordNames) , mIndex(0) { diff --git a/dom/media/webm/SoftwareWebMVideoDecoder.h b/dom/media/webm/SoftwareWebMVideoDecoder.h index 36b345bd15c..8e304723705 100644 --- a/dom/media/webm/SoftwareWebMVideoDecoder.h +++ b/dom/media/webm/SoftwareWebMVideoDecoder.h @@ -24,7 +24,7 @@ public: virtual void Shutdown() MOZ_OVERRIDE; - SoftwareWebMVideoDecoder(WebMReader* aReader); + explicit SoftwareWebMVideoDecoder(WebMReader* aReader); ~SoftwareWebMVideoDecoder(); private: diff --git a/dom/plugins/ipc/PluginModuleChild.h b/dom/plugins/ipc/PluginModuleChild.h index 312415f7a69..8b502ebd4be 100644 --- a/dom/plugins/ipc/PluginModuleChild.h +++ b/dom/plugins/ipc/PluginModuleChild.h @@ -150,7 +150,7 @@ protected: virtual bool AnswerGetProfile(nsCString* aProfile) MOZ_OVERRIDE; public: - PluginModuleChild(bool aIsChrome); + explicit PluginModuleChild(bool aIsChrome); virtual ~PluginModuleChild(); bool CommonInit(base::ProcessHandle aParentProcessHandle, diff --git a/dom/vr/VRDevice.h b/dom/vr/VRDevice.h index 514bc901f4e..ac1f8053501 100644 --- a/dom/vr/VRDevice.h +++ b/dom/vr/VRDevice.h @@ -222,7 +222,7 @@ public: virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE; protected: - PositionSensorVRDevice(nsISupports* aParent) + explicit PositionSensorVRDevice(nsISupports* aParent) : VRDevice(aParent, VRDevice::PositionSensor) { } diff --git a/dom/workers/ServiceWorkerClients.h b/dom/workers/ServiceWorkerClients.h index a1ea870d294..40b32b326f0 100644 --- a/dom/workers/ServiceWorkerClients.h +++ b/dom/workers/ServiceWorkerClients.h @@ -28,7 +28,7 @@ public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(ServiceWorkerClients) - ServiceWorkerClients(ServiceWorkerGlobalScope* aWorkerScope); + explicit ServiceWorkerClients(ServiceWorkerGlobalScope* aWorkerScope); already_AddRefed GetServiced(ErrorResult& aRv); already_AddRefed ReloadAll(ErrorResult& aRv);