Bug 1068020 - Fix more bad implicit constructors in DOM; r=baku

This commit is contained in:
Ehsan Akhgari 2014-09-17 17:53:42 -04:00
parent 6a19b2619a
commit d31e4c0d28
10 changed files with 36 additions and 36 deletions

View File

@ -53,8 +53,8 @@ public:
class SVGElementMetrics : public UserSpaceMetrics
{
public:
SVGElementMetrics(nsSVGElement* aSVGElement,
mozilla::dom::SVGSVGElement* aCtx = nullptr);
explicit SVGElementMetrics(nsSVGElement* aSVGElement,
mozilla::dom::SVGSVGElement* aCtx = nullptr);
virtual float GetEmLength() const MOZ_OVERRIDE;
virtual float GetExLength() const MOZ_OVERRIDE;
@ -70,7 +70,7 @@ private:
class NonSVGFrameUserSpaceMetrics : public UserSpaceMetricsWithSize
{
public:
NonSVGFrameUserSpaceMetrics(nsIFrame* aFrame);
explicit NonSVGFrameUserSpaceMetrics(nsIFrame* aFrame);
virtual float GetEmLength() const MOZ_OVERRIDE;
virtual float GetExLength() const MOZ_OVERRIDE;

View File

@ -107,7 +107,7 @@ class MOZ_STACK_CLASS AutoSetCurrentTransaction MOZ_FINAL
IDBTransaction** mThreadLocalSlot;
public:
AutoSetCurrentTransaction(IDBTransaction* aTransaction)
explicit AutoSetCurrentTransaction(IDBTransaction* aTransaction)
: mTransaction(aTransaction)
, mPreviousTransaction(nullptr)
, mThreadLocalSlot(nullptr)
@ -1933,7 +1933,7 @@ class BackgroundCursorChild::DelayedDeleteRunnable MOZ_FINAL
nsRefPtr<IDBRequest> mRequest;
public:
DelayedDeleteRunnable(BackgroundCursorChild* aActor)
explicit DelayedDeleteRunnable(BackgroundCursorChild* aActor)
: mActor(aActor)
, mRequest(aActor->mRequest)
{

View File

@ -75,7 +75,7 @@ public:
private:
// Only created by IDBFactory.
BackgroundFactoryChild(IDBFactory* aFactory);
explicit BackgroundFactoryChild(IDBFactory* aFactory);
// Only destroyed by mozilla::ipc::BackgroundChildImpl.
~BackgroundFactoryChild();
@ -143,7 +143,7 @@ public:
}
protected:
BackgroundRequestChildBase(IDBRequest* aRequest);
explicit BackgroundRequestChildBase(IDBRequest* aRequest);
virtual
~BackgroundRequestChildBase();
@ -354,7 +354,7 @@ public:
protected:
BackgroundTransactionBase();
BackgroundTransactionBase(IDBTransaction* aTransaction);
explicit BackgroundTransactionBase(IDBTransaction* aTransaction);
virtual
~BackgroundTransactionBase();
@ -389,7 +389,7 @@ public:
private:
// Only created by IDBDatabase.
BackgroundTransactionChild(IDBTransaction* aTransaction);
explicit BackgroundTransactionChild(IDBTransaction* aTransaction);
// Only destroyed by BackgroundDatabaseChild.
~BackgroundTransactionChild();
@ -438,7 +438,7 @@ public:
private:
// Only created by BackgroundDatabaseChild.
BackgroundVersionChangeTransactionChild(IDBOpenDBRequest* aOpenDBRequest);
explicit BackgroundVersionChangeTransactionChild(IDBOpenDBRequest* aOpenDBRequest);
// Only destroyed by BackgroundDatabaseChild.
~BackgroundVersionChangeTransactionChild();
@ -486,7 +486,7 @@ class BackgroundRequestChild MOZ_FINAL
nsTArray<nsRefPtr<FileInfo>> mFileInfos;
public:
BackgroundRequestChild(IDBRequest* aRequest);
explicit BackgroundRequestChild(IDBRequest* aRequest);
void
HoldFileInfosUntilComplete(nsTArray<nsRefPtr<FileInfo>>& aFileInfos);

View File

@ -254,7 +254,7 @@ struct FullDatabaseMetadata
int64_t mNextIndexId;
public:
FullDatabaseMetadata(const DatabaseMetadata& aCommonMetadata)
explicit FullDatabaseMetadata(const DatabaseMetadata& aCommonMetadata)
: mCommonMetadata(aCommonMetadata)
, mNextObjectStoreId(0)
, mNextIndexId(0)
@ -320,7 +320,7 @@ private:
MOZ_ASSERT(aId);
}
MetadataNameOrIdMatcher(const int64_t& aId)
explicit MetadataNameOrIdMatcher(const int64_t& aId)
: mId(aId)
, mMetadata(nullptr)
, mCheckName(false)
@ -2724,7 +2724,7 @@ public:
Cleanup();
protected:
TransactionDatabaseOperationBase(TransactionBase* aTransaction);
explicit TransactionDatabaseOperationBase(TransactionBase* aTransaction);
virtual
~TransactionDatabaseOperationBase();
@ -2790,7 +2790,7 @@ public:
private:
// Only constructed in Create().
Factory(const OptionalWindowId& aOptionalWindowId);
explicit Factory(const OptionalWindowId& aOptionalWindowId);
// Reference counted.
~Factory();
@ -3073,7 +3073,7 @@ public:
private:
// Called when sending to the child.
DatabaseFile(FileInfo* aFileInfo)
explicit DatabaseFile(FileInfo* aFileInfo)
: mFileInfo(aFileInfo)
{
AssertIsOnBackgroundThread();
@ -3471,7 +3471,7 @@ class TransactionBase::UpdateRefcountFunction MOZ_FINAL
int32_t mSavepointDelta;
public:
FileInfoEntry(FileInfo* aFileInfo)
explicit FileInfoEntry(FileInfo* aFileInfo)
: mFileInfo(aFileInfo)
, mDelta(0)
, mSavepointDelta(0)
@ -3531,7 +3531,7 @@ public:
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_MOZISTORAGEFUNCTION
UpdateRefcountFunction(FileManager* aFileManager)
explicit UpdateRefcountFunction(FileManager* aFileManager)
: mFileManager(aFileManager)
, mInSavepoint(false)
{ }
@ -3736,7 +3736,7 @@ class VersionChangeTransaction MOZ_FINAL
private:
// Only called by OpenDatabaseOp.
VersionChangeTransaction(OpenDatabaseOp* aOpenDatabaseOp);
explicit VersionChangeTransaction(OpenDatabaseOp* aOpenDatabaseOp);
// Reference counted.
~VersionChangeTransaction();
@ -4017,7 +4017,7 @@ struct FactoryOp::MaybeBlockedDatabaseInfo MOZ_FINAL
nsRefPtr<Database> mDatabase;
bool mBlocked;
MaybeBlockedDatabaseInfo(Database* aDatabase)
MOZ_IMPLICIT MaybeBlockedDatabaseInfo(Database* aDatabase)
: mDatabase(aDatabase)
, mBlocked(false)
{
@ -4145,7 +4145,7 @@ class OpenDatabaseOp::VersionChangeOp MOZ_FINAL
uint64_t mPreviousVersion;
private:
VersionChangeOp(OpenDatabaseOp* aOpenDatabaseOp)
explicit VersionChangeOp(OpenDatabaseOp* aOpenDatabaseOp)
: TransactionDatabaseOperationBase(
aOpenDatabaseOp->mVersionChangeTransaction)
, mOpenDatabaseOp(aOpenDatabaseOp)
@ -4226,7 +4226,7 @@ class DeleteDatabaseOp::VersionChangeOp MOZ_FINAL
nsRefPtr<DeleteDatabaseOp> mDeleteDatabaseOp;
private:
VersionChangeOp(DeleteDatabaseOp* aDeleteDatabaseOp)
explicit VersionChangeOp(DeleteDatabaseOp* aDeleteDatabaseOp)
: mDeleteDatabaseOp(aDeleteDatabaseOp)
{
MOZ_ASSERT(aDeleteDatabaseOp);
@ -4258,7 +4258,7 @@ public:
Cleanup() MOZ_OVERRIDE;
protected:
VersionChangeTransactionOp(VersionChangeTransaction* aTransaction)
explicit VersionChangeTransactionOp(VersionChangeTransaction* aTransaction)
: TransactionDatabaseOperationBase(aTransaction)
{ }
@ -4452,7 +4452,7 @@ public:
Cleanup() MOZ_OVERRIDE;
protected:
NormalTransactionOp(TransactionBase* aTransaction)
explicit NormalTransactionOp(TransactionBase* aTransaction)
: TransactionDatabaseOperationBase(aTransaction)
, mResponseSent(false)
{ }
@ -4886,7 +4886,7 @@ protected:
DebugOnly<bool> mResponseSent;
protected:
CursorOpBase(Cursor* aCursor)
explicit CursorOpBase(Cursor* aCursor)
: TransactionDatabaseOperationBase(aCursor->mTransaction)
, mCursor(aCursor)
, mResponseSent(false)
@ -5168,7 +5168,7 @@ class QuotaClient::ShutdownTransactionThreadPoolRunnable MOZ_FINAL
public:
ShutdownTransactionThreadPoolRunnable(QuotaClient* aQuotaClient)
explicit ShutdownTransactionThreadPoolRunnable(QuotaClient* aQuotaClient)
: mQuotaClient(aQuotaClient)
, mHasRequestedShutDown(false)
{
@ -5664,7 +5664,7 @@ FullDatabaseMetadata::Duplicate() const
FullObjectStoreMetadata& mNew;
public:
IndexClosure(FullObjectStoreMetadata& aNew)
explicit IndexClosure(FullObjectStoreMetadata& aNew)
: mNew(aNew)
{ }
@ -5695,7 +5695,7 @@ FullDatabaseMetadata::Duplicate() const
FullDatabaseMetadata& mNew;
public:
ObjectStoreClosure(FullDatabaseMetadata& aNew)
explicit ObjectStoreClosure(FullDatabaseMetadata& aNew)
: mNew(aNew)
{ }
@ -12018,7 +12018,7 @@ OpenDatabaseOp::MetadataToSpec(DatabaseSpec& aSpec)
}
private:
Helper(DatabaseSpec& aSpec)
explicit Helper(DatabaseSpec& aSpec)
: mSpec(aSpec)
, mCurrentObjectStoreSpec(nullptr)
{ }
@ -12095,7 +12095,7 @@ OpenDatabaseOp::AssertMetadataConsistency(const FullDatabaseMetadata* aMetadata)
}
private:
Helper(const ObjectStoreTable& aOtherObjectStores)
explicit Helper(const ObjectStoreTable& aOtherObjectStores)
: mOtherObjectStores(aOtherObjectStores)
, mCurrentOtherIndexTable(nullptr)
{ }

View File

@ -117,7 +117,7 @@ class DatabaseFile MOZ_FINAL
IDBDatabase* mDatabase;
public:
DatabaseFile(IDBDatabase* aDatabase)
explicit DatabaseFile(IDBDatabase* aDatabase)
: mDatabase(aDatabase)
{
MOZ_ASSERT(aDatabase);

View File

@ -78,7 +78,7 @@ class IDBFactory::BackgroundCreateCallback MOZ_FINAL
nsRefPtr<IDBFactory> mFactory;
public:
BackgroundCreateCallback(IDBFactory* aFactory)
explicit BackgroundCreateCallback(IDBFactory* aFactory)
: mFactory(aFactory)
{
MOZ_ASSERT(aFactory);

View File

@ -73,7 +73,7 @@ struct IDBObjectStore::StructuredCloneWriteInfo
IDBDatabase* mDatabase;
uint64_t mOffsetToKeyProp;
StructuredCloneWriteInfo(IDBDatabase* aDatabase)
explicit StructuredCloneWriteInfo(IDBDatabase* aDatabase)
: mDatabase(aDatabase)
, mOffsetToKeyProp(0)
{

View File

@ -68,7 +68,7 @@ struct StructuredCloneReadInfo
// In IndexedDatabaseInlines.h
inline
StructuredCloneReadInfo(SerializedStructuredCloneReadInfo&& aOther);
MOZ_IMPLICIT StructuredCloneReadInfo(SerializedStructuredCloneReadInfo&& aOther);
};
} // namespace indexedDB

View File

@ -934,7 +934,7 @@ public:
CommonInit(aActor);
}
RemoteBlob(BlobChild* aActor)
explicit RemoteBlob(BlobChild* aActor)
: DOMFileImplBase(EmptyString(), EmptyString(), UINT64_MAX, UINT64_MAX)
{
CommonInit(aActor);

View File

@ -38,7 +38,7 @@ protected:
// Constructor used to create AbortablePromise for JavaScript. It should be
// called by the static AbortablePromise::Constructor.
AbortablePromise(nsIGlobalObject* aGlobal);
explicit AbortablePromise(nsIGlobalObject* aGlobal);
virtual ~AbortablePromise();