Bug 1060982 - Fix more bad implicit constructors in the HTML parser; r=hsivonen

This commit is contained in:
Ehsan Akhgari
2014-09-01 18:04:20 -04:00
parent 0bbb1df5e1
commit 1a06ad4b0d
6 changed files with 10 additions and 9 deletions

View File

@@ -23,6 +23,7 @@
#ifndef jArray_h
#define jArray_h
#include "mozilla/Attributes.h"
#include "mozilla/NullPtr.h"
#include "nsDebug.h"
@@ -77,7 +78,7 @@ class autoJArray {
, length(0)
{
}
autoJArray(const jArray<T,L>& other)
MOZ_IMPLICIT autoJArray(const jArray<T,L>& other)
: arr(other.arr)
, length(other.length)
{

View File

@@ -16,7 +16,7 @@ class nsHtml5Atom;
class nsHtml5AtomEntry : public nsStringHashKey
{
public:
nsHtml5AtomEntry(KeyTypePointer aStr);
explicit nsHtml5AtomEntry(KeyTypePointer aStr);
nsHtml5AtomEntry(const nsHtml5AtomEntry& aOther);
~nsHtml5AtomEntry();
inline nsHtml5Atom* GetAtom()

View File

@@ -107,7 +107,7 @@ public:
protected:
nsHtml5DocumentBuilder(bool aRunsToCompletion);
explicit nsHtml5DocumentBuilder(bool aRunsToCompletion);
virtual ~nsHtml5DocumentBuilder();
protected:

View File

@@ -14,7 +14,7 @@ class nsHtml5OwningUTF16Buffer : public nsHtml5UTF16Buffer
/**
* Passes a buffer and its length to the superclass constructor.
*/
nsHtml5OwningUTF16Buffer(char16_t* aBuffer);
explicit nsHtml5OwningUTF16Buffer(char16_t* aBuffer);
public:
@@ -22,7 +22,7 @@ class nsHtml5OwningUTF16Buffer : public nsHtml5UTF16Buffer
* Constructor for a parser key placeholder. (No actual buffer.)
* @param aKey a parser key
*/
nsHtml5OwningUTF16Buffer(void* aKey);
explicit nsHtml5OwningUTF16Buffer(void* aKey);
protected:
/**

View File

@@ -14,7 +14,7 @@ class nsHtml5RefPtrReleaser : public nsRunnable
private:
T* mPtr;
public:
nsHtml5RefPtrReleaser(T* aPtr)
explicit nsHtml5RefPtrReleaser(T* aPtr)
: mPtr(aPtr)
{}
NS_IMETHODIMP Run()
@@ -97,7 +97,7 @@ class nsHtml5RefPtr
mRawPtr->AddRef();
}
nsHtml5RefPtr( T* aRawPtr )
explicit nsHtml5RefPtr( T* aRawPtr )
: mRawPtr(aRawPtr)
// construct from a raw pointer (of the right type)
{
@@ -105,7 +105,7 @@ class nsHtml5RefPtr
mRawPtr->AddRef();
}
nsHtml5RefPtr( const already_AddRefed<T>& aSmartPtr )
explicit nsHtml5RefPtr( const already_AddRefed<T>& aSmartPtr )
: mRawPtr(aSmartPtr.mRawPtr)
// construct from |dont_AddRef(expr)|
{

View File

@@ -32,7 +32,7 @@ class nsHtml5StreamListener : public nsIStreamListener,
public nsIThreadRetargetableStreamListener
{
public:
nsHtml5StreamListener(nsHtml5StreamParser* aDelegate);
explicit nsHtml5StreamListener(nsHtml5StreamParser* aDelegate);
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIREQUESTOBSERVER