зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1048272 - Fix some bad implicit constructors in storage; r=mak
--HG-- extra : rebase_source : 5fe5099a330cf53fda89f47e76429f1c16f19b06
This commit is contained in:
Родитель
c86ef2548d
Коммит
23c01b7b38
|
@ -35,7 +35,7 @@ public:
|
|||
* used for. This nsCOMPtr must at least live as long as this class,
|
||||
* otherwise crashes will happen.
|
||||
*/
|
||||
StatementCache(nsCOMPtr<mozIStorageConnection>& aConnection)
|
||||
explicit StatementCache(nsCOMPtr<mozIStorageConnection>& aConnection)
|
||||
: mConnection(aConnection)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -150,7 +150,7 @@ mozStorageTransaction;
|
|||
class MOZ_STACK_CLASS mozStorageStatementScoper
|
||||
{
|
||||
public:
|
||||
mozStorageStatementScoper(mozIStorageStatement* aStatement)
|
||||
explicit mozStorageStatementScoper(mozIStorageStatement* aStatement)
|
||||
: mStatement(aStatement)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ public:
|
|||
* @param aName
|
||||
* A name which can be used to reference this mutex.
|
||||
*/
|
||||
SQLiteMutex(const char *aName)
|
||||
explicit SQLiteMutex(const char *aName)
|
||||
: BlockingResourceBase(aName, eMutex)
|
||||
, mMutex(nullptr)
|
||||
{
|
||||
|
@ -131,7 +131,7 @@ private:
|
|||
class MOZ_STACK_CLASS SQLiteMutexAutoLock
|
||||
{
|
||||
public:
|
||||
SQLiteMutexAutoLock(SQLiteMutex &aMutex)
|
||||
explicit SQLiteMutexAutoLock(SQLiteMutex &aMutex)
|
||||
: mMutex(aMutex)
|
||||
{
|
||||
mMutex.lock();
|
||||
|
@ -153,7 +153,7 @@ private:
|
|||
class MOZ_STACK_CLASS SQLiteMutexAutoUnlock
|
||||
{
|
||||
public:
|
||||
SQLiteMutexAutoUnlock(SQLiteMutex &aMutex)
|
||||
explicit SQLiteMutexAutoUnlock(SQLiteMutex &aMutex)
|
||||
: mMutex(aMutex)
|
||||
{
|
||||
mMutex.unlock();
|
||||
|
|
|
@ -78,7 +78,7 @@ public:
|
|||
* IOInterposer. Filename will be reported as NULL, and reference will be
|
||||
* either "sqlite-mainthread" or "sqlite-otherthread".
|
||||
*/
|
||||
IOThreadAutoTimer(Telemetry::ID id,
|
||||
explicit IOThreadAutoTimer(Telemetry::ID id,
|
||||
IOInterposeObserver::Operation aOp = IOInterposeObserver::OpNone)
|
||||
: start(TimeStamp::Now()),
|
||||
id(id),
|
||||
|
@ -92,7 +92,7 @@ public:
|
|||
*
|
||||
* @param aOp IO Operation to report through the IOInterposer.
|
||||
*/
|
||||
IOThreadAutoTimer(IOInterposeObserver::Operation aOp)
|
||||
explicit IOThreadAutoTimer(IOInterposeObserver::Operation aOp)
|
||||
: start(TimeStamp::Now()),
|
||||
id(Telemetry::HistogramCount),
|
||||
op(aOp)
|
||||
|
|
|
@ -109,7 +109,7 @@ class Vacuumer : public BaseCallback
|
|||
public:
|
||||
NS_DECL_MOZISTORAGESTATEMENTCALLBACK
|
||||
|
||||
Vacuumer(mozIStorageVacuumParticipant *aParticipant);
|
||||
explicit Vacuumer(mozIStorageVacuumParticipant *aParticipant);
|
||||
|
||||
bool execute();
|
||||
nsresult notifyCompletion(bool aSucceeded);
|
||||
|
|
|
@ -374,7 +374,7 @@ class Variant : public Variant_base
|
|||
}
|
||||
|
||||
public:
|
||||
Variant(const typename variant_storage_traits<DataType, Adopting>::ConstructorType aData)
|
||||
explicit Variant(const typename variant_storage_traits<DataType, Adopting>::ConstructorType aData)
|
||||
{
|
||||
variant_storage_traits<DataType, Adopting>::storage_conversion(aData, &mData);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ class AsyncStatementParams MOZ_FINAL : public mozIStorageStatementParams
|
|||
, public nsIXPCScriptable
|
||||
{
|
||||
public:
|
||||
AsyncStatementParams(AsyncStatement *aStatement);
|
||||
explicit AsyncStatementParams(AsyncStatement *aStatement);
|
||||
|
||||
// interfaces
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
protected:
|
||||
virtual ~BindingParams() {}
|
||||
|
||||
BindingParams(mozIStorageBindingParamsArray *aOwningArray);
|
||||
explicit BindingParams(mozIStorageBindingParamsArray *aOwningArray);
|
||||
nsCOMArray<nsIVariant> mParameters;
|
||||
bool mLocked;
|
||||
|
||||
|
@ -97,7 +97,7 @@ public:
|
|||
|
||||
virtual already_AddRefed<mozIStorageError> bind(sqlite3_stmt * aStatement);
|
||||
|
||||
AsyncBindingParams(mozIStorageBindingParamsArray *aOwningArray);
|
||||
explicit AsyncBindingParams(mozIStorageBindingParamsArray *aOwningArray);
|
||||
virtual ~AsyncBindingParams() {}
|
||||
|
||||
private:
|
||||
|
|
|
@ -28,7 +28,7 @@ public:
|
|||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_MOZISTORAGEBINDINGPARAMSARRAY
|
||||
|
||||
BindingParamsArray(StorageBaseStatementInternal *aOwningStatement);
|
||||
explicit BindingParamsArray(StorageBaseStatementInternal *aOwningStatement);
|
||||
|
||||
typedef array_type::size_type size_type;
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ namespace {
|
|||
class CallbackEvent : public nsRunnable
|
||||
{
|
||||
public:
|
||||
CallbackEvent(mozIStorageCompletionCallback *aCallback)
|
||||
explicit CallbackEvent(mozIStorageCompletionCallback *aCallback)
|
||||
: mCallback(aCallback)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ template <class T, size_t N> class AutoArray
|
|||
|
||||
public:
|
||||
|
||||
AutoArray(size_t size)
|
||||
explicit AutoArray(size_t size)
|
||||
: mBuffer(size <= N ? mAutoBuffer : new T[size])
|
||||
{
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ class StatementParams MOZ_FINAL : public mozIStorageStatementParams
|
|||
, public nsIXPCScriptable
|
||||
{
|
||||
public:
|
||||
StatementParams(mozIStorageStatement *aStatement);
|
||||
explicit StatementParams(mozIStorageStatement *aStatement);
|
||||
|
||||
// interfaces
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
|
@ -24,7 +24,7 @@ public:
|
|||
NS_DECL_MOZISTORAGESTATEMENTROW
|
||||
NS_DECL_NSIXPCSCRIPTABLE
|
||||
|
||||
StatementRow(Statement *aStatement);
|
||||
explicit StatementRow(Statement *aStatement);
|
||||
protected:
|
||||
|
||||
~StatementRow() {}
|
||||
|
|
Загрузка…
Ссылка в новой задаче