Bug 1090242 - Fix some more bad implicit constructors in DOM; r=baku
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 10 Oct 2014 17:28:35 -0400
changeset 237299 be1a1fd58f1125dcbf8ba2a97d1a23ca7b9c5320
parent 237298 76386e21d73389a7658115b13f120a8d4eed3851
child 237300 52ed8be78a65699d2953ff6eb77a3e275b24728b
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1090242
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1090242 - Fix some more bad implicit constructors in DOM; r=baku
dom/base/WebSocket.cpp
dom/events/Event.h
dom/fetch/Fetch.cpp
dom/ipc/Blob.cpp
dom/media/gmp-plugin/gmp-test-decryptor.cpp
dom/media/gmp-plugin/gmp-test-decryptor.h
dom/media/gmp/GMPParent.cpp
dom/media/gmp/GMPStorageParent.cpp
dom/media/gtest/MockMediaResource.h
dom/media/gtest/TestGMPCrossOrigin.cpp
dom/media/gtest/TestMP4Reader.cpp
dom/media/mediasource/MediaSourceResource.h
dom/media/webrtc/MediaEngineCameraVideoSource.h
dom/network/Connection.h
dom/plugins/ipc/PluginScriptableObjectChild.h
dom/plugins/ipc/PluginScriptableObjectParent.cpp
dom/telephony/Telephony.cpp
dom/telephony/TelephonyCallback.h
dom/workers/WorkerDebuggerManager.cpp
dom/workers/WorkerPrivate.h
dom/xslt/xslt/txMozillaXSLTProcessor.h
--- a/dom/base/WebSocket.cpp
+++ b/dom/base/WebSocket.cpp
@@ -71,17 +71,17 @@ class WebSocketImpl MOZ_FINAL : public n
 public:
   NS_DECL_NSIINTERFACEREQUESTOR
   NS_DECL_NSIWEBSOCKETLISTENER
   NS_DECL_NSIOBSERVER
   NS_DECL_NSIREQUEST
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIEVENTTARGET
 
-  WebSocketImpl(WebSocket* aWebSocket)
+  explicit WebSocketImpl(WebSocket* aWebSocket)
   : mWebSocket(aWebSocket)
   , mOnCloseScheduled(false)
   , mFailed(false)
   , mDisconnected(false)
   , mCloseEventWasClean(false)
   , mCloseEventCode(nsIWebSocketChannel::CLOSE_ABNORMAL)
   , mScriptLine(0)
   , mInnerWindowID(0)
