Bug 1048242 - Fix more bad implicit constructors in docshell; r=smaug
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 05 Aug 2014 09:19:03 -0400
changeset 207607 3b9a7943dce2e73822fc33c3109d03a1d54d3a2b
parent 207606 afce797ef2b440c4a75ad30d68fb8a3465a16db9
child 207608 3231ca1bb83356e14a315210be78483ea861d935
push idunknown
push userunknown
push dateunknown
reviewerssmaug
bugs1048242
milestone34.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 1048242 - Fix more bad implicit constructors in docshell; r=smaug
docshell/base/nsDSURIContentListener.h
docshell/base/nsDocShell.h
docshell/base/nsDocShellEditorData.h
docshell/base/nsDocShellEnumerator.h
docshell/shistory/src/nsSHistory.h
uriloader/base/nsDocLoader.h
--- a/docshell/base/nsDSURIContentListener.h
+++ b/docshell/base/nsDSURIContentListener.h
@@ -24,17 +24,17 @@ class nsDSURIContentListener :
 friend class nsDocShell;
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIURICONTENTLISTENER
 
     nsresult Init();
 
 protected:
-    nsDSURIContentListener(nsDocShell* aDocShell);
+    explicit nsDSURIContentListener(nsDocShell* aDocShell);
     virtual ~nsDSURIContentListener();
 
     void DropDocShellreference() {
         mDocShell = nullptr;
     }
 
     // Determine if X-Frame-Options allows content to be framed
     // as a subdocument
--- a/docshell/base/nsDocShell.h
+++ b/docshell/base/nsDocShell.h
@@ -654,17 +654,17 @@ protected:
      * After calling this, mTiming is non-null.
      */
     void MaybeInitTiming();
 
     // Event type dispatched by RestorePresentation
     class RestorePresentationEvent : public nsRunnable {
     public:
         NS_DECL_NSIRUNNABLE
-        RestorePresentationEvent(nsDocShell *ds) : mDocShell(ds) {}
+        explicit RestorePresentationEvent(nsDocShell *ds) : mDocShell(ds) {}
         void Revoke() { mDocShell = nullptr; }
     private:
         nsRefPtr<nsDocShell> mDocShell;
     };
 
     bool JustStartedNetworkLoad();
 
     enum FrameType {
@@ -917,17 +917,17 @@ private:
 #ifdef DEBUG
     // We're counting the number of |nsDocShells| to help find leaks
     static unsigned long gNumberOfDocShells;
 #endif /* DEBUG */
 
 public:
     class InterfaceRequestorProxy : public nsIInterfaceRequestor {
     public:
-        InterfaceRequestorProxy(nsIInterfaceRequestor* p);
+        explicit InterfaceRequestorProxy(nsIInterfaceRequestor* p);
         NS_DECL_THREADSAFE_ISUPPORTS
         NS_DECL_NSIINTERFACEREQUESTOR
  
     protected:
         virtual ~InterfaceRequestorProxy();
         InterfaceRequestorProxy() {}
         nsWeakPtr mWeakPtr;
     };
--- a/docshell/base/nsDocShellEditorData.h
+++ b/docshell/base/nsDocShellEditorData.h
@@ -15,17 +15,17 @@
 class nsIDocShell;
 class nsIEditingSession;
 class nsIEditor;
 
 class nsDocShellEditorData
 {
 public:
 
-  nsDocShellEditorData(nsIDocShell* inOwningDocShell);
+  explicit nsDocShellEditorData(nsIDocShell* inOwningDocShell);
   ~nsDocShellEditorData();
 
   nsresult MakeEditable(bool inWaitForUriLoad);
   bool GetEditable();
   nsresult CreateEditor();
   nsresult GetEditingSession(nsIEditingSession **outEditingSession);
   nsresult GetEditor(nsIEditor **outEditor);
   nsresult SetEditor(nsIEditor *inEditor);
--- a/docshell/base/nsDocShellEnumerator.h
+++ b/docshell/base/nsDocShellEnumerator.h
@@ -37,17 +37,17 @@ protected:
     enumerateForwards,
     enumerateBackwards
   };
 
   virtual                     ~nsDocShellEnumerator();
 
 public:
 
-                              nsDocShellEnumerator(int32_t inEnumerationDirection);
+                              explicit nsDocShellEnumerator(int32_t inEnumerationDirection);
 
   // nsISupports
   NS_DECL_ISUPPORTS
   
   // nsISimpleEnumerator
   NS_DECL_NSISIMPLEENUMERATOR
   
 public:
--- a/docshell/shistory/src/nsSHistory.h
+++ b/docshell/shistory/src/nsSHistory.h
@@ -103,17 +103,17 @@ protected:
 //*****************************************************************************
 class nsSHEnumerator : public nsISimpleEnumerator
 {
 public:
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSISIMPLEENUMERATOR
 
-  nsSHEnumerator(nsSHistory *  aHistory);
+  explicit nsSHEnumerator(nsSHistory *  aHistory);
   
 protected:
   friend class nsSHistory;
   virtual ~nsSHEnumerator();
 private:
   int32_t     mIndex;
   nsSHistory *  mSHistory;  
 };
--- a/uriloader/base/nsDocLoader.h
+++ b/uriloader/base/nsDocLoader.h
@@ -204,30 +204,30 @@ protected:
 protected:
     struct nsStatusInfo : public mozilla::LinkedListElement<nsStatusInfo>
     {
         nsString mStatusMessage;
         nsresult mStatusCode;
         // Weak mRequest is ok; we'll be told if it decides to go away.
         nsIRequest * const mRequest;
 
-        nsStatusInfo(nsIRequest* aRequest) :
+        explicit nsStatusInfo(nsIRequest* aRequest) :
             mRequest(aRequest)
         {
             MOZ_COUNT_CTOR(nsStatusInfo);
         }
         ~nsStatusInfo()
         {
             MOZ_COUNT_DTOR(nsStatusInfo);
         }
     };
 
     struct nsRequestInfo : public PLDHashEntryHdr
     {
-        nsRequestInfo(const void* key)
+        explicit nsRequestInfo(const void* key)
             : mKey(key), mCurrentProgress(0), mMaxProgress(0), mUploading(false)
             , mLastStatus(nullptr)
         {
             MOZ_COUNT_CTOR(nsRequestInfo);
         }
 
         ~nsRequestInfo()
         {