Bug 1061023 - Fix more bad implicit constructors in DOM; r=baku
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 01 Sep 2014 18:26:43 -0400
changeset 218525 ce5ae34c751b99d0cb3eb2eeb21cc1d5a72429e5
parent 218524 2cbf3ad53beb24ca5f33b5f329d6f2a651c0d609
child 218526 7229fe7c621518afc8f603407889202e5b952cc2
push id7107
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 17:43:31 +0000
treeherdermozilla-aurora@b4b34e0acc75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1061023
milestone34.0a1
Bug 1061023 - Fix more bad implicit constructors in DOM; r=baku
content/media/eme/MediaKeyMessageEvent.h
content/media/webaudio/MediaStreamAudioSourceNode.h
dom/activities/Activity.h
dom/animation/AnimationEffect.h
dom/archivereader/ArchiveEvent.h
dom/archivereader/ArchiveRequest.cpp
dom/bindings/Codegen.py
dom/bindings/Exceptions.cpp
dom/bindings/test/TestCImplementedInterface.h
dom/camera/AutoRwLock.h
dom/camera/CameraControlImpl.h
dom/camera/CameraPreviewMediaStream.h
dom/camera/CameraRecorderProfiles.h
dom/camera/DOMCameraCapabilities.h
dom/camera/DOMCameraControl.cpp
dom/camera/DOMCameraControl.h
dom/camera/DOMCameraControlListener.cpp
dom/camera/FallbackCameraControl.cpp
dom/camera/ICameraControl.h
dom/canvas/CanvasImageCache.cpp
dom/canvas/CanvasRenderingContext2D.cpp
dom/canvas/TextMetrics.h
dom/canvas/WebGLBuffer.h
dom/canvas/WebGLContext.cpp
dom/canvas/WebGLContextLossHandler.h
dom/canvas/WebGLContextUtils.h
dom/canvas/WebGLElementArrayCache.cpp
dom/canvas/WebGLExtensions.h
dom/canvas/WebGLProgram.h
dom/canvas/WebGLQuery.h
dom/canvas/WebGLTexture.h
dom/canvas/WebGLUniformInfo.h
dom/canvas/WebGLValidateStrings.h
dom/canvas/WebGLVertexArray.h
dom/canvas/WebGLVertexArrayFake.h
dom/canvas/WebGLVertexArrayGL.h
dom/crypto/CryptoKeyPair.h
dom/crypto/WebCryptoTask.cpp
dom/datastore/DataStoreDB.cpp
dom/devicestorage/nsDeviceStorage.cpp
dom/events/ContentEventHandler.h
dom/events/EventDispatcher.cpp
dom/events/EventStateManager.cpp
dom/events/IMEContentObserver.cpp
dom/events/IMEStateManager.cpp
dom/events/PaintRequest.h
dom/filehandle/AsyncHelper.h
dom/filehandle/FileHandle.cpp
dom/filehandle/FileHandle.h
dom/filehandle/FileService.h
dom/filehandle/FileStreamWrappers.cpp
dom/filesystem/CreateFileTask.cpp
dom/indexedDB/AsyncConnectionHelper.cpp
dom/indexedDB/AsyncConnectionHelper.h
dom/indexedDB/IDBCursor.cpp
dom/indexedDB/IDBDatabase.cpp
dom/indexedDB/IDBEvents.h
dom/indexedDB/IDBFileRequest.h
dom/indexedDB/TransactionThreadPool.cpp
dom/indexedDB/TransactionThreadPool.h
dom/indexedDB/ipc/IndexedDBChild.cpp
dom/mobilemessage/DeletedMessageInfo.h
dom/mobilemessage/MmsMessage.h
dom/mobilemessage/MobileMessageCallback.h
dom/mobilemessage/MobileMessageThread.h
dom/mobilemessage/SmsMessage.h
dom/network/UDPSocket.cpp
dom/notification/DesktopNotification.cpp
dom/notification/Notification.cpp
dom/plugins/base/nsJSNPRuntime.cpp
dom/plugins/base/nsNPAPIPlugin.h
dom/plugins/base/nsNPAPIPluginInstance.cpp
dom/plugins/base/nsPluginHost.cpp
dom/plugins/base/nsPluginInstanceOwner.cpp
dom/plugins/base/nsPluginStreamListenerPeer.cpp
dom/plugins/base/nsPluginStreamListenerPeer.h
dom/plugins/base/nsPluginsDirDarwin.cpp
dom/plugins/ipc/PluginBackgroundDestroyer.h
dom/plugins/ipc/PluginInstanceParent.cpp
dom/plugins/ipc/PluginInterposeOSX.mm
dom/plugins/ipc/PluginModuleParent.h
dom/plugins/ipc/PluginProcessChild.h
dom/plugins/ipc/PluginProcessParent.h
dom/plugins/ipc/PluginScriptableObjectParent.h
dom/plugins/ipc/PluginScriptableObjectUtils.h
dom/promise/Promise.cpp
dom/quota/QuotaManager.cpp
dom/quota/StorageMatcher.h
dom/smil/nsSMILTimedElement.cpp
dom/telephony/CallsList.h
dom/telephony/Telephony.cpp
dom/telephony/ipc/TelephonyChild.h
dom/workers/DataStore.h
dom/workers/DataStoreCursor.h
dom/workers/Performance.h
dom/workers/RuntimeService.cpp
dom/workers/RuntimeService.h
dom/workers/ServiceWorkerEvents.h
dom/workers/ServiceWorkerManager.cpp
dom/workers/URL.cpp
dom/workers/WorkerPrivate.cpp
dom/workers/WorkerScope.h
dom/workers/XMLHttpRequest.cpp
dom/workers/XMLHttpRequest.h
dom/workers/XMLHttpRequestUpload.h
--- a/content/media/eme/MediaKeyMessageEvent.h
+++ b/content/media/eme/MediaKeyMessageEvent.h
@@ -24,17 +24,17 @@ struct MediaKeyMessageEventInit;
 
 class MediaKeyMessageEvent MOZ_FINAL : public Event
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(MediaKeyMessageEvent, Event)
 protected:
   virtual ~MediaKeyMessageEvent();
-  MediaKeyMessageEvent(EventTarget* aOwner);
+  explicit MediaKeyMessageEvent(EventTarget* aOwner);
 
   JS::Heap<JSObject*> mMessage;
   nsString mDestinationURL;
 
 public:
   virtual MediaKeyMessageEvent* AsMediaKeyMessageEvent();
 
   virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
--- a/content/media/webaudio/MediaStreamAudioSourceNode.h
+++ b/content/media/webaudio/MediaStreamAudioSourceNode.h
@@ -13,17 +13,17 @@
 
 namespace mozilla {
 
 namespace dom {
 
 class MediaStreamAudioSourceNodeEngine : public AudioNodeEngine
 {
 public:
-  MediaStreamAudioSourceNodeEngine(AudioNode* aNode)
+  explicit MediaStreamAudioSourceNodeEngine(AudioNode* aNode)
     : AudioNodeEngine(aNode), mEnabled(false) {}
 
   bool IsEnabled() const { return mEnabled; }
   enum Parameters {
     ENABLE
   };
   virtual void SetInt32Parameter(uint32_t aIndex, int32_t aValue) MOZ_OVERRIDE
   {
--- a/dom/activities/Activity.h
+++ b/dom/activities/Activity.h
@@ -34,17 +34,17 @@ public:
       return nullptr;
     }
 
     nsRefPtr<Activity> activity = new Activity(window);
     aRv = activity->Initialize(window, aOwner.Context(), aOptions);
     return activity.forget();
   }
 
-  Activity(nsPIDOMWindow* aWindow);
+  explicit Activity(nsPIDOMWindow* aWindow);
 
 protected:
   nsresult Initialize(nsPIDOMWindow* aWindow,
                       JSContext* aCx,
                       const ActivityOptions& aOptions);
 
   nsCOMPtr<nsIActivityProxy> mProxy;
 
--- a/dom/animation/AnimationEffect.h
+++ b/dom/animation/AnimationEffect.h
@@ -13,17 +13,17 @@
 struct JSContext;
 
 namespace mozilla {
 namespace dom {
 
 class AnimationEffect MOZ_FINAL : public nsWrapperCache
 {
 public:
-  AnimationEffect(Animation* aAnimation)
+  explicit AnimationEffect(Animation* aAnimation)
     : mAnimation(aAnimation)
   {
     SetIsDOMBinding();
   }
 
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(AnimationEffect)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(AnimationEffect)
 
--- a/dom/archivereader/ArchiveEvent.h
+++ b/dom/archivereader/ArchiveEvent.h
@@ -49,17 +49,17 @@ protected:
  * This class runs in a different thread and it calls the 'exec()' method.
  * The exec() must populate mFileList and mStatus then it must call RunShare();
  */
 class ArchiveReaderEvent : public nsRunnable
 {
 public:
   NS_DECL_NSIRUNNABLE
 
-  ArchiveReaderEvent(ArchiveReader* aArchiveReader);
+  explicit ArchiveReaderEvent(ArchiveReader* aArchiveReader);
 
 protected:
   virtual ~ArchiveReaderEvent();
 
 public:
   // This must be implemented
   virtual nsresult Exec() = 0;
 
--- a/dom/archivereader/ArchiveRequest.cpp
+++ b/dom/archivereader/ArchiveRequest.cpp
@@ -18,18 +18,18 @@ USING_ARCHIVEREADER_NAMESPACE
 /**
  * Class used to make asynchronous the ArchiveRequest.
  */
 class ArchiveRequestEvent : public nsRunnable
 {
 public:
   NS_DECL_NSIRUNNABLE
 
-  ArchiveRequestEvent(ArchiveRequest* request)
-  : mRequest(request)
+  explicit ArchiveRequestEvent(ArchiveRequest* aRequest)
+  : mRequest(aRequest)
   {
     MOZ_COUNT_CTOR(ArchiveRequestEvent);
   }
 
 protected:
   ~ArchiveRequestEvent()
   {
     MOZ_COUNT_DTOR(ArchiveRequestEvent);
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -14539,17 +14539,17 @@ class CGEventClass(CGBindingImplClass):
         self.parentType = self.descriptor.getDescriptor(parent.identifier.name).nativeType.split('::')[-1]
         baseDeclarations = fill(
             """
             public:
               NS_DECL_ISUPPORTS_INHERITED
               NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(${nativeType}, ${parentType})
             protected:
               virtual ~${nativeType}();
-              ${nativeType}(mozilla::dom::EventTarget* aOwner);
+              explicit ${nativeType}(mozilla::dom::EventTarget* aOwner);
 
             """,
             nativeType=self.descriptor.nativeType.split('::')[-1],
             parentType=self.parentType)
 
         className = descriptor.nativeType.split('::')[-1]
         asConcreteTypeMethod = ClassMethod("As%s" % className,
                                            "%s*" % className,
--- a/dom/bindings/Exceptions.cpp
+++ b/dom/bindings/Exceptions.cpp
@@ -264,17 +264,17 @@ NS_INTERFACE_MAP_END
 class JSStackFrame : public StackFrame
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(JSStackFrame,
                                                          StackFrame)
 
   // aStack must not be null.
-  JSStackFrame(JS::Handle<JSObject*> aStack);
+  explicit JSStackFrame(JS::Handle<JSObject*> aStack);
 
   static already_AddRefed<nsIStackFrame>
   CreateStack(JSContext* aCx, int32_t aMaxDepth = -1);
 
   NS_IMETHOD GetLanguageName(nsACString& aLanguageName) MOZ_OVERRIDE;
   NS_IMETHOD GetFilename(nsAString& aFilename) MOZ_OVERRIDE;
   NS_IMETHOD GetName(nsAString& aFunction) MOZ_OVERRIDE;
   NS_IMETHOD GetCaller(nsIStackFrame** aCaller) MOZ_OVERRIDE;
--- a/dom/bindings/test/TestCImplementedInterface.h
+++ b/dom/bindings/test/TestCImplementedInterface.h
@@ -22,17 +22,17 @@ public:
     : TestJSImplInterface(aJSImpl, aParent)
   {}
 };
 
 class TestCImplementedInterface2 : public nsISupports,
                                    public nsWrapperCache
 {
 public:
-  TestCImplementedInterface2(nsPIDOMWindow* aParent)
+  explicit TestCImplementedInterface2(nsPIDOMWindow* aParent)
   {}
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TestCImplementedInterface2)
 
   // We need a GetParentObject to make binding codegen happy
   nsISupports* GetParentObject();
 };
 
--- a/dom/camera/AutoRwLock.h
+++ b/dom/camera/AutoRwLock.h
@@ -6,17 +6,17 @@
 #define RWLOCK_AUTO_ENTER_H
 
 #include "prrwlock.h"
 #include "mozilla/Assertions.h"
 
 class RwLockAutoEnterRead
 {
 public:
-  RwLockAutoEnterRead(PRRWLock* aRwLock)
+  explicit RwLockAutoEnterRead(PRRWLock* aRwLock)
     : mRwLock(aRwLock)
   {
     MOZ_ASSERT(mRwLock);
     PR_RWLock_Rlock(mRwLock);
   }
 
   ~RwLockAutoEnterRead()
   {
@@ -25,17 +25,17 @@ public:
 
 protected:
   PRRWLock* mRwLock;
 };
 
 class RwLockAutoEnterWrite
 {
 public:
-  RwLockAutoEnterWrite(PRRWLock* aRwLock)
+  explicit RwLockAutoEnterWrite(PRRWLock* aRwLock)
     : mRwLock(aRwLock)
   {
     MOZ_ASSERT(mRwLock);
     PR_RWLock_Wlock(mRwLock);
   }
 
   ~RwLockAutoEnterWrite()
   {
--- a/dom/camera/CameraControlImpl.h
+++ b/dom/camera/CameraControlImpl.h
@@ -25,17 +25,17 @@ namespace layers {
   class Image;
 }
 
 class RecorderProfileManager;
 
 class CameraControlImpl : public ICameraControl
 {
 public:
-  CameraControlImpl(uint32_t aCameraId);
+  explicit CameraControlImpl(uint32_t aCameraId);
   virtual void AddListener(CameraControlListener* aListener) MOZ_OVERRIDE;
   virtual void RemoveListener(CameraControlListener* aListener) MOZ_OVERRIDE;
 
   // See ICameraControl.h for these methods' return values.
   virtual nsresult Start(const Configuration* aConfig = nullptr) MOZ_OVERRIDE;
   virtual nsresult Stop() MOZ_OVERRIDE;
   virtual nsresult SetConfiguration(const Configuration& aConfig) MOZ_OVERRIDE;
   virtual nsresult StartPreview() MOZ_OVERRIDE;
--- a/dom/camera/CameraPreviewMediaStream.h
+++ b/dom/camera/CameraPreviewMediaStream.h
@@ -18,17 +18,17 @@ namespace mozilla {
  * A camera preview requests no delay and no buffering stream.
  * But the SourceMediaStream do not support it.
  */
 class CameraPreviewMediaStream : public MediaStream
 {
   typedef mozilla::layers::Image Image;
 
 public:
-  CameraPreviewMediaStream(DOMMediaStream* aWrapper);
+  explicit CameraPreviewMediaStream(DOMMediaStream* aWrapper);
 
   virtual void AddAudioOutput(void* aKey) MOZ_OVERRIDE;
   virtual void SetAudioOutputVolume(void* aKey, float aVolume) MOZ_OVERRIDE;
   virtual void RemoveAudioOutput(void* aKey) MOZ_OVERRIDE;
   virtual void AddVideoOutput(VideoFrameContainer* aContainer) MOZ_OVERRIDE;
   virtual void RemoveVideoOutput(VideoFrameContainer* aContainer) MOZ_OVERRIDE;
   virtual void ChangeExplicitBlockerCount(int32_t aDelta) MOZ_OVERRIDE;
   virtual void AddListener(MediaStreamListener* aListener) MOZ_OVERRIDE;
--- a/dom/camera/CameraRecorderProfiles.h
+++ b/dom/camera/CameraRecorderProfiles.h
@@ -257,17 +257,17 @@ public:
   //  - NS_OK on success;
   //  - NS_ERROR_INVALID_ARG if 'aObject' is null;
   //  - NS_ERROR_OUT_OF_MEMORY if a new object could not be allocated;
   //  - NS_ERROR_NOT_AVAILABLE if the profile has no file format name;
   //  - NS_ERROR_FAILURE if construction of the JS object fails.
   nsresult GetJsObject(JSContext* aCx, JSObject** aObject) const;
 
 protected:
-  RecorderProfileManager(uint32_t aCameraId);
+  explicit RecorderProfileManager(uint32_t aCameraId);
   virtual ~RecorderProfileManager();
 
   uint32_t mCameraId;
   uint32_t mMaxQualityIndex;
 };
 
 } // namespace mozilla
 
--- a/dom/camera/DOMCameraCapabilities.h
+++ b/dom/camera/DOMCameraCapabilities.h
@@ -35,17 +35,17 @@ public:
 
   // Because this header's filename doesn't match its C++ or DOM-facing
   // classname, we can't rely on the [Func="..."] WebIDL tag to implicitly
   // include the right header for us; instead we must explicitly include a
   // HasSupport() method in each header. We can get rid of these with the
   // Great Renaming proposed in bug 983177.
   static bool HasSupport(JSContext* aCx, JSObject* aGlobal);
 
-  CameraCapabilities(nsPIDOMWindow* aWindow);
+  explicit CameraCapabilities(nsPIDOMWindow* aWindow);
 
   // Populate the camera capabilities interface from the specific
   // camera control object.
   //
   // Return values:
   //  - NS_OK on success;
   //  - NS_ERROR_INVALID_ARG if 'aCameraControl' is null.
   nsresult Populate(ICameraControl* aCameraControl);
--- a/dom/camera/DOMCameraControl.cpp
+++ b/dom/camera/DOMCameraControl.cpp
@@ -76,17 +76,17 @@ nsDOMCameraControl::HasSupport(JSContext
 }
 
 class mozilla::StartRecordingHelper : public nsIDOMEventListener
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDOMEVENTLISTENER
 
-  StartRecordingHelper(nsDOMCameraControl* aDOMCameraControl)
+  explicit StartRecordingHelper(nsDOMCameraControl* aDOMCameraControl)
     : mDOMCameraControl(aDOMCameraControl)
   {
     MOZ_COUNT_CTOR(StartRecordingHelper);
   }
 
 protected:
   virtual ~StartRecordingHelper()
   {
--- a/dom/camera/DOMCameraControl.h
+++ b/dom/camera/DOMCameraControl.h
@@ -140,17 +140,17 @@ protected:
   virtual ~nsDOMCameraControl();
 
   class DOMCameraConfiguration MOZ_FINAL : public dom::CameraConfiguration
   {
   public:
     NS_INLINE_DECL_REFCOUNTING(DOMCameraConfiguration)
 
     DOMCameraConfiguration();
-    DOMCameraConfiguration(const dom::CameraConfiguration& aConfiguration);
+    explicit DOMCameraConfiguration(const dom::CameraConfiguration& aConfiguration);
 
     // Additional configuration options that aren't exposed to the DOM
     uint32_t mMaxFocusAreas;
     uint32_t mMaxMeteringAreas;
 
   private:
     // Private destructor, to discourage deletion outside of Release():
     ~DOMCameraConfiguration();
--- a/dom/camera/DOMCameraControlListener.cpp
+++ b/dom/camera/DOMCameraControlListener.cpp
@@ -26,17 +26,17 @@ DOMCameraControlListener::~DOMCameraCont
 {
   DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
 }
 
 // Boilerplate callback runnable
 class DOMCameraControlListener::DOMCallback : public nsRunnable
 {
 public:
-  DOMCallback(nsMainThreadPtrHandle<nsDOMCameraControl> aDOMCameraControl)
+  explicit DOMCallback(nsMainThreadPtrHandle<nsDOMCameraControl> aDOMCameraControl)
     : mDOMCameraControl(aDOMCameraControl)
   {
     MOZ_COUNT_CTOR(DOMCameraControlListener::DOMCallback);
   }
 
 protected:
   virtual ~DOMCallback()
   {
@@ -271,17 +271,17 @@ DOMCameraControlListener::OnFacesDetecte
 }
 
 void
 DOMCameraControlListener::OnShutter()
 {
   class Callback : public DOMCallback
   {
   public:
-    Callback(nsMainThreadPtrHandle<nsDOMCameraControl> aDOMCameraControl)
+    explicit Callback(nsMainThreadPtrHandle<nsDOMCameraControl> aDOMCameraControl)
       : DOMCallback(aDOMCameraControl)
     { }
 
     void
     RunCallback(nsDOMCameraControl* aDOMCameraControl) MOZ_OVERRIDE
     {
       aDOMCameraControl->OnShutter();
     }
--- a/dom/camera/FallbackCameraControl.cpp
+++ b/dom/camera/FallbackCameraControl.cpp
@@ -17,17 +17,17 @@ namespace mozilla {
 
 /**
  * Fallback camera control subclass. Can be used as a template for the
  * definition of new camera support classes.
  */
 class FallbackCameraControl : public CameraControlImpl
 {
 public:
-  FallbackCameraControl(uint32_t aCameraId) : CameraControlImpl(aCameraId) { }
+  explicit FallbackCameraControl(uint32_t aCameraId) : CameraControlImpl(aCameraId) { }
 
   virtual nsresult Set(uint32_t aKey, const nsAString& aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual nsresult Get(uint32_t aKey, nsAString& aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual nsresult Set(uint32_t aKey, double aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual nsresult Get(uint32_t aKey, double& aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual nsresult Set(uint32_t aKey, int32_t aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual nsresult Get(uint32_t aKey, int32_t& aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual nsresult Set(uint32_t aKey, int64_t aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
--- a/dom/camera/ICameraControl.h
+++ b/dom/camera/ICameraControl.h
@@ -235,17 +235,17 @@ protected:
 };
 
 // Helper class to make it easy to update a batch of camera parameters;
 // the parameters are applied atomically when this object goes out of
 // scope.
 class ICameraControlParameterSetAutoEnter
 {
 public:
-  ICameraControlParameterSetAutoEnter(ICameraControl* aCameraControl)
+  explicit ICameraControlParameterSetAutoEnter(ICameraControl* aCameraControl)
     : mCameraControl(aCameraControl)
   {
     mCameraControl->BeginBatchParameterSet();
   }
   virtual ~ICameraControlParameterSetAutoEnter()
   {
     mCameraControl->EndBatchParameterSet();
   }
--- a/dom/canvas/CanvasImageCache.cpp
+++ b/dom/canvas/CanvasImageCache.cpp
@@ -30,17 +30,17 @@ struct ImageCacheEntryData {
   ImageCacheEntryData(const ImageCacheEntryData& aOther)
     : mImage(aOther.mImage)
     , mILC(aOther.mILC)
     , mCanvas(aOther.mCanvas)
     , mRequest(aOther.mRequest)
     , mSourceSurface(aOther.mSourceSurface)
     , mSize(aOther.mSize)
   {}
-  ImageCacheEntryData(const ImageCacheKey& aKey)
+  explicit ImageCacheEntryData(const ImageCacheKey& aKey)
     : mImage(aKey.mImage)
     , mILC(nullptr)
     , mCanvas(aKey.mCanvas)
   {}
 
   nsExpirationState* GetExpirationState() { return &mState; }
 
   size_t SizeInBytes() { return mSize.width * mSize.height * 4; }
@@ -56,18 +56,18 @@ struct ImageCacheEntryData {
   nsExpirationState mState;
 };
 
 class ImageCacheEntry : public PLDHashEntryHdr {
 public:
   typedef ImageCacheKey KeyType;
   typedef const ImageCacheKey* KeyTypePointer;
 
-  ImageCacheEntry(const KeyType *key) :
-      mData(new ImageCacheEntryData(*key)) {}
+  explicit ImageCacheEntry(const KeyType* aKey) :
+      mData(new ImageCacheEntryData(*aKey)) {}
   ImageCacheEntry(const ImageCacheEntry &toCopy) :
       mData(new ImageCacheEntryData(*toCopy.mData)) {}
   ~ImageCacheEntry() {}
 
   bool KeyEquals(KeyTypePointer key) const
   {
     return mData->mImage == key->mImage && mData->mCanvas == key->mCanvas;
   }
@@ -110,17 +110,17 @@ public:
 static ImageCache* gImageCache = nullptr;
 
 // Listen memory-pressure event for image cache purge
 class ImageCacheObserver MOZ_FINAL : public nsIObserver
 {
 public:
   NS_DECL_ISUPPORTS
 
-  ImageCacheObserver(ImageCache* aImageCache)
+  explicit ImageCacheObserver(ImageCache* aImageCache)
     : mImageCache(aImageCache)
   {
     RegisterMemoryPressureEvent();
   }
 
   void Destroy()
   {
     UnregisterMemoryPressureEvent();
--- a/dom/canvas/CanvasRenderingContext2D.cpp
+++ b/dom/canvas/CanvasRenderingContext2D.cpp
@@ -293,17 +293,17 @@ public:
  * change aBounds to incorporate shadow bounds. If this is nullptr the drawing
  * operation will be assumed to cover an infinite rect.
  */
 class AdjustedTarget
 {
 public:
   typedef CanvasRenderingContext2D::ContextState ContextState;
 
-  AdjustedTarget(CanvasRenderingContext2D *ctx,
+  explicit AdjustedTarget(CanvasRenderingContext2D* ctx,
                  mgfx::Rect *aBounds = nullptr)
     : mCtx(nullptr)
   {
     if (!ctx->NeedToDrawShadow()) {
       mTarget = ctx->mTarget;
       return;
     }
     mCtx = ctx;
@@ -433,17 +433,17 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(Ca
 
 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(CanvasPattern, AddRef)
 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(CanvasPattern, Release)
 
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(CanvasPattern, mContext)
 
 class CanvasRenderingContext2DUserData : public LayerUserData {
 public:
-    CanvasRenderingContext2DUserData(CanvasRenderingContext2D *aContext)
+  explicit CanvasRenderingContext2DUserData(CanvasRenderingContext2D *aContext)
     : mContext(aContext)
   {
     aContext->mUserDatas.AppendElement(this);
   }
   ~CanvasRenderingContext2DUserData()
   {
     if (mContext) {
       mContext->mUserDatas.RemoveElement(this);
--- a/dom/canvas/TextMetrics.h
+++ b/dom/canvas/TextMetrics.h
@@ -10,17 +10,17 @@
 #include "mozilla/dom/NonRefcountedDOMObject.h"
 
 namespace mozilla {
 namespace dom {
 
 class TextMetrics MOZ_FINAL : public NonRefcountedDOMObject
 {
 public:
-  TextMetrics(float w) : width(w)
+  explicit TextMetrics(float aValue) : width(aValue)
   {
     MOZ_COUNT_CTOR(TextMetrics);
   }
 
   ~TextMetrics()
   {
     MOZ_COUNT_DTOR(TextMetrics);
   }
--- a/dom/canvas/WebGLBuffer.h
+++ b/dom/canvas/WebGLBuffer.h
@@ -21,17 +21,17 @@ class WebGLElementArrayCache;
 class WebGLBuffer MOZ_FINAL
     : public nsWrapperCache
     , public WebGLBindableName
     , public WebGLRefCountedObject<WebGLBuffer>
     , public LinkedListElement<WebGLBuffer>
     , public WebGLContextBoundObject
 {
 public:
-    WebGLBuffer(WebGLContext *context);
+    explicit WebGLBuffer(WebGLContext* aContext);
 
     void Delete();
 
     size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
 
     WebGLsizeiptr ByteLength() const { return mByteLength; }
 
     void SetByteLength(WebGLsizeiptr byteLength) { mByteLength = byteLength; }
--- a/dom/canvas/WebGLContext.cpp
+++ b/dom/canvas/WebGLContext.cpp
@@ -1124,17 +1124,17 @@ void WebGLContext::UpdateLastUseIndex()
 }
 
 static uint8_t gWebGLLayerUserData;
 
 namespace mozilla {
 
 class WebGLContextUserData : public LayerUserData {
 public:
-    WebGLContextUserData(HTMLCanvasElement *aContent)
+    explicit WebGLContextUserData(HTMLCanvasElement* aContent)
         : mContent(aContent)
     {}
 
     /* PreTransactionCallback gets called by the Layers code every time the
      * WebGL canvas is going to be composited.
      */
     static void PreTransactionCallback(void* data)
     {
@@ -1505,18 +1505,18 @@ WebGLContext::RunContextLossTimer()
     mContextLossHandler->RunTimer();
 }
 
 class UpdateContextLossStatusTask : public nsRunnable
 {
     nsRefPtr<WebGLContext> mContext;
 
 public:
-    UpdateContextLossStatusTask(WebGLContext* context)
-        : mContext(context)
+    explicit UpdateContextLossStatusTask(WebGLContext* aContext)
+        : mContext(aContext)
     {
     }
 
     NS_IMETHOD Run() {
         mContext->UpdateContextLossStatus();
 
         return NS_OK;
     }
--- a/dom/canvas/WebGLContextLossHandler.h
+++ b/dom/canvas/WebGLContextLossHandler.h
@@ -25,17 +25,17 @@ class WebGLContextLossHandler
     bool mIsTimerRunning;
     bool mShouldRunTimerAgain;
     bool mIsDisabled;
     DebugOnly<nsIThread*> mThread;
 
 public:
     MOZ_DECLARE_REFCOUNTED_TYPENAME(WebGLContextLossHandler)
 
-    WebGLContextLossHandler(WebGLContext* webgl);
+    explicit WebGLContextLossHandler(WebGLContext* aWebgl);
     ~WebGLContextLossHandler();
 
     void RunTimer();
     void DisableTimer();
 
 protected:
     void StartTimer(unsigned long delayMS);
     static void StaticTimerCallback(nsITimer*, void* tempRefForTimer);
--- a/dom/canvas/WebGLContextUtils.h
+++ b/dom/canvas/WebGLContextUtils.h
@@ -31,17 +31,17 @@ struct GLComponents
         Stencil = (1 << 4),
         Depth   = (1 << 5),
     };
 
     GLComponents()
         : mComponents(0)
     { }
 
-    GLComponents(GLenum format);
+    explicit GLComponents(GLenum aFormat);
 
     // Returns true iff other has all (or more) of
     // the components present in this GLComponents
     bool IsSubsetOf(const GLComponents& other) const;
 };
 
 template <typename WebGLObjectType>
 JS::Value
--- a/dom/canvas/WebGLElementArrayCache.cpp
+++ b/dom/canvas/WebGLElementArrayCache.cpp
@@ -139,18 +139,18 @@ private:
   // The tree's internal data storage. Its length is 2 * (number of leaves)
   // because of its data layout explained in the above class comment.
   FallibleTArray<T> mTreeData;
 
 public:
   // Constructor. Takes a reference to the WebGLElementArrayCache that is to be
   // the parent. Does not initialize the tree. Should be followed by a call
   // to Update() to attempt initializing the tree.
-  WebGLElementArrayCacheTree(WebGLElementArrayCache& p)
-    : mParent(p)
+  explicit WebGLElementArrayCacheTree(WebGLElementArrayCache& aValue)
+    : mParent(aValue)
   {
   }
 
   T GlobalMaximum() const {
     return mTreeData[1];
   }
 
   // returns the index of the parent node; if treeIndex=1 (the root node),
--- a/dom/canvas/WebGLExtensions.h
+++ b/dom/canvas/WebGLExtensions.h
@@ -18,17 +18,17 @@ class WebGLContext;
 class WebGLShader;
 class WebGLVertexArray;
 
 class WebGLExtensionBase
     : public nsWrapperCache
     , public WebGLContextBoundObject
 {
 public:
-    WebGLExtensionBase(WebGLContext*);
+    explicit WebGLExtensionBase(WebGLContext* aValue);
 
     WebGLContext *GetParentObject() const {
         return Context();
     }
 
     void MarkLost();
 
     NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(WebGLExtensionBase)
@@ -283,34 +283,34 @@ public:
 
     DECL_WEBGL_EXTENSION_GOOP
 };
 
 class WebGLExtensionVertexArray
     : public WebGLExtensionBase
 {
 public:
-    WebGLExtensionVertexArray(WebGLContext*);
+    explicit WebGLExtensionVertexArray(WebGLContext* aValue);
     virtual ~WebGLExtensionVertexArray();
 
     already_AddRefed<WebGLVertexArray> CreateVertexArrayOES();
     void DeleteVertexArrayOES(WebGLVertexArray* array);
     bool IsVertexArrayOES(WebGLVertexArray* array);
     void BindVertexArrayOES(WebGLVertexArray* array);
 
     static bool IsSupported(const WebGLContext* context);
 
     DECL_WEBGL_EXTENSION_GOOP
 };
 
 class WebGLExtensionInstancedArrays
     : public WebGLExtensionBase
 {
 public:
-    WebGLExtensionInstancedArrays(WebGLContext* context);
+    explicit WebGLExtensionInstancedArrays(WebGLContext* aContext);
     virtual ~WebGLExtensionInstancedArrays();
 
     void DrawArraysInstancedANGLE(GLenum mode, GLint first,
                                   GLsizei count, GLsizei primcount);
     void DrawElementsInstancedANGLE(GLenum mode, GLsizei count,
                                     GLenum type, WebGLintptr offset,
                                     GLsizei primcount);
     void VertexAttribDivisorANGLE(GLuint index, GLuint divisor);
@@ -319,17 +319,17 @@ public:
 
     DECL_WEBGL_EXTENSION_GOOP
 };
 
 class WebGLExtensionBlendMinMax
     : public WebGLExtensionBase
 {
 public:
-    WebGLExtensionBlendMinMax(WebGLContext*);
+    explicit WebGLExtensionBlendMinMax(WebGLContext* aValue);
     virtual ~WebGLExtensionBlendMinMax();
 
     static bool IsSupported(const WebGLContext*);
 
     DECL_WEBGL_EXTENSION_GOOP
 };
 
 } // namespace mozilla
--- a/dom/canvas/WebGLProgram.h
+++ b/dom/canvas/WebGLProgram.h
@@ -26,17 +26,17 @@ typedef nsDataHashtable<nsCStringHashKey
 
 class WebGLProgram MOZ_FINAL
     : public nsWrapperCache
     , public WebGLRefCountedObject<WebGLProgram>
     , public LinkedListElement<WebGLProgram>
     , public WebGLContextBoundObject
 {
 public:
-    WebGLProgram(WebGLContext *context);
+    explicit WebGLProgram(WebGLContext* aContext);
 
     void Delete();
 
     void DetachShaders() {
         mAttachedShaders.Clear();
     }
 
     GLuint GLName() { return mGLName; }
--- a/dom/canvas/WebGLQuery.h
+++ b/dom/canvas/WebGLQuery.h
@@ -22,17 +22,17 @@ class WebGLQuery MOZ_FINAL
 {
 // -----------------------------------------------------------------------------
 // PUBLIC
 public:
 
     // -------------------------------------------------------------------------
     // CONSTRUCTOR
 
-    WebGLQuery(WebGLContext *context);
+    explicit WebGLQuery(WebGLContext* aContext);
 
     // -------------------------------------------------------------------------
     // MEMBER FUNCTIONS
 
     bool IsActive() const;
 
     bool HasEverBeenActive()
     {
--- a/dom/canvas/WebGLTexture.h
+++ b/dom/canvas/WebGLTexture.h
@@ -30,17 +30,17 @@ class WebGLTexture MOZ_FINAL
     : public nsWrapperCache
     , public WebGLBindableName
     , public WebGLRefCountedObject<WebGLTexture>
     , public LinkedListElement<WebGLTexture>
     , public WebGLContextBoundObject
     , public WebGLFramebufferAttachable
 {
 public:
-    WebGLTexture(WebGLContext *context);
+    explicit WebGLTexture(WebGLContext* aContext);
 
     void Delete();
 
     WebGLContext *GetParentObject() const {
         return Context();
     }
 
     virtual JSObject* WrapObject(JSContext *cx) MOZ_OVERRIDE;
--- a/dom/canvas/WebGLUniformInfo.h
+++ b/dom/canvas/WebGLUniformInfo.h
@@ -10,17 +10,17 @@
 
 namespace mozilla {
 
 struct WebGLUniformInfo {
     uint32_t arraySize;
     bool isArray;
     ShDataType type;
 
-    WebGLUniformInfo(uint32_t s = 0, bool a = false, ShDataType t = SH_NONE)
+    explicit WebGLUniformInfo(uint32_t s = 0, bool a = false, ShDataType t = SH_NONE)
         : arraySize(s), isArray(a), type(t) {}
 
     int ElementSize() const {
         switch (type) {
             case SH_INT:
             case SH_FLOAT:
             case SH_BOOL:
             case SH_SAMPLER_2D:
--- a/dom/canvas/WebGLValidateStrings.h
+++ b/dom/canvas/WebGLValidateStrings.h
@@ -53,23 +53,23 @@ namespace mozilla {
         return false;
     }
 
     // Strips comments from shader text. This allows non-ASCII characters
     // to be used in comments without potentially breaking OpenGL
     // implementations not expecting characters outside the GLSL ES set.
     class StripComments {
     public:
-        StripComments(const nsAString& str)
+        explicit StripComments(const nsAString& aStr)
             : m_parseState(BeginningOfLine)
-            , m_end(str.EndReading())
-            , m_current(str.BeginReading())
+            , m_end(aStr.EndReading())
+            , m_current(aStr.BeginReading())
             , m_position(0)
         {
-            m_result.SetLength(str.Length());
+            m_result.SetLength(aStr.Length());
             parse();
         }
 
         const nsTArray<char16_t>& result()
         {
             return m_result;
         }
 
--- a/dom/canvas/WebGLVertexArray.h
+++ b/dom/canvas/WebGLVertexArray.h
@@ -69,17 +69,17 @@ public:
     bool IsAttribArrayEnabled(GLuint index) {
         return HasAttrib(index) && mAttribs[index].enabled;
     }
 
 
 // -----------------------------------------------------------------------------
 // PROTECTED
 protected:
-    WebGLVertexArray(WebGLContext* context);
+    explicit WebGLVertexArray(WebGLContext* aContext);
 
     virtual ~WebGLVertexArray() {
         MOZ_ASSERT(IsDeleted());
     };
 
     // -------------------------------------------------------------------------
     // MEMBERS
 
--- a/dom/canvas/WebGLVertexArrayFake.h
+++ b/dom/canvas/WebGLVertexArrayFake.h
@@ -14,18 +14,18 @@ class WebGLVertexArrayFake MOZ_FINAL
     : public WebGLVertexArray
 {
 public:
     virtual void BindVertexArrayImpl() MOZ_OVERRIDE;
     virtual void DeleteImpl() MOZ_OVERRIDE { };
     virtual void GenVertexArray() MOZ_OVERRIDE { };
 
 private:
-    WebGLVertexArrayFake(WebGLContext *context)
-        : WebGLVertexArray(context)
+    explicit WebGLVertexArrayFake(WebGLContext* aContext)
+        : WebGLVertexArray(aContext)
     { }
 
     ~WebGLVertexArrayFake() {
         DeleteOnce();
     }
 
     friend class WebGLVertexArray;
 };
--- a/dom/canvas/WebGLVertexArrayGL.h
+++ b/dom/canvas/WebGLVertexArrayGL.h
@@ -14,18 +14,18 @@ class WebGLVertexArrayGL MOZ_FINAL
     : public WebGLVertexArray
 {
 public:
     virtual void DeleteImpl() MOZ_OVERRIDE;
     virtual void BindVertexArrayImpl() MOZ_OVERRIDE;
     virtual void GenVertexArray() MOZ_OVERRIDE;
 
 private:
-    WebGLVertexArrayGL(WebGLContext* context)
-        : WebGLVertexArray(context)
+    explicit WebGLVertexArrayGL(WebGLContext* aContext)
+        : WebGLVertexArray(aContext)
     { }
 
     ~WebGLVertexArrayGL() {
         DeleteOnce();
     }
 
     friend class WebGLVertexArray;
 };
--- a/dom/crypto/CryptoKeyPair.h
+++ b/dom/crypto/CryptoKeyPair.h
@@ -19,17 +19,17 @@ namespace dom {
 class CryptoKeyPair MOZ_FINAL : public nsISupports,
                                 public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CryptoKeyPair)
 
 public:
-  CryptoKeyPair(nsIGlobalObject* aGlobal)
+  explicit CryptoKeyPair(nsIGlobalObject* aGlobal)
     : mGlobal(aGlobal)
     , mPublicKey(new CryptoKey(aGlobal))
     , mPrivateKey(new CryptoKey(aGlobal))
   {
     SetIsDOMBinding();
   }
 
   nsIGlobalObject* GetParentObject() const
--- a/dom/crypto/WebCryptoTask.cpp
+++ b/dom/crypto/WebCryptoTask.cpp
@@ -105,17 +105,17 @@ enum TelemetryAlgorithm {
       mEarlyRv = NS_ERROR_DOM_INVALID_ACCESS_ERR; \
       return; \
     } \
   }
 
 class ClearException
 {
 public:
-  ClearException(JSContext* aCx)
+  explicit ClearException(JSContext* aCx)
     : mCx(aCx)
   {}
 
   ~ClearException()
   {
     JS_ClearPendingException(mCx);
   }
 
@@ -374,18 +374,18 @@ WebCryptoTask::CallCallback(nsresult rv)
   Cleanup();
 }
 
 // Some generic utility classes
 
 class FailureTask : public WebCryptoTask
 {
 public:
-  FailureTask(nsresult rv) {
-    mEarlyRv = rv;
+  explicit FailureTask(nsresult aRv) {
+    mEarlyRv = aRv;
   }
 };
 
 class ReturnArrayBufferViewTask : public WebCryptoTask
 {
 protected:
   CryptoBuffer mResult;
 
--- a/dom/datastore/DataStoreDB.cpp
+++ b/dom/datastore/DataStoreDB.cpp
@@ -26,17 +26,17 @@ using namespace mozilla::dom::indexedDB;
 namespace mozilla {
 namespace dom {
 
 class VersionChangeListener MOZ_FINAL : public nsIDOMEventListener
 {
 public:
   NS_DECL_ISUPPORTS
 
-  VersionChangeListener(IDBDatabase* aDatabase)
+  explicit VersionChangeListener(IDBDatabase* aDatabase)
     : mDatabase(aDatabase)
   {}
 
   // nsIDOMEventListener
   NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent)
   {
     nsString type;
     nsresult rv = aEvent->GetType(type);
--- a/dom/devicestorage/nsDeviceStorage.cpp
+++ b/dom/devicestorage/nsDeviceStorage.cpp
@@ -1785,17 +1785,17 @@ class DeviceStorageCursorRequest MOZ_FIN
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(DeviceStorageCursorRequest,
                                            nsIContentPermissionRequest)
 
   NS_FORWARD_NSICONTENTPERMISSIONREQUEST(mCursor->);
 
-  DeviceStorageCursorRequest(nsDOMDeviceStorageCursor* aCursor)
+  explicit DeviceStorageCursorRequest(nsDOMDeviceStorageCursor* aCursor)
     : mCursor(aCursor) { }
 
 private:
   ~DeviceStorageCursorRequest() {}
 
   nsRefPtr<nsDOMDeviceStorageCursor> mCursor;
 };
 
--- a/dom/events/ContentEventHandler.h
+++ b/dom/events/ContentEventHandler.h
@@ -29,17 +29,17 @@ enum LineBreakType
  *   The platforms request some content informations, e.g., the selected text,
  *   the offset of the selected text and the text for specified range.
  *   This class answers to NS_QUERY_* events from actual contents.
  */
 
 class MOZ_STACK_CLASS ContentEventHandler
 {
 public:
-  ContentEventHandler(nsPresContext* aPresContext);
+  explicit ContentEventHandler(nsPresContext* aPresContext);
 
   // NS_QUERY_SELECTED_TEXT event handler
   nsresult OnQuerySelectedText(WidgetQueryContentEvent* aEvent);
   // NS_QUERY_TEXT_CONTENT event handler
   nsresult OnQueryTextContent(WidgetQueryContentEvent* aEvent);
   // NS_QUERY_CARET_RECT event handler
   nsresult OnQueryCaretRect(WidgetQueryContentEvent* aEvent);
   // NS_QUERY_TEXT_RECT event handler
--- a/dom/events/EventDispatcher.cpp
+++ b/dom/events/EventDispatcher.cpp
@@ -66,17 +66,17 @@ private:
 #define NS_TARGET_CHAIN_FORCE_CONTENT_DISPATCH  (1 << 0)
 #define NS_TARGET_CHAIN_WANTS_WILL_HANDLE_EVENT (1 << 1)
 #define NS_TARGET_CHAIN_MAY_HAVE_MANAGER        (1 << 2)
 
 // EventTargetChainItem represents a single item in the event target chain.
 class EventTargetChainItem
 {
 private:
-  EventTargetChainItem(EventTarget* aTarget);
+  explicit EventTargetChainItem(EventTarget* aTarget);
 public:
   EventTargetChainItem()
     : mFlags(0)
     , mItemFlags(0)
   {
   }
 
   static EventTargetChainItem* Create(nsTArray<EventTargetChainItem>& aChain,
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -3539,17 +3539,17 @@ EventStateManager::SetCursor(int32_t aCu
     aWidget->SetCursor(c);
 
   return NS_OK;
 }
 
 class MOZ_STACK_CLASS ESMEventCB : public EventDispatchingCallback
 {
 public:
-  ESMEventCB(nsIContent* aTarget) : mTarget(aTarget) {}
+  explicit ESMEventCB(nsIContent* aTarget) : mTarget(aTarget) {}
 
   virtual void HandleEvent(EventChainPostVisitor& aVisitor)
   {
     if (aVisitor.mPresContext) {
       nsIFrame* frame = aVisitor.mPresContext->GetPrimaryFrameFor(mTarget);
       if (frame) {
         frame->HandleEvent(aVisitor.mPresContext,
                            aVisitor.mEvent->AsGUIEvent(),
--- a/dom/events/IMEContentObserver.cpp
+++ b/dom/events/IMEContentObserver.cpp
@@ -381,17 +381,17 @@ IMEContentObserver::NotifySelectionChang
   }
   return NS_OK;
 }
 
 // Helper class, used for position change notification
 class PositionChangeEvent MOZ_FINAL : public nsRunnable
 {
 public:
-  PositionChangeEvent(IMEContentObserver* aDispatcher)
+  explicit PositionChangeEvent(IMEContentObserver* aDispatcher)
     : mDispatcher(aDispatcher)
   {
     MOZ_ASSERT(mDispatcher);
   }
 
   NS_IMETHOD Run()
   {
     if (mDispatcher->GetWidget()) {
@@ -1032,17 +1032,17 @@ IMEContentObserver::MaybeNotifyIMEOfPosi
 {
   mIsPositionChangeEventPending = true;
   FlushMergeableNotifications();
 }
 
 class AsyncMergeableNotificationsFlusher : public nsRunnable
 {
 public:
-  AsyncMergeableNotificationsFlusher(IMEContentObserver* aIMEContentObserver)
+  explicit AsyncMergeableNotificationsFlusher(IMEContentObserver* aIMEContentObserver)
     : mIMEContentObserver(aIMEContentObserver)
   {
     MOZ_ASSERT(mIMEContentObserver);
   }
 
   NS_IMETHOD Run()
   {
     mIMEContentObserver->FlushMergeableNotifications();
--- a/dom/events/IMEStateManager.cpp
+++ b/dom/events/IMEStateManager.cpp
@@ -741,17 +741,17 @@ IMEStateManager::GetNewIMEState(nsPresCo
      GetIMEStateEnabledName(newIMEState.mEnabled),
      GetIMEStateSetOpenName(newIMEState.mOpen)));
   return newIMEState;
 }
 
 // Helper class, used for IME enabled state change notification
 class IMEEnabledStateChangedEvent : public nsRunnable {
 public:
-  IMEEnabledStateChangedEvent(uint32_t aState)
+  explicit IMEEnabledStateChangedEvent(uint32_t aState)
     : mState(aState)
   {
   }
 
   NS_IMETHOD Run()
   {
     nsCOMPtr<nsIObserverService> observerService =
       services::GetObserverService();
--- a/dom/events/PaintRequest.h
+++ b/dom/events/PaintRequest.h
@@ -16,17 +16,17 @@ namespace mozilla {
 namespace dom {
 
 class DOMRect;
 
 class PaintRequest MOZ_FINAL : public nsIDOMPaintRequest
                              , public nsWrapperCache
 {
 public:
-  PaintRequest(nsIDOMEvent* aParent)
+  explicit PaintRequest(nsIDOMEvent* aParent)
     : mParent(aParent)
   {
     mRequest.mFlags = 0;
     SetIsDOMBinding();
   }
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(PaintRequest)
@@ -54,17 +54,17 @@ private:
   nsCOMPtr<nsIDOMEvent> mParent;
   nsInvalidateRequestList::Request mRequest;
 };
 
 class PaintRequestList MOZ_FINAL : public nsISupports,
                                    public nsWrapperCache
 {
 public:
-  PaintRequestList(nsIDOMEvent *aParent) : mParent(aParent)
+  explicit PaintRequestList(nsIDOMEvent *aParent) : mParent(aParent)
   {
     SetIsDOMBinding();
   }
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(PaintRequestList)
   
   virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
--- a/dom/filehandle/AsyncHelper.h
+++ b/dom/filehandle/AsyncHelper.h
@@ -28,17 +28,17 @@ public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIRUNNABLE
   NS_DECL_NSIREQUEST
 
   nsresult
   AsyncWork(nsIRequestObserver* aObserver, nsISupports* aCtxt);
 
 protected:
-  AsyncHelper(nsISupports* aStream)
+  explicit AsyncHelper(nsISupports* aStream)
   : mStream(aStream),
     mStatus(NS_OK)
   { }
 
   virtual ~AsyncHelper()
   { }
 
   virtual nsresult
--- a/dom/filehandle/FileHandle.cpp
+++ b/dom/filehandle/FileHandle.cpp
@@ -147,17 +147,17 @@ public:
 
   nsresult
   DoAsyncRun(nsISupports* aStream);
 
 private:
   class AsyncFlusher : public AsyncHelper
   {
   public:
-    AsyncFlusher(nsISupports* aStream)
+    explicit AsyncFlusher(nsISupports* aStream)
     : AsyncHelper(aStream)
     { }
   protected:
     nsresult
     DoStreamWork(nsISupports* aStream) MOZ_OVERRIDE;
   };
 };
 
--- a/dom/filehandle/FileHandle.h
+++ b/dom/filehandle/FileHandle.h
@@ -251,17 +251,17 @@ class FinishHelper MOZ_FINAL : public ns
 {
   friend class FileHandleBase;
 
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIRUNNABLE
 
 private:
-  FinishHelper(FileHandleBase* aFileHandle);
+  explicit FinishHelper(FileHandleBase* aFileHandle);
   ~FinishHelper()
   { }
 
   nsRefPtr<FileHandleBase> mFileHandle;
   nsTArray<nsCOMPtr<nsISupports>> mParallelStreams;
   nsCOMPtr<nsISupports> mStream;
 
   bool mAborted;
--- a/dom/filehandle/FileService.h
+++ b/dom/filehandle/FileService.h
@@ -87,17 +87,17 @@ private:
     inline nsresult
     Enqueue(FileHelper* aFileHelper);
 
     virtual void
     OnFileHelperComplete(FileHelper* aFileHelper) MOZ_OVERRIDE;
 
   private:
     inline
-    FileHandleQueue(FileHandleBase* aFileHandle);
+    explicit FileHandleQueue(FileHandleBase* aFileHandle);
 
     ~FileHandleQueue();
 
     nsresult
     ProcessQueue();
 
     ThreadSafeAutoRefCnt mRefCnt;
     NS_DECL_OWNINGTHREAD
--- a/dom/filehandle/FileStreamWrappers.cpp
+++ b/dom/filehandle/FileStreamWrappers.cpp
@@ -45,33 +45,33 @@ private:
 };
 
 class CloseRunnable MOZ_FINAL : public nsIRunnable
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIRUNNABLE
 
-  CloseRunnable(FileHelper* aFileHelper)
+  explicit CloseRunnable(FileHelper* aFileHelper)
   : mFileHelper(aFileHelper)
   { }
 
 private:
   ~CloseRunnable() {}
 
   nsRefPtr<FileHelper> mFileHelper;
 };
 
 class DestroyRunnable MOZ_FINAL : public nsIRunnable
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIRUNNABLE
 
-  DestroyRunnable(FileHelper* aFileHelper)
+  explicit DestroyRunnable(FileHelper* aFileHelper)
   : mFileHelper(aFileHelper)
   { }
 
 private:
   ~DestroyRunnable() {}
 
   nsRefPtr<FileHelper> mFileHelper;
 };
--- a/dom/filesystem/CreateFileTask.cpp
+++ b/dom/filesystem/CreateFileTask.cpp
@@ -145,17 +145,17 @@ CreateFileTask::SetSuccessRequestResult(
 }
 
 nsresult
 CreateFileTask::Work()
 {
   class AutoClose
   {
   public:
-    AutoClose(nsIOutputStream* aStream)
+    explicit AutoClose(nsIOutputStream* aStream)
       : mStream(aStream)
     {
       MOZ_ASSERT(aStream);
     }
 
     ~AutoClose()
     {
       mStream->Close();
--- a/dom/indexedDB/AsyncConnectionHelper.cpp
+++ b/dom/indexedDB/AsyncConnectionHelper.cpp
@@ -36,17 +36,17 @@ IDBTransaction* gCurrentTransaction = nu
 
 const uint32_t kProgressHandlerGranularity = 1000;
 
 class MOZ_STACK_CLASS TransactionPoolEventTarget : public StackBasedEventTarget
 {
 public:
   NS_DECL_NSIEVENTTARGET
 
-  TransactionPoolEventTarget(IDBTransaction* aTransaction)
+  explicit TransactionPoolEventTarget(IDBTransaction* aTransaction)
   : mTransaction(aTransaction)
   { }
 
 private:
   IDBTransaction* mTransaction;
 };
 
 // This inline is just so that we always clear aBuffers appropriately even if
--- a/dom/indexedDB/AsyncConnectionHelper.h
+++ b/dom/indexedDB/AsyncConnectionHelper.h
@@ -42,17 +42,17 @@ public:
                                     JS::MutableHandle<JS::Value> aVal) = 0;
 
   IDBRequest* GetRequest() const
   {
     return mRequest;
   }
 
 protected:
-  HelperBase(IDBRequest* aRequest)
+  explicit HelperBase(IDBRequest* aRequest)
     : mRequest(aRequest)
   { }
 
   virtual ~HelperBase();
 
   /**
    * Helper to wrap a native into a jsval. Uses the global object of the request
    * to parent the native.
--- a/dom/indexedDB/IDBCursor.cpp
+++ b/dom/indexedDB/IDBCursor.cpp
@@ -38,17 +38,17 @@ using mozilla::ErrorResult;
 static_assert(sizeof(size_t) >= sizeof(IDBCursor::Direction),
               "Relying on conversion between size_t and IDBCursor::Direction");
 
 namespace {
 
 class CursorHelper : public AsyncConnectionHelper
 {
 public:
-  CursorHelper(IDBCursor* aCursor)
+  explicit CursorHelper(IDBCursor* aCursor)
   : AsyncConnectionHelper(aCursor->Transaction(), aCursor->Request()),
     mCursor(aCursor), mActor(nullptr)
   {
     NS_ASSERTION(aCursor, "Null cursor!");
   }
 
   virtual void ReleaseMainThreadObjects() MOZ_OVERRIDE;
 
--- a/dom/indexedDB/IDBDatabase.cpp
+++ b/dom/indexedDB/IDBDatabase.cpp
@@ -47,17 +47,17 @@ using mozilla::ErrorResult;
 using namespace mozilla;
 using namespace mozilla::dom;
 
 namespace {
 
 class NoRequestDatabaseHelper : public AsyncConnectionHelper
 {
 public:
-  NoRequestDatabaseHelper(IDBTransaction* aTransaction)
+  explicit NoRequestDatabaseHelper(IDBTransaction* aTransaction)
   : AsyncConnectionHelper(aTransaction, nullptr)
   {
     NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
     NS_ASSERTION(aTransaction, "Null transaction!");
   }
 
   virtual ChildProcessSendResult
   SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
--- a/dom/indexedDB/IDBEvents.h
+++ b/dom/indexedDB/IDBEvents.h
@@ -129,17 +129,17 @@ public:
                         uint64_t aNewVersion)
   {
     return CreateRunnableInternal(aTarget,
                                   NS_LITERAL_STRING(BLOCKED_EVT_STR),
                                   aOldVersion, aNewVersion);
   }
 
 protected:
-  IDBVersionChangeEvent(mozilla::dom::EventTarget* aOwner)
+  explicit IDBVersionChangeEvent(mozilla::dom::EventTarget* aOwner)
     : Event(aOwner, nullptr, nullptr)
   {
     SetIsDOMBinding();
   }
   virtual ~IDBVersionChangeEvent() { }
 
   static already_AddRefed<IDBVersionChangeEvent>
   CreateInternal(mozilla::dom::EventTarget* aOwner,
--- a/dom/indexedDB/IDBFileRequest.h
+++ b/dom/indexedDB/IDBFileRequest.h
@@ -60,17 +60,17 @@ public:
   GetLockedFile() const
   {
     return GetFileHandle();
   }
 
   IMPL_EVENT_HANDLER(progress)
 
 private:
-  IDBFileRequest(nsPIDOMWindow* aWindow);
+  explicit IDBFileRequest(nsPIDOMWindow* aWindow);
   ~IDBFileRequest();
 
   void
   FireProgressEvent(uint64_t aLoaded, uint64_t aTotal);
 
   nsRefPtr<IDBFileHandle> mFileHandle;
 
   bool mWrapAsDOMRequest;
--- a/dom/indexedDB/TransactionThreadPool.cpp
+++ b/dom/indexedDB/TransactionThreadPool.cpp
@@ -451,17 +451,17 @@ TransactionThreadPool::AbortTransactions
     // errors.
     ErrorResult rv;
     transactions[index]->Abort(rv);
   }
 }
 
 struct MOZ_STACK_CLASS TransactionSearchInfo
 {
-  TransactionSearchInfo(nsIOfflineStorage* aDatabase)
+  explicit TransactionSearchInfo(nsIOfflineStorage* aDatabase)
     : db(aDatabase), found(false)
   {
   }
 
   nsIOfflineStorage* db;
   bool found;
 };
 
--- a/dom/indexedDB/TransactionThreadPool.h
+++ b/dom/indexedDB/TransactionThreadPool.h
@@ -57,17 +57,17 @@ public:
 
 protected:
   class TransactionQueue MOZ_FINAL : public nsIRunnable
   {
   public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIRUNNABLE
 
-    TransactionQueue(IDBTransaction* aTransaction);
+    explicit TransactionQueue(IDBTransaction* aTransaction);
 
     void Unblock();
 
     void Dispatch(nsIRunnable* aRunnable);
 
     void Finish(nsIRunnable* aFinishRunnable);
 
   private:
@@ -79,17 +79,17 @@ protected:
     nsCOMPtr<nsIRunnable> mFinishRunnable;
     bool mShouldFinish;
   };
 
   friend class TransactionQueue;
 
   struct TransactionInfo
   {
-    TransactionInfo(IDBTransaction* aTransaction)
+    explicit TransactionInfo(IDBTransaction* aTransaction)
     {
       MOZ_COUNT_CTOR(TransactionInfo);
 
       transaction = aTransaction;
       queue = new TransactionQueue(aTransaction);
     }
 
     ~TransactionInfo()
--- a/dom/indexedDB/ipc/IndexedDBChild.cpp
+++ b/dom/indexedDB/ipc/IndexedDBChild.cpp
@@ -98,17 +98,17 @@ public:
 
   virtual nsresult
   GetSuccessResult(JSContext* aCx, JS::MutableHandle<JS::Value> aVal) MOZ_OVERRIDE;
 };
 
 class IPCDeleteDatabaseHelper : public AsyncConnectionHelper
 {
 public:
-  IPCDeleteDatabaseHelper(IDBRequest* aRequest)
+  explicit IPCDeleteDatabaseHelper(IDBRequest* aRequest)
   : AsyncConnectionHelper(static_cast<IDBDatabase*>(nullptr), aRequest)
   { }
 
   virtual nsresult UnpackResponseFromParentProcess(
                                             const ResponseValue& aResponseValue)
                                             MOZ_OVERRIDE;
 
   virtual ChildProcessSendResult
--- a/dom/mobilemessage/DeletedMessageInfo.h
+++ b/dom/mobilemessage/DeletedMessageInfo.h
@@ -16,17 +16,17 @@ namespace dom {
 namespace mobilemessage {
 
 class DeletedMessageInfo MOZ_FINAL : public nsIDeletedMessageInfo
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDELETEDMESSAGEINFO
 
-  DeletedMessageInfo(const DeletedMessageInfoData& aData);
+  explicit DeletedMessageInfo(const DeletedMessageInfoData& aData);
 
   DeletedMessageInfo(int32_t* aMessageIds,
                      uint32_t aMsgCount,
                      uint64_t* aThreadIds,
                      uint32_t  aThreadCount);
 
   static nsresult Create(int32_t* aMessageIds,
                          uint32_t aMsgCount,
--- a/dom/mobilemessage/MmsMessage.h
+++ b/dom/mobilemessage/MmsMessage.h
@@ -53,17 +53,17 @@ public:
              uint64_t aSentTimestamp,
              bool aRead,
              const nsAString& aSubject,
              const nsAString& aSmil,
              const nsTArray<Attachment>& aAttachments,
              uint64_t aExpiryDate,
              bool aReadReportRequested);
 
-  MmsMessage(const mobilemessage::MmsMessageData& aData);
+  explicit MmsMessage(const mobilemessage::MmsMessageData& aData);
 
   static nsresult Create(int32_t aId,
                          uint64_t aThreadId,
                          const nsAString& aIccId,
                          const nsAString& aDelivery,
                          const JS::Value& aDeliveryInfo,
                          const nsAString& aSender,
                          const JS::Value& aReceivers,
--- a/dom/mobilemessage/MobileMessageCallback.h
+++ b/dom/mobilemessage/MobileMessageCallback.h
@@ -17,17 +17,17 @@ namespace dom {
 namespace mobilemessage {
 
 class MobileMessageCallback MOZ_FINAL : public nsIMobileMessageCallback
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMOBILEMESSAGECALLBACK
 
-  MobileMessageCallback(DOMRequest* aDOMRequest);
+  explicit MobileMessageCallback(DOMRequest* aDOMRequest);
 
 private:
   ~MobileMessageCallback();
 
   nsRefPtr<DOMRequest> mDOMRequest;
 
   nsresult NotifySuccess(JS::Handle<JS::Value> aResult, bool aAsync = false);
   nsresult NotifySuccess(nsISupports *aMessage, bool aAsync = false);
--- a/dom/mobilemessage/MobileMessageThread.h
+++ b/dom/mobilemessage/MobileMessageThread.h
@@ -26,17 +26,17 @@ public:
   MobileMessageThread(uint64_t aId,
                       const nsTArray<nsString>& aParticipants,
                       uint64_t aTimestamp,
                       const nsString& aLastMessageSubject,
                       const nsString& aBody,
                       uint64_t aUnreadCount,
                       mobilemessage::MessageType aLastMessageType);
 
-  MobileMessageThread(const ThreadData& aData);
+  explicit MobileMessageThread(const ThreadData& aData);
 
   static nsresult Create(uint64_t aId,
                          const JS::Value& aParticipants,
                          uint64_t aTimestamp,
                          const nsAString& aLastMessageSubject,
                          const nsAString& aBody,
                          uint64_t aUnreadCount,
                          const nsAString& aLastMessageType,
--- a/dom/mobilemessage/SmsMessage.h
+++ b/dom/mobilemessage/SmsMessage.h
@@ -30,17 +30,17 @@ public:
              const nsString& aReceiver,
              const nsString& aBody,
              mobilemessage::MessageClass aMessageClass,
              uint64_t aTimestamp,
              uint64_t aSentTimestamp,
              uint64_t aDeliveryTimestamp,
              bool aRead);
 
-  SmsMessage(const mobilemessage::SmsMessageData& aData);
+  explicit SmsMessage(const mobilemessage::SmsMessageData& aData);
 
   static nsresult Create(int32_t aId,
                          uint64_t aThreadId,
                          const nsAString& aIccId,
                          const nsAString& aDelivery,
                          const nsAString& aDeliveryStatus,
                          const nsAString& aSender,
                          const nsAString& aReceiver,
--- a/dom/network/UDPSocket.cpp
+++ b/dom/network/UDPSocket.cpp
@@ -492,17 +492,17 @@ UDPSocket::Init(const nsString& aLocalAd
   mClosed = Promise::Create(global, rv);
   if (NS_WARN_IF(rv.Failed())) {
     return rv.ErrorCode();
   }
 
   class OpenSocketRunnable MOZ_FINAL : public nsRunnable
   {
   public:
-    OpenSocketRunnable(UDPSocket* aSocket) : mSocket(aSocket)
+    explicit OpenSocketRunnable(UDPSocket* aSocket) : mSocket(aSocket)
     { }
 
     NS_IMETHOD Run() MOZ_OVERRIDE
     {
       MOZ_ASSERT(mSocket);
 
       if (mSocket->mReadyState != SocketReadyState::Opening) {
         return NS_OK;
--- a/dom/notification/DesktopNotification.cpp
+++ b/dom/notification/DesktopNotification.cpp
@@ -28,18 +28,18 @@ class DesktopNotificationRequest : publi
   virtual ~DesktopNotificationRequest()
   {
   }
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSICONTENTPERMISSIONREQUEST
 
-  DesktopNotificationRequest(DesktopNotification* notification)
-    : mDesktopNotification(notification) {}
+  explicit DesktopNotificationRequest(DesktopNotification* aNotification)
+    : mDesktopNotification(aNotification) {}
 
   NS_IMETHOD Run() MOZ_OVERRIDE
   {
     nsCOMPtr<nsPIDOMWindow> window = mDesktopNotification->GetOwner();
     nsContentPermissionUtils::AskPermission(this, window);
     return NS_OK;
   }
 
--- a/dom/notification/Notification.cpp
+++ b/dom/notification/Notification.cpp
@@ -179,17 +179,17 @@ protected:
 };
 
 class NotificationObserver : public nsIObserver
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIOBSERVER
 
-  NotificationObserver(Notification* aNotification)
+  explicit NotificationObserver(Notification* aNotification)
     : mNotification(aNotification) {}
 
 protected:
   virtual ~NotificationObserver() {}
 
   nsRefPtr<Notification> mNotification;
 };
 
--- a/dom/plugins/base/nsJSNPRuntime.cpp
+++ b/dom/plugins/base/nsJSNPRuntime.cpp
@@ -96,18 +96,18 @@ NPObjectIsOutOfProcessProxy(NPObject *ob
 } // anonymous namespace
 
 // Helper class that reports any JS exceptions that were thrown while
 // the plugin executed JS.
 
 class AutoJSExceptionReporter
 {
 public:
-  AutoJSExceptionReporter(JSContext *cx)
-    : mCx(cx)
+  explicit AutoJSExceptionReporter(JSContext* aCx)
+    : mCx(aCx)
   {
   }
 
   ~AutoJSExceptionReporter()
   {
     JS_ReportPendingException(mCx);
   }
 
--- a/dom/plugins/base/nsNPAPIPlugin.h
+++ b/dom/plugins/base/nsNPAPIPlugin.h
@@ -375,23 +375,23 @@ protected:
 // the PluginDestructionGuard class to avoid having to keep two
 // separate objects on the stack since we always want a
 // PluginDestructionGuard where we use an NPPAutoPusher.
 
 class MOZ_STACK_CLASS NPPAutoPusher : public NPPStack,
                                       protected PluginDestructionGuard
 {
 public:
-  NPPAutoPusher(NPP npp)
-    : PluginDestructionGuard(npp),
+  explicit NPPAutoPusher(NPP aNpp)
+    : PluginDestructionGuard(aNpp),
       mOldNPP(sCurrentNPP)
   {
-    NS_ASSERTION(npp, "Uh, null npp passed to NPPAutoPusher!");
+    NS_ASSERTION(aNpp, "Uh, null aNpp passed to NPPAutoPusher!");
 
-    sCurrentNPP = npp;
+    sCurrentNPP = aNpp;
   }
 
   ~NPPAutoPusher()
   {
     sCurrentNPP = mOldNPP;
   }
 
 private:
--- a/dom/plugins/base/nsNPAPIPluginInstance.cpp
+++ b/dom/plugins/base/nsNPAPIPluginInstance.cpp
@@ -1148,17 +1148,17 @@ nsNPAPIPluginInstance::IsWindowless(bool
   *isWindowless = mWindowless;
 #endif
   return NS_OK;
 }
 
 class MOZ_STACK_CLASS AutoPluginLibraryCall
 {
 public:
-  AutoPluginLibraryCall(nsNPAPIPluginInstance* aThis)
+  explicit AutoPluginLibraryCall(nsNPAPIPluginInstance* aThis)
     : mThis(aThis), mGuard(aThis), mLibrary(nullptr)
   {
     nsNPAPIPlugin* plugin = mThis->GetPlugin();
     if (plugin)
       mLibrary = plugin->GetLibrary();
   }
   operator bool() { return !!mLibrary; }
   PluginLibrary* operator->() { return mLibrary; }
@@ -1664,17 +1664,17 @@ nsNPAPIPluginInstance::SetCurrentAsyncSu
   if (mOwner)
     mOwner->SetCurrentAsyncSurface(surface, changed);
 }
 
 class CarbonEventModelFailureEvent : public nsRunnable {
 public:
   nsCOMPtr<nsIContent> mContent;
 
-  CarbonEventModelFailureEvent(nsIContent* aContent)
+  explicit CarbonEventModelFailureEvent(nsIContent* aContent)
     : mContent(aContent)
   {}
 
   ~CarbonEventModelFailureEvent() {}
 
   NS_IMETHOD Run();
 };
 
--- a/dom/plugins/base/nsPluginHost.cpp
+++ b/dom/plugins/base/nsPluginHost.cpp
@@ -3629,17 +3629,17 @@ nsPluginHost::DestroyRunningInstances(ns
 }
 
 // Runnable that does an async destroy of a plugin.
 
 class nsPluginDestroyRunnable : public nsRunnable,
                                 public PRCList
 {
 public:
-  nsPluginDestroyRunnable(nsNPAPIPluginInstance *aInstance)
+  explicit nsPluginDestroyRunnable(nsNPAPIPluginInstance *aInstance)
     : mInstance(aInstance)
   {
     PR_INIT_CLIST(this);
     PR_APPEND_LINK(this, &sRunnableListHead);
   }
 
   virtual ~nsPluginDestroyRunnable()
   {
--- a/dom/plugins/base/nsPluginInstanceOwner.cpp
+++ b/dom/plugins/base/nsPluginInstanceOwner.cpp
@@ -97,17 +97,17 @@ using namespace mozilla::layers;
 // special class for handeling DOM context menu events because for
 // some reason it starves other mouse events if implemented on the
 // same class
 class nsPluginDOMContextMenuListener : public nsIDOMEventListener
 {
   virtual ~nsPluginDOMContextMenuListener();
 
 public:
-  nsPluginDOMContextMenuListener(nsIContent* aContent);
+  explicit nsPluginDOMContextMenuListener(nsIContent* aContent);
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDOMEVENTLISTENER
 
   void Destroy(nsIContent* aContent);
 
   nsEventStatus ProcessEvent(const WidgetGUIEvent& anEvent)
   {
--- a/dom/plugins/base/nsPluginStreamListenerPeer.cpp
+++ b/dom/plugins/base/nsPluginStreamListenerPeer.cpp
@@ -33,17 +33,17 @@
 
 // nsPluginByteRangeStreamListener
 
 class nsPluginByteRangeStreamListener
   : public nsIStreamListener
   , public nsIInterfaceRequestor
 {
 public:
-  nsPluginByteRangeStreamListener(nsIWeakReference* aWeakPtr);
+  explicit nsPluginByteRangeStreamListener(nsIWeakReference* aWeakPtr);
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
   NS_DECL_NSIINTERFACEREQUESTOR
 
 private:
   virtual ~nsPluginByteRangeStreamListener();
--- a/dom/plugins/base/nsPluginStreamListenerPeer.h
+++ b/dom/plugins/base/nsPluginStreamListenerPeer.h
@@ -25,17 +25,17 @@ class nsIChannel;
  * When a plugin requests opens multiple requests to the same URL and
  * the request must be satified by saving a file to disk, each stream
  * listener holds a reference to the backing file: the file is only removed
  * when all the listeners are done.
  */
 class CachedFileHolder
 {
 public:
-  CachedFileHolder(nsIFile* cacheFile);
+  explicit CachedFileHolder(nsIFile* cacheFile);
   ~CachedFileHolder();
 
   void AddRef();
   void Release();
 
   nsIFile* file() const { return mFile; }
 
 private:
--- a/dom/plugins/base/nsPluginsDirDarwin.cpp
+++ b/dom/plugins/base/nsPluginsDirDarwin.cpp
@@ -112,19 +112,19 @@ static char* CFStringRefToUTF8Buffer(CFS
 
   newBuffer = static_cast<char*>(NS_Realloc(newBuffer,
                                             strlen(newBuffer) + 1));
   return newBuffer;
 }
 
 class AutoCFTypeObject {
 public:
-  AutoCFTypeObject(CFTypeRef object)
+  explicit AutoCFTypeObject(CFTypeRef aObject)
   {
-    mObject = object;
+    mObject = aObject;
   }
   ~AutoCFTypeObject()
   {
     ::CFRelease(mObject);
   }
 private:
   CFTypeRef mObject;
 };
--- a/dom/plugins/ipc/PluginBackgroundDestroyer.h
+++ b/dom/plugins/ipc/PluginBackgroundDestroyer.h
@@ -20,17 +20,17 @@ namespace plugins {
 
 /**
  * When instances of this class are destroyed, the old background goes
  * along with them, completing the destruction process (whether or not
  * the plugin stayed alive long enough to ack).
  */
 class PluginBackgroundDestroyerParent : public PPluginBackgroundDestroyerParent {
 public:
-    PluginBackgroundDestroyerParent(gfxASurface* aDyingBackground);
+    explicit PluginBackgroundDestroyerParent(gfxASurface* aDyingBackground);
 
     virtual ~PluginBackgroundDestroyerParent();
 
 private:
     virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 
     nsRefPtr<gfxASurface> mDyingBackground;
 };
--- a/dom/plugins/ipc/PluginInstanceParent.cpp
+++ b/dom/plugins/ipc/PluginInstanceParent.cpp
@@ -344,17 +344,17 @@ PluginInstanceParent::AnswerNPN_SetValue
     *result = mNPNIface->setvalue(mNPP, NPPVpluginUsesDOMForCursorBool,
                                   (void*)(intptr_t)useDOMForCursor);
     return true;
 }
 
 class NotificationSink : public CompositionNotifySink
 {
 public:
-  NotificationSink(PluginInstanceParent *aInstance) : mInstance(aInstance)
+  explicit NotificationSink(PluginInstanceParent* aInstance) : mInstance(aInstance)
   { }
 
   virtual void DidComposite() { mInstance->DidComposite(); }
 private:
   PluginInstanceParent *mInstance;
 };
 
 bool
--- a/dom/plugins/ipc/PluginInterposeOSX.mm
+++ b/dom/plugins/ipc/PluginInterposeOSX.mm
@@ -738,20 +738,20 @@ void NotifyBrowserOfPopCursor()
   if (pmc) {
     pmc->PopCursor();
   }
 }
 
 struct WindowInfo {
   uint32_t window_id;
   CGRect bounds;
-  WindowInfo(NSWindow* window) {
-    NSInteger window_num = [window windowNumber];
+  explicit WindowInfo(NSWindow* aWindow) {
+    NSInteger window_num = [aWindow windowNumber];
     window_id = window_num > 0 ? window_num : 0;
-    bounds = NSRectToCGRect([window frame]);
+    bounds = NSRectToCGRect([aWindow frame]);
   }
 };
 
 static void OnPluginWindowClosed(const WindowInfo& window_info) {
   if (window_info.window_id == 0)
     return;
   mac_plugin_interposing::child::NotifyBrowserOfPluginHideWindow(window_info.window_id,
                                                                  window_info.bounds);
--- a/dom/plugins/ipc/PluginModuleParent.h
+++ b/dom/plugins/ipc/PluginModuleParent.h
@@ -82,17 +82,17 @@ protected:
                                const InfallibleTArray<nsCString>& aValues,
                                NPError* rv) MOZ_OVERRIDE;
 
     virtual bool
     DeallocPPluginInstanceParent(PPluginInstanceParent* aActor) MOZ_OVERRIDE;
 
 public:
     // aFilePath is UTF8, not native!
-    PluginModuleParent(const char* aFilePath);
+    explicit PluginModuleParent(const char* aFilePath);
     virtual ~PluginModuleParent();
 
     virtual void SetPlugin(nsNPAPIPlugin* plugin) MOZ_OVERRIDE
     {
         mPlugin = plugin;
     }
 
     virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
--- a/dom/plugins/ipc/PluginProcessChild.h
+++ b/dom/plugins/ipc/PluginProcessChild.h
@@ -14,17 +14,17 @@ namespace mozilla {
 namespace plugins {
 //-----------------------------------------------------------------------------
 
 class PluginProcessChild : public mozilla::ipc::ProcessChild {
 protected:
     typedef mozilla::ipc::ProcessChild ProcessChild;
 
 public:
-    PluginProcessChild(ProcessHandle parentHandle) : ProcessChild(parentHandle)
+    explicit PluginProcessChild(ProcessHandle aParentHandle) : ProcessChild(aParentHandle)
     { }
 
     virtual ~PluginProcessChild()
     { }
 
     virtual bool Init() MOZ_OVERRIDE;
     virtual void CleanUp() MOZ_OVERRIDE;
 
--- a/dom/plugins/ipc/PluginProcessParent.h
+++ b/dom/plugins/ipc/PluginProcessParent.h
@@ -20,17 +20,17 @@
 
 namespace mozilla {
 namespace plugins {
 //-----------------------------------------------------------------------------
 
 class PluginProcessParent : public mozilla::ipc::GeckoChildProcessHost
 {
 public:
-    PluginProcessParent(const std::string& aPluginFilePath);
+    explicit PluginProcessParent(const std::string& aPluginFilePath);
     ~PluginProcessParent();
 
     /**
      * Synchronously launch the plugin process. If the process fails to launch
      * after timeoutMs, this method will return false.
      */
     bool Launch(int32_t timeoutMs);
 
--- a/dom/plugins/ipc/PluginScriptableObjectParent.h
+++ b/dom/plugins/ipc/PluginScriptableObjectParent.h
@@ -31,17 +31,17 @@ struct ParentNPObject : NPObject
   bool invalidated;
 };
 
 class PluginScriptableObjectParent : public PPluginScriptableObjectParent
 {
   friend class PluginInstanceParent;
 
 public:
-  PluginScriptableObjectParent(ScriptableObjectType aType);
+  explicit PluginScriptableObjectParent(ScriptableObjectType aType);
   virtual ~PluginScriptableObjectParent();
 
   void
   InitializeProxy();
 
   void
   InitializeLocal(NPObject* aObject);
 
--- a/dom/plugins/ipc/PluginScriptableObjectUtils.h
+++ b/dom/plugins/ipc/PluginScriptableObjectUtils.h
@@ -253,17 +253,17 @@ struct ProtectedActorTraits
 {
   static bool Nullable();
 };
 
 template<class ActorType, class Traits=ProtectedActorTraits<ActorType> >
 class ProtectedActor
 {
 public:
-  ProtectedActor(ActorType* aActor) : mActor(aActor)
+  explicit ProtectedActor(ActorType* aActor) : mActor(aActor)
   {
     if (!Traits::Nullable()) {
       NS_ASSERTION(mActor, "This should never be null!");
     }
   }
 
   ~ProtectedActor()
   {
--- a/dom/promise/Promise.cpp
+++ b/dom/promise/Promise.cpp
@@ -36,17 +36,17 @@ using namespace workers;
 NS_IMPL_ISUPPORTS0(PromiseNativeHandler)
 
 // PromiseTask
 
 // This class processes the promise's callbacks with promise's result.
 class PromiseTask MOZ_FINAL : public nsRunnable
 {
 public:
-  PromiseTask(Promise* aPromise)
+  explicit PromiseTask(Promise* aPromise)
     : mPromise(aPromise)
   {
     MOZ_ASSERT(aPromise);
     MOZ_COUNT_CTOR(PromiseTask);
   }
 
 protected:
   ~PromiseTask()
--- a/dom/quota/QuotaManager.cpp
+++ b/dom/quota/QuotaManager.cpp
@@ -336,17 +336,17 @@ class ResetOrClearRunnable MOZ_FINAL : p
 
     // Running on the main thread after all work is done.
     Complete
   };
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
-  ResetOrClearRunnable(bool aClear)
+  explicit ResetOrClearRunnable(bool aClear)
   : mCallbackState(Pending),
     mClear(aClear)
   { }
 
   NS_IMETHOD
   Run();
 
   // AcquireListener override
@@ -407,17 +407,17 @@ class FinalizeOriginEvictionRunnable MOZ
     // Running on the IO thread.
     IO,
 
     // Running on the main thread after IO work is done.
     Complete
   };
 
 public:
-  FinalizeOriginEvictionRunnable(nsTArray<nsCString>& aOrigins)
+  explicit FinalizeOriginEvictionRunnable(nsTArray<nsCString>& aOrigins)
   : mCallbackState(Pending)
   {
     mOrigins.SwapElements(aOrigins);
   }
 
   NS_IMETHOD
   Run();
 
@@ -499,17 +499,17 @@ uint32_t gChunkSizeKB = kDefaultChunkSiz
 
 bool gTestingEnabled = false;
 
 // A callback runnable used by the TransactionPool when it's safe to proceed
 // with a SetVersion/DeleteDatabase/etc.
 class WaitForTransactionsToFinishRunnable MOZ_FINAL : public nsRunnable
 {
 public:
-  WaitForTransactionsToFinishRunnable(SynchronizedOp* aOp)
+  explicit WaitForTransactionsToFinishRunnable(SynchronizedOp* aOp)
   : mOp(aOp), mCountdown(1)
   {
     NS_ASSERTION(mOp, "Why don't we have a runnable?");
     NS_ASSERTION(mOp->mStorages.IsEmpty(), "We're here too early!");
     NS_ASSERTION(mOp->mListener,
                  "What are we supposed to do when we're done?");
     NS_ASSERTION(mCountdown, "Wrong countdown!");
   }
--- a/dom/quota/StorageMatcher.h
+++ b/dom/quota/StorageMatcher.h
@@ -16,17 +16,17 @@ BEGIN_QUOTA_NAMESPACE
 
 template <class ValueType, class BaseType = ArrayCluster<nsIOfflineStorage*> >
 class StorageMatcher : public ValueType
 {
   typedef StorageMatcher<ValueType, BaseType> SelfType;
 
   struct Closure
   {
-    Closure(SelfType& aSelf)
+    explicit Closure(SelfType& aSelf)
     : mSelf(aSelf), mPattern(EmptyCString()), mIndexes(nullptr)
     { }
 
     Closure(SelfType& aSelf, const nsACString& aPattern)
     : mSelf(aSelf), mPattern(aPattern), mIndexes(nullptr)
     { }
 
     Closure(SelfType& aSelf, const nsTArray<uint32_t>* aIndexes)
--- a/dom/smil/nsSMILTimedElement.cpp
+++ b/dom/smil/nsSMILTimedElement.cpp
@@ -117,17 +117,17 @@ namespace
 // destroyed.
 //
 // If several of these objects are allocated on the stack, the update will not
 // be performed until the last object for a given nsSMILTimedElement is
 // destroyed.
 class MOZ_STACK_CLASS nsSMILTimedElement::AutoIntervalUpdateBatcher
 {
 public:
-  AutoIntervalUpdateBatcher(nsSMILTimedElement& aTimedElement)
+  explicit AutoIntervalUpdateBatcher(nsSMILTimedElement& aTimedElement)
     : mTimedElement(aTimedElement),
       mDidSetFlag(!aTimedElement.mDeferIntervalUpdates)
   {
     mTimedElement.mDeferIntervalUpdates = true;
   }
 
   ~AutoIntervalUpdateBatcher()
   {
@@ -155,17 +155,17 @@ private:
 // case of early returns (e.g. due to parse errors).
 //
 // This can be safely used in conjunction with AutoIntervalUpdateBatcher; any
 // calls to UpdateCurrentInterval made by this class will simply be deferred if
 // there is an AutoIntervalUpdateBatcher on the stack.
 class MOZ_STACK_CLASS nsSMILTimedElement::AutoIntervalUpdater
 {
 public:
-  AutoIntervalUpdater(nsSMILTimedElement& aTimedElement)
+  explicit AutoIntervalUpdater(nsSMILTimedElement& aTimedElement)
     : mTimedElement(aTimedElement) { }
 
   ~AutoIntervalUpdater()
   {
     mTimedElement.UpdateCurrentInterval();
   }
 
 private:
@@ -466,17 +466,17 @@ nsSMILTimedElement::RemoveInstanceTime(n
   UpdateCurrentInterval();
 }
 
 namespace
 {
   class MOZ_STACK_CLASS RemoveByCreator
   {
   public:
-    RemoveByCreator(const nsSMILTimeValueSpec* aCreator) : mCreator(aCreator)
+    explicit RemoveByCreator(const nsSMILTimeValueSpec* aCreator) : mCreator(aCreator)
     { }
 
     bool operator()(nsSMILInstanceTime* aInstanceTime, uint32_t /*aIndex*/)
     {
       if (aInstanceTime->GetCreator() != mCreator)
         return false;
 
       // If the instance time should be kept (because it is or was the fixed end
@@ -1333,17 +1333,17 @@ namespace
 {
   // Adaptor functor for RemoveInstanceTimes that allows us to use function
   // pointers instead.
   // Without this we'd have to either templatize ClearSpecs and all its callers
   // or pass bool flags around to specify which removal function to use here.
   class MOZ_STACK_CLASS RemoveByFunction
   {
   public:
-    RemoveByFunction(nsSMILTimedElement::RemovalTestFunction aFunction)
+    explicit RemoveByFunction(nsSMILTimedElement::RemovalTestFunction aFunction)
       : mFunction(aFunction) { }
     bool operator()(nsSMILInstanceTime* aInstanceTime, uint32_t /*aIndex*/)
     {
       return mFunction(aInstanceTime);
     }
 
   private:
     nsSMILTimedElement::RemovalTestFunction mFunction;
@@ -1411,17 +1411,17 @@ nsSMILTimedElement::ApplyEarlyEnd(const 
   return updated;
 }
 
 namespace
 {
   class MOZ_STACK_CLASS RemoveReset
   {
   public:
-    RemoveReset(const nsSMILInstanceTime* aCurrentIntervalBegin)
+    explicit RemoveReset(const nsSMILInstanceTime* aCurrentIntervalBegin)
       : mCurrentIntervalBegin(aCurrentIntervalBegin) { }
     bool operator()(nsSMILInstanceTime* aInstanceTime, uint32_t /*aIndex*/)
     {
       // SMIL 3.0 section 5.4.3, 'Resetting element state':
       //   Any instance times associated with past Event-values, Repeat-values,
       //   Accesskey-values or added via DOM method calls are removed from the
       //   dependent begin and end instance times lists. In effect, all events
       //   and DOM methods calls in the past are cleared. This does not apply to
@@ -1609,17 +1609,17 @@ nsSMILTimedElement::FilterIntervals()
   mOldIntervals.SwapElements(filteredList);
 }
 
 namespace
 {
   class MOZ_STACK_CLASS RemoveFiltered
   {
   public:
-    RemoveFiltered(nsSMILTimeValue aCutoff) : mCutoff(aCutoff) { }
+    explicit RemoveFiltered(nsSMILTimeValue aCutoff) : mCutoff(aCutoff) { }
     bool operator()(nsSMILInstanceTime* aInstanceTime, uint32_t /*aIndex*/)
     {
       // We can filter instance times that:
       // a) Precede the end point of the previous interval; AND
       // b) Are NOT syncbase times that might be updated to a time after the end
       //    point of the previous interval; AND
       // c) Are NOT fixed end points in any remaining interval.
       return aInstanceTime->Time() < mCutoff &&
--- a/dom/telephony/CallsList.h
+++ b/dom/telephony/CallsList.h
@@ -19,17 +19,17 @@ class CallsList MOZ_FINAL : public nsISu
 {
   nsRefPtr<Telephony> mTelephony;
   nsRefPtr<TelephonyCallGroup> mGroup;
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CallsList)
 
-  CallsList(Telephony* aTelephony, TelephonyCallGroup* aGroup = nullptr);
+  explicit CallsList(Telephony* aTelephony, TelephonyCallGroup* aGroup = nullptr);
 
   nsPIDOMWindow*
   GetParentObject() const;
 
   // WrapperCache
   virtual JSObject*
   WrapObject(JSContext* aCx) MOZ_OVERRIDE;
 
--- a/dom/telephony/Telephony.cpp
+++ b/dom/telephony/Telephony.cpp
@@ -34,17 +34,17 @@ class Telephony::Listener : public nsITe
   Telephony* mTelephony;
 
   virtual ~Listener() {}
 
 public:
   NS_DECL_ISUPPORTS
   NS_FORWARD_SAFE_NSITELEPHONYLISTENER(mTelephony)
 
-  Listener(Telephony* aTelephony)
+  explicit Listener(Telephony* aTelephony)
     : mTelephony(aTelephony)
   {
     MOZ_ASSERT(mTelephony);
   }
 
   void
   Disconnect()
   {
--- a/dom/telephony/ipc/TelephonyChild.h
+++ b/dom/telephony/ipc/TelephonyChild.h
@@ -13,17 +13,17 @@
 
 BEGIN_TELEPHONY_NAMESPACE
 
 class TelephonyIPCService;
 
 class TelephonyChild : public PTelephonyChild
 {
 public:
-  TelephonyChild(TelephonyIPCService* aService);
+  explicit TelephonyChild(TelephonyIPCService* aService);
 
 protected:
   virtual ~TelephonyChild();
 
   virtual void
   ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
 
   virtual PTelephonyRequestChild*
--- a/dom/workers/DataStore.h
+++ b/dom/workers/DataStore.h
@@ -28,17 +28,17 @@ class DataStoreChangeEventProxy;
 class WorkerDataStoreCursor;
 class WorkerGlobalScope;
 
 class WorkerDataStore MOZ_FINAL : public DOMEventTargetHelper
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
-  WorkerDataStore(WorkerGlobalScope* aScope);
+  explicit WorkerDataStore(WorkerGlobalScope* aScope);
 
   // WebIDL (internal functions)
 
   static already_AddRefed<WorkerDataStore> Constructor(GlobalObject& aGlobal,
                                                        ErrorResult& aRv);
 
   virtual JSObject* WrapObject(JSContext *aCx) MOZ_OVERRIDE;
 
@@ -132,9 +132,9 @@ private:
   // Ensure the worker and the main thread won't race to access |mCleanedUp|.
   Mutex mCleanUpLock;
 };
 
 } //namespace workers
 } //namespace dom
 } //namespace mozilla
 
-#endif
\ No newline at end of file
+#endif
--- a/dom/workers/DataStoreCursor.h
+++ b/dom/workers/DataStoreCursor.h
@@ -23,17 +23,17 @@ namespace workers {
 class WorkerDataStore;
 
 class WorkerDataStoreCursor MOZ_FINAL
 {
 public:
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(WorkerDataStoreCursor)
   NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(WorkerDataStoreCursor)
 
-  WorkerDataStoreCursor(WorkerDataStore* aWorkerStore);
+  explicit WorkerDataStoreCursor(WorkerDataStore* aWorkerStore);
 
   // WebIDL (internal functions)
 
   static already_AddRefed<WorkerDataStoreCursor> Constructor(GlobalObject& aGlobal,
                                                              ErrorResult& aRv);
 
   JSObject* WrapObject(JSContext *aCx);
 
@@ -60,9 +60,9 @@ private:
   // Keep track of the WorkerDataStore which owns this WorkerDataStoreCursor.
   nsRefPtr<WorkerDataStore> mWorkerStore;
 };
 
 } //namespace workers
 } //namespace dom
 } //namespace mozilla
 
-#endif
\ No newline at end of file
+#endif
--- a/dom/workers/Performance.h
+++ b/dom/workers/Performance.h
@@ -17,17 +17,17 @@ BEGIN_WORKERS_NAMESPACE
 class WorkerPrivate;
 
 class Performance MOZ_FINAL : public nsWrapperCache
 {
 public:
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(Performance)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(Performance)
 
-  Performance(WorkerPrivate* aWorkerPrivate);
+  explicit Performance(WorkerPrivate* aWorkerPrivate);
 
 private:
   ~Performance();
 
   WorkerPrivate* mWorkerPrivate;
 
 public:
   virtual JSObject*
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -913,17 +913,17 @@ private:
 };
 
 class WorkerBackgroundChildCallback MOZ_FINAL :
   public nsIIPCBackgroundChildCreateCallback
 {
   bool* mDone;
 
 public:
-  WorkerBackgroundChildCallback(bool* aDone)
+  explicit WorkerBackgroundChildCallback(bool* aDone)
   : mDone(aDone)
   {
     MOZ_ASSERT(!NS_IsMainThread());
     MOZ_ASSERT(mDone);
   }
 
   NS_DECL_ISUPPORTS
 
@@ -950,17 +950,17 @@ class WorkerThreadPrimaryRunnable MOZ_FI
   nsRefPtr<RuntimeService::WorkerThread> mThread;
   JSRuntime* mParentRuntime;
 
   class FinishedRunnable MOZ_FINAL : public nsRunnable
   {
     nsRefPtr<RuntimeService::WorkerThread> mThread;
 
   public:
-    FinishedRunnable(already_AddRefed<RuntimeService::WorkerThread> aThread)
+    explicit FinishedRunnable(already_AddRefed<RuntimeService::WorkerThread> aThread)
     : mThread(aThread)
     {
       MOZ_ASSERT(mThread);
     }
 
     NS_DECL_ISUPPORTS_INHERITED
 
   private:
@@ -1029,17 +1029,17 @@ private:
 
 class RuntimeService::WorkerThread MOZ_FINAL : public nsThread
 {
   class Observer MOZ_FINAL : public nsIThreadObserver
   {
     WorkerPrivate* mWorkerPrivate;
 
   public:
-    Observer(WorkerPrivate* aWorkerPrivate)
+    explicit Observer(WorkerPrivate* aWorkerPrivate)
     : mWorkerPrivate(aWorkerPrivate)
     {
       MOZ_ASSERT(aWorkerPrivate);
       aWorkerPrivate->AssertIsOnWorkerThread();
     }
 
     NS_DECL_THREADSAFE_ISUPPORTS
 
--- a/dom/workers/RuntimeService.h
+++ b/dom/workers/RuntimeService.h
@@ -73,17 +73,17 @@ private:
     mozilla::TimeStamp mExpirationTime;
   };
 
   struct MatchSharedWorkerInfo
   {
     WorkerPrivate* mWorkerPrivate;
     SharedWorkerInfo* mSharedWorkerInfo;
 
-    MatchSharedWorkerInfo(WorkerPrivate* aWorkerPrivate)
+    explicit MatchSharedWorkerInfo(WorkerPrivate* aWorkerPrivate)
     : mWorkerPrivate(aWorkerPrivate), mSharedWorkerInfo(nullptr)
     { }
   };
 
   mozilla::Mutex mMutex;
 
   // Protected by mMutex.
   nsClassHashtable<nsCStringHashKey, WorkerDomainInfo> mDomainMap;
--- a/dom/workers/ServiceWorkerEvents.h
+++ b/dom/workers/ServiceWorkerEvents.h
@@ -23,17 +23,17 @@ class ServiceWorker;
 bool
 ServiceWorkerEventsVisible(JSContext* aCx, JSObject* aObj);
 
 class InstallPhaseEvent : public Event
 {
   nsRefPtr<Promise> mPromise;
 
 protected:
-  InstallPhaseEvent(mozilla::dom::EventTarget* aOwner);
+  explicit InstallPhaseEvent(mozilla::dom::EventTarget* aOwner);
   ~InstallPhaseEvent() {}
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(InstallPhaseEvent, Event)
   NS_FORWARD_TO_EVENT
 
   virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE
@@ -75,17 +75,17 @@ public:
 };
 
 class InstallEvent MOZ_FINAL : public InstallPhaseEvent
 {
   // FIXME(nsm): Bug 982787 will allow actually populating this.
   nsRefPtr<ServiceWorker> mActiveWorker;
 
 protected:
-  InstallEvent(mozilla::dom::EventTarget* aOwner);
+  explicit InstallEvent(mozilla::dom::EventTarget* aOwner);
   ~InstallEvent() {}
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(InstallEvent, InstallPhaseEvent)
   NS_FORWARD_TO_EVENT
 
   virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE
--- a/dom/workers/ServiceWorkerManager.cpp
+++ b/dom/workers/ServiceWorkerManager.cpp
@@ -198,17 +198,17 @@ ServiceWorkerRegistrationInfo::Clear()
                                                  WhichServiceWorker::WAITING_WORKER |
                                                  WhichServiceWorker::ACTIVE_WORKER);
 }
 
 class FinishFetchOnMainThreadRunnable : public nsRunnable
 {
   nsMainThreadPtrHandle<ServiceWorkerUpdateInstance> mUpdateInstance;
 public:
-  FinishFetchOnMainThreadRunnable
+  explicit FinishFetchOnMainThreadRunnable
     (const nsMainThreadPtrHandle<ServiceWorkerUpdateInstance>& aUpdateInstance)
     : mUpdateInstance(aUpdateInstance)
   { }
 
   NS_IMETHOD
   Run() MOZ_OVERRIDE;
 };
 
@@ -1208,17 +1208,17 @@ public:
   }
 };
 
 class FinishActivationRunnable : public nsRunnable
 {
   nsMainThreadPtrHandle<ServiceWorkerRegistrationInfo> mRegistration;
 
 public:
-  FinishActivationRunnable(const nsMainThreadPtrHandle<ServiceWorkerRegistrationInfo>& aRegistration)
+  explicit FinishActivationRunnable(const nsMainThreadPtrHandle<ServiceWorkerRegistrationInfo>& aRegistration)
     : mRegistration(aRegistration)
   {
     MOZ_ASSERT(!NS_IsMainThread());
   }
 
   NS_IMETHODIMP
   Run()
   {
@@ -1295,17 +1295,17 @@ public:
   }
 };
 
 class FinishActivateHandler : public PromiseNativeHandler
 {
   nsMainThreadPtrHandle<ServiceWorkerRegistrationInfo> mRegistration;
 
 public:
-  FinishActivateHandler(const nsMainThreadPtrHandle<ServiceWorkerRegistrationInfo>& aRegistration)
+  explicit FinishActivateHandler(const nsMainThreadPtrHandle<ServiceWorkerRegistrationInfo>& aRegistration)
     : mRegistration(aRegistration)
   {
     MOZ_ASSERT(!NS_IsMainThread());
   }
 
   virtual
   ~FinishActivateHandler()
   { }
--- a/dom/workers/URL.cpp
+++ b/dom/workers/URL.cpp
@@ -26,17 +26,17 @@
 BEGIN_WORKERS_NAMESPACE
 using mozilla::dom::GlobalObject;
 
 class URLProxy MOZ_FINAL
 {
 public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(URLProxy)
 
-  URLProxy(mozilla::dom::URL* aURL)
+  explicit URLProxy(mozilla::dom::URL* aURL)
     : mURL(aURL)
   {
     AssertIsOnMainThread();
   }
 
   mozilla::dom::URL* URL()
   {
     return mURL;
@@ -260,17 +260,17 @@ public:
   {
     return mRetval;
   }
 };
 
 class TeardownURLRunnable : public nsRunnable
 {
 public:
-  TeardownURLRunnable(URLProxy* aURLProxy)
+  explicit TeardownURLRunnable(URLProxy* aURLProxy)
     : mURLProxy(aURLProxy)
   {
   }
 
   NS_IMETHOD Run()
   {
     AssertIsOnMainThread();
 
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -30,16 +30,17 @@
 #include "nsIURL.h"
 #include "nsIXPConnect.h"
 
 #include <algorithm>
 #include "jsfriendapi.h"
 #include "js/OldDebugAPI.h"
 #include "js/MemoryMetrics.h"
 #include "mozilla/Assertions.h"
+#include "mozilla/Attributes.h"
 #include "mozilla/ContentEvents.h"
 #include "mozilla/EventDispatcher.h"
 #include "mozilla/Likely.h"
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/ErrorEvent.h"
 #include "mozilla/dom/ErrorEventBinding.h"
 #include "mozilla/dom/Exceptions.h"
 #include "mozilla/dom/FunctionBinding.h"
@@ -218,17 +219,17 @@ private:
   }
 };
 
 struct WindowAction
 {
   nsPIDOMWindow* mWindow;
   bool mDefaultAction;
 
-  WindowAction(nsPIDOMWindow* aWindow)
+  MOZ_IMPLICIT WindowAction(nsPIDOMWindow* aWindow)
   : mWindow(aWindow), mDefaultAction(true)
   { }
 
   bool
   operator==(const WindowAction& aOther) const
   {
     return mWindow == aOther.mWindow;
   }
@@ -768,17 +769,17 @@ private:
   }
 };
 
 class TopLevelWorkerFinishedRunnable MOZ_FINAL : public nsRunnable
 {
   WorkerPrivate* mFinishedWorker;
 
 public:
-  TopLevelWorkerFinishedRunnable(WorkerPrivate* aFinishedWorker)
+  explicit TopLevelWorkerFinishedRunnable(WorkerPrivate* aFinishedWorker)
   : mFinishedWorker(aFinishedWorker)
   {
     aFinishedWorker->AssertIsOnWorkerThread();
   }
 
   NS_DECL_ISUPPORTS_INHERITED
 
 private:
@@ -842,17 +843,17 @@ private:
     // Don't do anything here as it's possible that aWorkerPrivate has been
     // deleted.
   }
 };
 
 class CompileScriptRunnable MOZ_FINAL : public WorkerRunnable
 {
 public:
-  CompileScriptRunnable(WorkerPrivate* aWorkerPrivate)
+  explicit CompileScriptRunnable(WorkerPrivate* aWorkerPrivate)
   : WorkerRunnable(aWorkerPrivate, WorkerThreadModifyBusyCount)
   { }
 
 private:
   virtual bool
   WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) MOZ_OVERRIDE
   {
     JS::Rooted<JSObject*> global(aCx,
@@ -869,17 +870,17 @@ private:
     }
     return result;
   }
 };
 
 class CloseEventRunnable MOZ_FINAL : public WorkerRunnable
 {
 public:
-  CloseEventRunnable(WorkerPrivate* aWorkerPrivate)
+  explicit CloseEventRunnable(WorkerPrivate* aWorkerPrivate)
   : WorkerRunnable(aWorkerPrivate, WorkerThreadUnchangedBusyCount)
   { }
 
 private:
   virtual bool
   PreDispatch(JSContext* aCx, WorkerPrivate* aWorkerPrivate) MOZ_OVERRIDE
   {
     MOZ_CRASH("Don't call Dispatch() on CloseEventRunnable!");
@@ -1086,49 +1087,49 @@ private:
   {
     return aWorkerPrivate->NotifyInternal(aCx, mStatus);
   }
 };
 
 class CloseRunnable MOZ_FINAL : public WorkerControlRunnable
 {
 public:
-  CloseRunnable(WorkerPrivate* aWorkerPrivate)
+  explicit CloseRunnable(WorkerPrivate* aWorkerPrivate)
   : WorkerControlRunnable(aWorkerPrivate, ParentThreadUnchangedBusyCount)
   { }
 
 private:
   virtual bool
   WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) MOZ_OVERRIDE
   {
     // This busy count will be matched by the CloseEventRunnable.
     return aWorkerPrivate->ModifyBusyCount(aCx, true) &&
            aWorkerPrivate->Close(aCx);
   }
 };
 
 class SuspendRunnable MOZ_FINAL : public WorkerControlRunnable
 {
 public:
-  SuspendRunnable(WorkerPrivate* aWorkerPrivate)
+  explicit SuspendRunnable(WorkerPrivate* aWorkerPrivate)
   : WorkerControlRunnable(aWorkerPrivate, WorkerThreadUnchangedBusyCount)
   { }
 
 private:
   virtual bool
   WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) MOZ_OVERRIDE
   {
     return aWorkerPrivate->SuspendInternal(aCx);
   }
 };
 
 class ResumeRunnable MOZ_FINAL : public WorkerControlRunnable
 {
 public:
-  ResumeRunnable(WorkerPrivate* aWorkerPrivate)
+  explicit ResumeRunnable(WorkerPrivate* aWorkerPrivate)
   : WorkerControlRunnable(aWorkerPrivate, WorkerThreadUnchangedBusyCount)
   { }
 
 private:
   virtual bool
   WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) MOZ_OVERRIDE
   {
     return aWorkerPrivate->ResumeInternal(aCx);
@@ -1327,17 +1328,17 @@ private:
                        mFilename, mLine, mLineNumber, mColumnNumber, mFlags,
                        mErrorNumber, innerWindowId);
   }
 };
 
 class TimerRunnable MOZ_FINAL : public WorkerRunnable
 {
 public:
-  TimerRunnable(WorkerPrivate* aWorkerPrivate)
+  explicit TimerRunnable(WorkerPrivate* aWorkerPrivate)
   : WorkerRunnable(aWorkerPrivate, WorkerThreadUnchangedBusyCount)
   { }
 
 private:
   virtual bool
   PreDispatch(JSContext* aCx, WorkerPrivate* aWorkerPrivate) MOZ_OVERRIDE
   {
     // Silence bad assertions.
@@ -1420,17 +1421,17 @@ protected:
 
 class KillCloseEventRunnable MOZ_FINAL : public WorkerRunnable
 {
   nsCOMPtr<nsITimer> mTimer;
 
   class KillScriptRunnable MOZ_FINAL : public WorkerControlRunnable
   {
   public:
-    KillScriptRunnable(WorkerPrivate* aWorkerPrivate)
+    explicit KillScriptRunnable(WorkerPrivate* aWorkerPrivate)
     : WorkerControlRunnable(aWorkerPrivate, WorkerThreadUnchangedBusyCount)
     { }
 
   private:
     virtual bool
     PreDispatch(JSContext* aCx, WorkerPrivate* aWorkerPrivate) MOZ_OVERRIDE
     {
       // Silence bad assertions, this is dispatched from the timer thread.
@@ -1448,17 +1449,17 @@ class KillCloseEventRunnable MOZ_FINAL :
     WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) MOZ_OVERRIDE
     {
       // Kill running script.
       return false;
     }
   };
 
 public:
-  KillCloseEventRunnable(WorkerPrivate* aWorkerPrivate)
+  explicit KillCloseEventRunnable(WorkerPrivate* aWorkerPrivate)
   : WorkerRunnable(aWorkerPrivate, WorkerThreadUnchangedBusyCount)
   { }
 
   bool
   SetTimeout(JSContext* aCx, uint32_t aDelayMS)
   {
     nsCOMPtr<nsITimer> timer = do_CreateInstance(NS_TIMER_CONTRACTID);
     if (!timer) {
@@ -1685,17 +1686,17 @@ private:
   bool mIsOffline;
 };
 
 class WorkerJSRuntimeStats : public JS::RuntimeStats
 {
   const nsACString& mRtPath;
 
 public:
-  WorkerJSRuntimeStats(const nsACString& aRtPath)
+  explicit WorkerJSRuntimeStats(const nsACString& aRtPath)
   : JS::RuntimeStats(JsWorkerMallocSizeOf), mRtPath(aRtPath)
   { }
 
   ~WorkerJSRuntimeStats()
   {
     for (size_t i = 0; i != zoneStatsVector.length(); i++) {
       delete static_cast<xpc::ZoneStatsExtras*>(zoneStatsVector[i].extra);
     }
@@ -1867,17 +1868,17 @@ class WorkerPrivateParent<Derived>::Even
   // This mutex protects mWorkerPrivate and must be acquired *before* the
   // WorkerPrivate's mutex whenever they must both be held.
   mozilla::Mutex mMutex;
   WorkerPrivate* mWorkerPrivate;
   nsIEventTarget* mWeakNestedEventTarget;
   nsCOMPtr<nsIEventTarget> mNestedEventTarget;
 
 public:
-  EventTarget(WorkerPrivate* aWorkerPrivate)
+  explicit EventTarget(WorkerPrivate* aWorkerPrivate)
   : mMutex("WorkerPrivateParent::EventTarget::mMutex"),
     mWorkerPrivate(aWorkerPrivate), mWeakNestedEventTarget(nullptr)
   {
     MOZ_ASSERT(aWorkerPrivate);
   }
 
   EventTarget(WorkerPrivate* aWorkerPrivate, nsIEventTarget* aNestedEventTarget)
   : mMutex("WorkerPrivateParent::EventTarget::mMutex"),
@@ -1958,17 +1959,17 @@ class WorkerPrivate::MemoryReporter MOZ_
 
   friend class WorkerPrivate;
 
   SharedMutex mMutex;
   WorkerPrivate* mWorkerPrivate;
   bool mAlreadyMappedToAddon;
 
 public:
-  MemoryReporter(WorkerPrivate* aWorkerPrivate)
+  explicit MemoryReporter(WorkerPrivate* aWorkerPrivate)
   : mMutex(aWorkerPrivate->mMutex), mWorkerPrivate(aWorkerPrivate),
     mAlreadyMappedToAddon(false)
   {
     aWorkerPrivate->AssertIsOnWorkerThread();
 
   }
 
   NS_IMETHOD
@@ -2409,17 +2410,17 @@ WorkerPrivateParent<Derived>::Suspend(JS
     AssertIsOnMainThread();
     MOZ_ASSERT(mSharedWorkers.Count());
 
     struct Closure
     {
       nsPIDOMWindow* mWindow;
       bool mAllSuspended;
 
-      Closure(nsPIDOMWindow* aWindow)
+      explicit Closure(nsPIDOMWindow* aWindow)
       : mWindow(aWindow), mAllSuspended(true)
       {
         AssertIsOnMainThread();
         // aWindow may be null here.
       }
 
       static PLDHashOperator
       Suspend(const uint64_t& aKey,
@@ -2493,17 +2494,17 @@ WorkerPrivateParent<Derived>::Resume(JSC
     AssertIsOnMainThread();
     MOZ_ASSERT(mSharedWorkers.Count());
 
     struct Closure
     {
       nsPIDOMWindow* mWindow;
       bool mAnyRunning;
 
-      Closure(nsPIDOMWindow* aWindow)
+      explicit Closure(nsPIDOMWindow* aWindow)
       : mWindow(aWindow), mAnyRunning(false)
       {
         AssertIsOnMainThread();
         // aWindow may be null here.
       }
 
       static PLDHashOperator
       Resume(const uint64_t& aKey,
@@ -3244,17 +3245,17 @@ WorkerPrivateParent<Derived>::CloseShare
   MOZ_ASSERT(IsSharedWorker() || IsServiceWorker());
   MOZ_ASSERT(aWindow);
 
   struct Closure
   {
     nsPIDOMWindow* mWindow;
     nsAutoTArray<nsRefPtr<SharedWorker>, 10> mSharedWorkers;
 
-    Closure(nsPIDOMWindow* aWindow)
+    explicit Closure(nsPIDOMWindow* aWindow)
     : mWindow(aWindow)
     {
       AssertIsOnMainThread();
       MOZ_ASSERT(aWindow);
     }
 
     static PLDHashOperator
     Collect(const uint64_t& aKey,
--- a/dom/workers/WorkerScope.h
+++ b/dom/workers/WorkerScope.h
@@ -31,17 +31,17 @@ class WorkerGlobalScope : public DOMEven
   nsRefPtr<Console> mConsole;
   nsRefPtr<WorkerLocation> mLocation;
   nsRefPtr<WorkerNavigator> mNavigator;
   nsRefPtr<Performance> mPerformance;
 
 protected:
   WorkerPrivate* mWorkerPrivate;
 
-  WorkerGlobalScope(WorkerPrivate* aWorkerPrivate);
+  explicit WorkerGlobalScope(WorkerPrivate* aWorkerPrivate);
   virtual ~WorkerGlobalScope();
 
 public:
   virtual JSObject*
   WrapObject(JSContext* aCx) MOZ_OVERRIDE;
 
   virtual JSObject*
   WrapGlobalObject(JSContext* aCx) = 0;
@@ -121,17 +121,17 @@ public:
   Performance* GetPerformance();
 };
 
 class DedicatedWorkerGlobalScope MOZ_FINAL : public WorkerGlobalScope
 {
   ~DedicatedWorkerGlobalScope() { }
 
 public:
-  DedicatedWorkerGlobalScope(WorkerPrivate* aWorkerPrivate);
+  explicit DedicatedWorkerGlobalScope(WorkerPrivate* aWorkerPrivate);
 
   virtual JSObject*
   WrapGlobalObject(JSContext* aCx) MOZ_OVERRIDE;
 
   void
   PostMessage(JSContext* aCx, JS::Handle<JS::Value> aMessage,
               const Optional<Sequence<JS::Value>>& aTransferable,
               ErrorResult& aRv);
--- a/dom/workers/XMLHttpRequest.cpp
+++ b/dom/workers/XMLHttpRequest.cpp
@@ -287,17 +287,17 @@ private:
   }
 };
 
 class AsyncTeardownRunnable MOZ_FINAL : public nsRunnable
 {
   nsRefPtr<Proxy> mProxy;
 
 public:
-  AsyncTeardownRunnable(Proxy* aProxy)
+  explicit AsyncTeardownRunnable(Proxy* aProxy)
   : mProxy(aProxy)
   {
     MOZ_ASSERT(aProxy);
   }
 
   NS_DECL_ISUPPORTS_INHERITED
 
 private:
@@ -863,17 +863,17 @@ private:
   }
 };
 
 class AutoUnpinXHR
 {
   XMLHttpRequest* mXMLHttpRequestPrivate;
 
 public:
-  AutoUnpinXHR(XMLHttpRequest* aXMLHttpRequestPrivate)
+  explicit AutoUnpinXHR(XMLHttpRequest* aXMLHttpRequestPrivate)
   : mXMLHttpRequestPrivate(aXMLHttpRequestPrivate)
   {
     MOZ_ASSERT(aXMLHttpRequestPrivate);
   }
 
   ~AutoUnpinXHR()
   {
     if (mXMLHttpRequestPrivate) {
--- a/dom/workers/XMLHttpRequest.h
+++ b/dom/workers/XMLHttpRequest.h
@@ -255,17 +255,17 @@ public:
 
   bool
   SendInProgress() const
   {
     return mRooted;
   }
 
 private:
-  XMLHttpRequest(WorkerPrivate* aWorkerPrivate);
+  explicit XMLHttpRequest(WorkerPrivate* aWorkerPrivate);
   ~XMLHttpRequest();
 
   enum ReleaseType { Default, XHRIsGoingAway, WorkerIsGoingAway };
 
   void
   ReleaseProxy(ReleaseType aType = Default);
 
   void
--- a/dom/workers/XMLHttpRequestUpload.h
+++ b/dom/workers/XMLHttpRequestUpload.h
@@ -11,17 +11,17 @@
 BEGIN_WORKERS_NAMESPACE
 
 class XMLHttpRequest;
 
 class XMLHttpRequestUpload MOZ_FINAL : public nsXHREventTarget
 {
   nsRefPtr<XMLHttpRequest> mXHR;
 
-  XMLHttpRequestUpload(XMLHttpRequest* aXHR);
+  explicit XMLHttpRequestUpload(XMLHttpRequest* aXHR);
 
   ~XMLHttpRequestUpload();
 
 public:
   virtual JSObject*
   WrapObject(JSContext* aCx) MOZ_OVERRIDE;
 
   static already_AddRefed<XMLHttpRequestUpload>