@@ -458,17 +458,17 @@ WebSocketImpl::FailConnection(uint16_t a
   CloseConnection(aReasonCode, aReasonString);
 }
 
 namespace {
 
 class DisconnectInternalRunnable MOZ_FINAL : public WorkerMainThreadRunnable
 {
 public:
-  DisconnectInternalRunnable(WebSocketImpl* aImpl)
+  explicit DisconnectInternalRunnable(WebSocketImpl* aImpl)
     : WorkerMainThreadRunnable(aImpl->mWorkerPrivate)
     , mImpl(aImpl)
   { }
 
   bool MainThreadRun() MOZ_OVERRIDE
   {
     mImpl->DisconnectInternal();
     return true;
@@ -1031,17 +1031,17 @@ WebSocket::Constructor(const GlobalObjec
   // called asynchrounsly.
   if (!webSocket->mImpl->mChannel) {
     return webSocket.forget();
   }
 
   class MOZ_STACK_CLASS ClearWebSocket
   {
   public:
-    ClearWebSocket(WebSocketImpl* aWebSocketImpl)
+    explicit ClearWebSocket(WebSocketImpl* aWebSocketImpl)
       : mWebSocketImpl(aWebSocketImpl)
       , mDone(false)
     {
     }
 
     void Done()
     {
        mDone = true;
@@ -1582,17 +1582,17 @@ WebSocket::CreateAndDispatchCloseEvent(b
   return DispatchDOMEvent(nullptr, event, nullptr, nullptr);
 }
 
 namespace {
 
 class PrefEnabledRunnable MOZ_FINAL : public WorkerMainThreadRunnable
 {
 public:
-  PrefEnabledRunnable(WorkerPrivate* aWorkerPrivate)
+  explicit PrefEnabledRunnable(WorkerPrivate* aWorkerPrivate)
     : WorkerMainThreadRunnable(aWorkerPrivate)
     , mEnabled(false)
   { }
 
   bool MainThreadRun() MOZ_OVERRIDE
   {
     AssertIsOnMainThread();
     mEnabled = WebSocket::PrefEnabled(nullptr, nullptr);
--- a/dom/events/Event.h
+++ b/dom/events/Event.h
@@ -263,17 +263,18 @@ protected:
   // True when popup control check should rely on event.type, not
   // WidgetEvent.message.
   bool                        mWantsPopupControlCheck;
 };
 
 class MOZ_STACK_CLASS WantsPopupControlCheck
 {
 public:
-  WantsPopupControlCheck(nsIDOMEvent* aEvent) : mEvent(aEvent->InternalDOMEvent())
+  explicit WantsPopupControlCheck(nsIDOMEvent* aEvent) :
+    mEvent(aEvent->InternalDOMEvent())
   {
     mOriginalWantsPopupControlCheck = mEvent->GetWantsPopupControlCheck();
     mEvent->SetWantsPopupControlCheck(mEvent->IsTrusted());
   }
 
   ~WantsPopupControlCheck()
   {
     mEvent->SetWantsPopupControlCheck(mOriginalWantsPopupControlCheck);
--- a/dom/fetch/Fetch.cpp
+++ b/dom/fetch/Fetch.cpp
@@ -66,17 +66,17 @@ private:
 
 class MainThreadFetchResolver MOZ_FINAL : public FetchDriverObserver
 {
   nsRefPtr<Promise> mPromise;
   nsRefPtr<InternalResponse> mInternalResponse;
 
   NS_DECL_OWNINGTHREAD
 public:
-  MainThreadFetchResolver(Promise* aPromise);
+  explicit MainThreadFetchResolver(Promise* aPromise);
 
   void
   OnResponseAvailable(InternalResponse* aResponse) MOZ_OVERRIDE;
 
 private:
   ~MainThreadFetchResolver();
 };
 
@@ -183,17 +183,17 @@ MainThreadFetchResolver::~MainThreadFetc
 {
   NS_ASSERT_OWNINGTHREAD(MainThreadFetchResolver);
 }
 
 class WorkerFetchResponseRunnable : public WorkerRunnable
 {
   nsRefPtr<WorkerFetchResolver> mResolver;
 public:
-  WorkerFetchResponseRunnable(WorkerFetchResolver* aResolver)
+  explicit WorkerFetchResponseRunnable(WorkerFetchResolver* aResolver)
     : WorkerRunnable(aResolver->GetWorkerPrivate(), WorkerThreadModifyBusyCount)
     , mResolver(aResolver)
   {
   }
 
   bool
   WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) MOZ_OVERRIDE
   {
--- a/dom/ipc/Blob.cpp
+++ b/dom/ipc/Blob.cpp
@@ -724,17 +724,17 @@ private:
     // Nothing needs to be done here.
   }
 };
 
 class EmptyBlobImpl MOZ_FINAL
   : public FileImplBase
 {
 public:
-  EmptyBlobImpl(const nsAString& aContentType)
+  explicit EmptyBlobImpl(const nsAString& aContentType)
     : FileImplBase(aContentType, 0)
   {
     mImmutable = true;
   }
 
   EmptyBlobImpl(const nsAString& aName,
                 const nsAString& aContentType,
                 uint64_t aLastModifiedDate)
@@ -835,17 +835,17 @@ struct MOZ_STACK_CLASS CreateBlobImplMet
 {
   nsString mContentType;
   nsString mName;
   uint64_t mLength;
   uint64_t mLastModifiedDate;
   bool mHasRecursed;
   const bool mIsSameProcessActor;
 
-  CreateBlobImplMetadata(bool aIsSameProcessActor)
+  explicit CreateBlobImplMetadata(bool aIsSameProcessActor)
     : mLength(0)
     , mLastModifiedDate(0)
     , mHasRecursed(false)
     , mIsSameProcessActor(aIsSameProcessActor)
   {
     MOZ_COUNT_CTOR(CreateBlobImplMetadata);
 
     mName.SetIsVoid(true);
@@ -1673,17 +1673,17 @@ class BlobChild::RemoteBlobImpl::CreateS
   Monitor mMonitor;
   nsRefPtr<RemoteBlobImpl> mRemoteBlobImpl;
   nsRefPtr<RemoteInputStream> mInputStream;
   const uint64_t mStart;
   const uint64_t mLength;
   bool mDone;
 
 public:
-  CreateStreamHelper(RemoteBlobImpl* aRemoteBlobImpl);
+  explicit CreateStreamHelper(RemoteBlobImpl* aRemoteBlobImpl);
 
   nsresult
   GetStream(nsIInputStream** aInputStream);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIRUNNABLE
 
 private:
--- a/dom/media/gmp-plugin/gmp-test-decryptor.cpp
+++ b/dom/media/gmp-plugin/gmp-test-decryptor.cpp
@@ -104,17 +104,17 @@ public:
     WriteRecord(TruncateRecordId, nullptr, 0,
                 new ReadThenTask(TruncateRecordId, new TestEmptyContinuation()));
     delete this;
   }
 };
 
 class VerifyAndFinishContinuation : public ReadContinuation {
 public:
-  VerifyAndFinishContinuation(string aValue)
+  explicit VerifyAndFinishContinuation(string aValue)
     : mValue(aValue)
   {}
   void ReadComplete(GMPErr aErr, const std::string& aData) MOZ_OVERRIDE {
     if (aData != mValue) {
       FakeDecryptor::Message("FAIL VerifyAndFinishContinuation read data doesn't match expected data");
     }
     sFinishedReplaceTest = true;
     MaybeFinish();
@@ -141,17 +141,17 @@ public:
   string mValue;
   string mOverwrite;
 };
 
 static const string OpenAgainRecordId = "open-again-record-id";
 
 class OpenedSecondTimeContinuation : public OpenContinuation {
 public:
-  OpenedSecondTimeContinuation(GMPRecord* aRecord)
+  explicit OpenedSecondTimeContinuation(GMPRecord* aRecord)
     : mRecord(aRecord)
   {
   }
 
   virtual void OpenComplete(GMPErr aStatus, GMPRecord* aRecord) MOZ_OVERRIDE {
     if (GMP_SUCCEEDED(aStatus)) {
       FakeDecryptor::Message("FAIL OpenSecondTimeContinuation should not be able to re-open record.");
     }
@@ -243,17 +243,17 @@ public:
     delete this;
   }
   const string mRecordId;
   const string mValue;
 };
 
 class ReportReadStatusContinuation : public ReadContinuation {
 public:
-  ReportReadStatusContinuation(const string& aRecordId)
+  explicit ReportReadStatusContinuation(const string& aRecordId)
     : mRecordId(aRecordId)
   {}
   void ReadComplete(GMPErr aErr, const std::string& aData) MOZ_OVERRIDE {
     if (GMP_FAILED(aErr)) {
       FakeDecryptor::Message("retrieve " + mRecordId + " failed");
     } else {
       stringstream ss;
       ss << aData.size();
@@ -264,17 +264,17 @@ public:
     }
     delete this;
   }
   string mRecordId;
 };
 
 class ReportReadRecordContinuation : public ReadContinuation {
 public:
-  ReportReadRecordContinuation(const string& aRecordId)
+  explicit ReportReadRecordContinuation(const string& aRecordId)
     : mRecordId(aRecordId)
   {}
   void ReadComplete(GMPErr aErr, const std::string& aData) MOZ_OVERRIDE {
     if (GMP_FAILED(aErr)) {
       FakeDecryptor::Message("retrieved " + mRecordId + " failed");
     } else {
       FakeDecryptor::Message("retrieved " + mRecordId + " " + aData);
     }
@@ -325,17 +325,17 @@ FakeDecryptor::UpdateSession(uint32_t aP
     }
   } else if (task == "retrieve-shutdown-token") {
     ReadRecord("shutdown-token", new ReportReadRecordContinuation("shutdown-token"));
   }
 }
 
 class CompleteShutdownTask : public GMPTask {
 public:
-  CompleteShutdownTask(GMPAsyncShutdownHost* aHost)
+  explicit CompleteShutdownTask(GMPAsyncShutdownHost* aHost)
     : mHost(aHost)
   {
   }
   virtual void Run() {
     mHost->ShutdownComplete();
   }
   virtual void Destroy() { delete this; }
   GMPAsyncShutdownHost* mHost;
--- a/dom/media/gmp-plugin/gmp-test-decryptor.h
+++ b/dom/media/gmp-plugin/gmp-test-decryptor.h
@@ -75,17 +75,17 @@ private:
 
   void TestStorage();
 
   GMPDecryptorCallback* mCallback;
 };
 
 class TestAsyncShutdown : public GMPAsyncShutdown {
 public:
-  TestAsyncShutdown(GMPAsyncShutdownHost* aHost)
+  explicit TestAsyncShutdown(GMPAsyncShutdownHost* aHost)
     : mHost(aHost)
   {
   }
   virtual void BeginShutdown() MOZ_OVERRIDE;
 private:
   GMPAsyncShutdownHost* mHost;
 };
 
--- a/dom/media/gmp/GMPParent.cpp
+++ b/dom/media/gmp/GMPParent.cpp
@@ -356,17 +356,17 @@ GMPParent::Shutdown()
     nsRefPtr<GMPParent> self(this);
     mService->ReAddOnGMPThread(self);
   } // else we've been asked to die and stay dead
   MOZ_ASSERT(mState == GMPStateNotLoaded);
 }
 
 class NotifyGMPShutdownTask : public nsRunnable {
 public:
-  NotifyGMPShutdownTask(const nsAString& aNodeId)
+  explicit NotifyGMPShutdownTask(const nsAString& aNodeId)
     : mNodeId(aNodeId)
   {
   }
   NS_IMETHOD Run() {
     MOZ_ASSERT(NS_IsMainThread());
     nsCOMPtr<nsIObserverService> obsService = mozilla::services::GetObserverService();
     MOZ_ASSERT(obsService);
     if (obsService) {
--- a/dom/media/gmp/GMPStorageParent.cpp
+++ b/dom/media/gmp/GMPStorageParent.cpp
@@ -122,17 +122,17 @@ CloseFile(const nsACString& key, PRFileD
   if (PR_Close(entry) != PR_SUCCESS) {
     NS_WARNING("GMPDiskStorage Failed to clsose file.");
   }
   return PL_DHASH_REMOVE;
 }
 
 class GMPDiskStorage : public GMPStorage {
 public:
-  GMPDiskStorage(const nsCString& aNodeId)
+  explicit GMPDiskStorage(const nsCString& aNodeId)
     : mNodeId(aNodeId)
   {
   }
   ~GMPDiskStorage() {
     mFiles.Enumerate(CloseFile, nullptr);
     MOZ_ASSERT(!mFiles.Count());
   }
 
--- a/dom/media/gtest/MockMediaResource.h
+++ b/dom/media/gtest/MockMediaResource.h
@@ -10,17 +10,17 @@
 #include "mozilla/Atomics.h"
 
 namespace mozilla
 {
 
 class MockMediaResource : public MediaResource
 {
 public:
-  MockMediaResource(const char* aFileName);
+  explicit MockMediaResource(const char* aFileName);
   virtual nsIURI* URI() const MOZ_OVERRIDE { return nullptr; }
   virtual nsresult Close() MOZ_OVERRIDE { return NS_OK; }
   virtual void Suspend(bool aCloseImmediately) MOZ_OVERRIDE {}
   virtual void Resume() MOZ_OVERRIDE {}
   virtual already_AddRefed<nsIPrincipal> GetCurrentPrincipal() MOZ_OVERRIDE
   {
     return nullptr;
   }
--- a/dom/media/gtest/TestGMPCrossOrigin.cpp
+++ b/dom/media/gtest/TestGMPCrossOrigin.cpp
@@ -163,17 +163,17 @@ private:
   nsRefPtr<nsIRunnable> mContinuation;
   const nsString mNodeId;
 };
 
 NS_IMPL_ISUPPORTS(GMPShutdownObserver, nsIRunnable, nsIObserver)
 
 class NotifyObserversTask : public nsRunnable {
 public:
-  NotifyObserversTask(const char* aTopic)
+  explicit NotifyObserversTask(const char* aTopic)
     : mTopic(aTopic)
   {}
   NS_IMETHOD Run() {
     MOZ_ASSERT(NS_IsMainThread());
     nsCOMPtr<nsIObserverService> observerService =
         mozilla::services::GetObserverService();
     if (observerService) {
       observerService->NotifyObservers(nullptr, mTopic, nullptr);
--- a/dom/media/gtest/TestMP4Reader.cpp
+++ b/dom/media/gtest/TestMP4Reader.cpp
@@ -19,17 +19,17 @@ class TestBinding
 {
 public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(TestBinding);
 
   nsRefPtr<MP4Decoder> decoder;
   nsRefPtr<MockMediaResource> resource;
   nsRefPtr<MP4Reader> reader;
 
-  TestBinding(const char* aFileName = "gizmo.mp4")
+  explicit TestBinding(const char* aFileName = "gizmo.mp4")
     : decoder(new MP4Decoder())
     , resource(new MockMediaResource(aFileName))
     , reader(new MP4Reader(decoder))
   {
     EXPECT_EQ(NS_OK, Preferences::SetBool(
                        "media.fragmented-mp4.use-blank-decoder", true));
 
     EXPECT_EQ(NS_OK, resource->Open(nullptr));
--- a/dom/media/mediasource/MediaSourceResource.h
+++ b/dom/media/mediasource/MediaSourceResource.h
@@ -21,17 +21,17 @@ extern PRLogModuleInfo* GetMediaSourceAP
 
 #define UNIMPLEMENTED() MSE_DEBUG("MediaSourceResource(%p): UNIMPLEMENTED FUNCTION at %s:%d", this, __FILE__, __LINE__)
 
 namespace mozilla {
 
 class MediaSourceResource MOZ_FINAL : public MediaResource
 {
 public:
-  MediaSourceResource(nsIPrincipal* aPrincipal = nullptr)
+  explicit MediaSourceResource(nsIPrincipal* aPrincipal = nullptr)
     : mPrincipal(aPrincipal) {}
 
   virtual nsresult Close() MOZ_OVERRIDE { return NS_OK; }
   virtual void Suspend(bool aCloseImmediately) MOZ_OVERRIDE { UNIMPLEMENTED(); }
   virtual void Resume() MOZ_OVERRIDE { UNIMPLEMENTED(); }
   virtual bool CanClone() MOZ_OVERRIDE { UNIMPLEMENTED(); return false; }
   virtual already_AddRefed<MediaResource> CloneData(MediaDecoder* aDecoder) MOZ_OVERRIDE { UNIMPLEMENTED(); return nullptr; }
   virtual void SetReadMode(MediaCacheStream::ReadMode aMode) MOZ_OVERRIDE { UNIMPLEMENTED(); }
--- a/dom/media/webrtc/MediaEngineCameraVideoSource.h
+++ b/dom/media/webrtc/MediaEngineCameraVideoSource.h
@@ -14,18 +14,18 @@
 #undef FF
 #include "webrtc/video_engine/include/vie_capture.h"
 
 namespace mozilla {
 
 class MediaEngineCameraVideoSource : public MediaEngineVideoSource
 {
 public:
-  MediaEngineCameraVideoSource(int aIndex,
-                               const char* aMonitorName = "Camera.Monitor")
+  explicit MediaEngineCameraVideoSource(int aIndex,
+                                        const char* aMonitorName = "Camera.Monitor")
     : MediaEngineVideoSource(kReleased)
     , mMonitor(aMonitorName)
     , mWidth(0)
     , mHeight(0)
     , mInitDone(false)
     , mHasDirectListeners(false)
     , mCaptureIndex(aIndex)
     , mTrackID(0)
--- a/dom/network/Connection.h
+++ b/dom/network/Connection.h
@@ -27,17 +27,17 @@ class Connection MOZ_FINAL : public DOME
                            , public nsINetworkProperties
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSINETWORKPROPERTIES
 
   NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
 
-  Connection(nsPIDOMWindow *aWindow);
+  explicit Connection(nsPIDOMWindow *aWindow);
 
   void Shutdown();
 
   // For IObserver
   void Notify(const hal::NetworkInformation& aNetworkInfo);
 
   // WebIDL
 
--- a/dom/plugins/ipc/PluginScriptableObjectChild.h
+++ b/dom/plugins/ipc/PluginScriptableObjectChild.h
@@ -184,18 +184,18 @@ private:
 
     ~StoredIdentifier() { MOZ_COUNT_DTOR(StoredIdentifier); }
   };
 
 public:
   class MOZ_STACK_CLASS StackIdentifier
   {
   public:
-    StackIdentifier(const PluginIdentifier& aIdentifier);
-    StackIdentifier(NPIdentifier aIdentifier);
+    explicit StackIdentifier(const PluginIdentifier& aIdentifier);
+    explicit StackIdentifier(NPIdentifier aIdentifier);
     ~StackIdentifier();
 
     void MakePermanent()
     {
       if (mStored) {
         mStored->mPermanent = true;
       }
     }
--- a/dom/plugins/ipc/PluginScriptableObjectParent.cpp
+++ b/dom/plugins/ipc/PluginScriptableObjectParent.cpp
@@ -32,17 +32,18 @@ using namespace mozilla::plugins::parent
  * on the stack: although StackIdentifier roots all identifiers used, the GC has
  * no way to no that a jsid cast to an NPIdentifier needs to be fixed up if it
  * is moved.
  */
 
 class MOZ_STACK_CLASS StackIdentifier
 {
 public:
-  StackIdentifier(const PluginIdentifier& aIdentifier, bool aIntern = false);
+  explicit StackIdentifier(const PluginIdentifier& aIdentifier,
+                           bool aIntern = false);
 
   bool Failed() const { return mFailed; }
   NPIdentifier ToNPIdentifier() const { return mIdentifier; }
 
 private:
   bool mFailed;
   NPIdentifier mIdentifier;
   AutoSafeJSContext mCx;
--- a/dom/telephony/Telephony.cpp
+++ b/dom/telephony/Telephony.cpp
@@ -62,17 +62,17 @@ public:
   }
 };
 
 class Telephony::EnumerationAck : public nsRunnable
 {
   nsRefPtr<Telephony> mTelephony;
 
 public:
-  EnumerationAck(Telephony* aTelephony)
+  explicit EnumerationAck(Telephony* aTelephony)
   : mTelephony(aTelephony)
   {
     MOZ_ASSERT(mTelephony);
   }
 
   NS_IMETHOD Run()
   {
     mTelephony->NotifyEvent(NS_LITERAL_STRING("ready"));
--- a/dom/telephony/TelephonyCallback.h
+++ b/dom/telephony/TelephonyCallback.h
@@ -17,17 +17,17 @@ class Promise;
 namespace telephony {
 
 class TelephonyCallback : public nsITelephonyCallback
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSITELEPHONYCALLBACK
 
-  TelephonyCallback(Promise* aPromise);
+  explicit TelephonyCallback(Promise* aPromise);
 
 protected:
   virtual ~TelephonyCallback() {}
 
 protected:
   nsRefPtr<Promise> mPromise;
 };
 
--- a/dom/workers/WorkerDebuggerManager.cpp
+++ b/dom/workers/WorkerDebuggerManager.cpp
@@ -44,17 +44,17 @@ NS_IMPL_ISUPPORTS(RegisterDebuggerRunnab
 BEGIN_WORKERS_NAMESPACE
 
 class WorkerDebuggerEnumerator MOZ_FINAL : public nsISimpleEnumerator
 {
   nsTArray<nsCOMPtr<nsISupports>> mDebuggers;
   uint32_t mIndex;
 
 public:
-  WorkerDebuggerEnumerator(const nsTArray<WorkerDebugger*>& aDebuggers)
+  explicit WorkerDebuggerEnumerator(const nsTArray<WorkerDebugger*>& aDebuggers)
   : mIndex(0)
   {
     mDebuggers.AppendElements(aDebuggers);
   }
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSISIMPLEENUMERATOR
 
--- a/dom/workers/WorkerPrivate.h
+++ b/dom/workers/WorkerPrivate.h
@@ -733,17 +733,17 @@ class WorkerDebugger : public nsIWorkerD
   mozilla::Mutex mMutex;
   mozilla::CondVar mCondVar;
 
   // Protected by mMutex
   WorkerPrivate* mWorkerPrivate;
   bool mIsEnabled;
 
 public:
-  WorkerDebugger(WorkerPrivate* aWorkerPrivate);
+  explicit WorkerDebugger(WorkerPrivate* aWorkerPrivate);
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIWORKERDEBUGGER
 
   void AssertIsOnParentThread();
 
   void WaitIsEnabled(bool aIsEnabled);
 
--- a/dom/xslt/xslt/txMozillaXSLTProcessor.h
+++ b/dom/xslt/xslt/txMozillaXSLTProcessor.h
@@ -151,17 +151,17 @@ public:
     {
         return (mFlags & DISABLE_ALL_LOADS) != 0;
     }
 
     static nsresult Startup();
     static void Shutdown();
 
 private:
-    txMozillaXSLTProcessor(nsISupports* aOwner);
+    explicit txMozillaXSLTProcessor(nsISupports* aOwner);
     /**
      * Default destructor for txMozillaXSLTProcessor
      */
     ~txMozillaXSLTProcessor();
 
     nsresult DoTransform();
     void notifyError();
     nsresult ensureStylesheet();