Bug 1068020 - Fix more bad implicit constructors in DOM; r=baku
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 17 Sep 2014 17:53:42 -0400
changeset 205913 c47bac10dc1879c8b44da056fac791ccf208d7eb
parent 205912 13c6ae2f5f3e6602b883381769c523f1dcea249d
child 205914 372251a60bd8f9a11c9a7deacfa221e605b5e4c8
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersbaku
bugs1068020
milestone35.0a1
Bug 1068020 - Fix more bad implicit constructors in DOM; r=baku
content/svg/content/src/nsSVGLength2.h
dom/indexedDB/ActorsChild.cpp
dom/indexedDB/ActorsChild.h
dom/indexedDB/ActorsParent.cpp
dom/indexedDB/IDBDatabase.cpp
dom/indexedDB/IDBFactory.cpp
dom/indexedDB/IDBObjectStore.cpp
dom/indexedDB/IndexedDatabase.h
dom/ipc/Blob.cpp
dom/promise/AbortablePromise.h
--- a/content/svg/content/src/nsSVGLength2.h
+++ b/content/svg/content/src/nsSVGLength2.h
@@ -48,34 +48,34 @@ class UserSpaceMetricsWithSize : public 
 public:
   virtual gfx::Size GetSize() const = 0;
   virtual float GetAxisLength(uint8_t aCtxType) const MOZ_OVERRIDE;
 };
 
 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;
   virtual float GetAxisLength(uint8_t aCtxType) const MOZ_OVERRIDE;
 
 private:
   bool EnsureCtx() const;
 
   nsSVGElement* mSVGElement;
   mutable mozilla::dom::SVGSVGElement* mCtx;
 };
 
 class NonSVGFrameUserSpaceMetrics : public UserSpaceMetricsWithSize
 {
 public:
-  NonSVGFrameUserSpaceMetrics(nsIFrame* aFrame);
+  explicit NonSVGFrameUserSpaceMetrics(nsIFrame* aFrame);
 
   virtual float GetEmLength() const MOZ_OVERRIDE;
   virtual float GetExLength() const MOZ_OVERRIDE;
   virtual gfx::Size GetSize() const MOZ_OVERRIDE;
 
 private:
   nsIFrame* mFrame;
 };
--- a/dom/indexedDB/ActorsChild.cpp
+++ b/dom/indexedDB/ActorsChild.cpp
@@ -102,17 +102,17 @@ class MOZ_STACK_CLASS AutoSetCurrentTran
 {
   typedef mozilla::ipc::BackgroundChildImpl BackgroundChildImpl;
 
   IDBTransaction* const mTransaction;
   IDBTransaction* mPreviousTransaction;
   IDBTransaction** mThreadLocalSlot;
 
 public:
-  AutoSetCurrentTransaction(IDBTransaction* aTransaction)
+  explicit AutoSetCurrentTransaction(IDBTransaction* aTransaction)
     : mTransaction(aTransaction)
     , mPreviousTransaction(nullptr)
     , mThreadLocalSlot(nullptr)
   {
     if (aTransaction) {
       BackgroundChildImpl::ThreadLocal* threadLocal =
         BackgroundChildImpl::GetThreadLocalForCurrentThread();
       MOZ_ASSERT(threadLocal);
@@ -1928,17 +1928,17 @@ BackgroundRequestChild::Recv__delete__(c
 
 class BackgroundCursorChild::DelayedDeleteRunnable MOZ_FINAL
   : public nsIRunnable
 {
   BackgroundCursorChild* mActor;
   nsRefPtr<IDBRequest> mRequest;
 
 public:
-  DelayedDeleteRunnable(BackgroundCursorChild* aActor)
+  explicit DelayedDeleteRunnable(BackgroundCursorChild* aActor)
     : mActor(aActor)
     , mRequest(aActor->mRequest)
   {
     MOZ_ASSERT(aActor);
     aActor->AssertIsOnOwningThread();
     MOZ_ASSERT(mRequest);
   }
 
--- a/dom/indexedDB/ActorsChild.h
+++ b/dom/indexedDB/ActorsChild.h
@@ -70,17 +70,17 @@ public:
   GetDOMObject() const
   {
     AssertIsOnOwningThread();
     return mFactory;
   }
 
 private:
   // Only created by IDBFactory.
-  BackgroundFactoryChild(IDBFactory* aFactory);
+  explicit BackgroundFactoryChild(IDBFactory* aFactory);
 
   // Only destroyed by mozilla::ipc::BackgroundChildImpl.
   ~BackgroundFactoryChild();
 
   void
   SendDeleteMeInternal();
 
   // IPDL methods are only called by IPDL.
@@ -138,17 +138,17 @@ public:
   bool
   IsActorDestroyed() const
   {
     AssertIsOnOwningThread();
     return mActorDestroyed;
   }
 
 protected:
-  BackgroundRequestChildBase(IDBRequest* aRequest);
+  explicit BackgroundRequestChildBase(IDBRequest* aRequest);
 
   virtual
   ~BackgroundRequestChildBase();
 
   void
   NoteActorDestroyed();
 };
 
@@ -349,17 +349,17 @@ public:
   GetDOMObject() const
   {
     AssertIsOnOwningThread();
     return mTransaction;
   }
 
 protected:
   BackgroundTransactionBase();
-  BackgroundTransactionBase(IDBTransaction* aTransaction);
+  explicit BackgroundTransactionBase(IDBTransaction* aTransaction);
 
   virtual
   ~BackgroundTransactionBase();
 
   void
   NoteActorDestroyed();
 
   void
@@ -384,17 +384,17 @@ public:
   AssertIsOnOwningThread() const MOZ_OVERRIDE;
 #endif
 
   void
   SendDeleteMeInternal();
 
 private:
   // Only created by IDBDatabase.
-  BackgroundTransactionChild(IDBTransaction* aTransaction);
+  explicit BackgroundTransactionChild(IDBTransaction* aTransaction);
 
   // Only destroyed by BackgroundDatabaseChild.
   ~BackgroundTransactionChild();
 
   // IPDL methods are only called by IPDL.
   virtual void
   ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
 
@@ -433,17 +433,17 @@ public:
   AssertIsOnOwningThread() const MOZ_OVERRIDE;
 #endif
 
   void
   SendDeleteMeInternal();
 
 private:
   // Only created by BackgroundDatabaseChild.
-  BackgroundVersionChangeTransactionChild(IDBOpenDBRequest* aOpenDBRequest);
+  explicit BackgroundVersionChangeTransactionChild(IDBOpenDBRequest* aOpenDBRequest);
 
   // Only destroyed by BackgroundDatabaseChild.
   ~BackgroundVersionChangeTransactionChild();
 
   // Only called by BackgroundDatabaseChild.
   void
   SetDOMTransaction(IDBTransaction* aDOMObject)
   {
@@ -481,17 +481,17 @@ class BackgroundRequestChild MOZ_FINAL
 {
   friend class BackgroundTransactionChild;
   friend class BackgroundVersionChangeTransactionChild;
 
   nsRefPtr<IDBTransaction> mTransaction;
   nsTArray<nsRefPtr<FileInfo>> mFileInfos;
 
 public:
-  BackgroundRequestChild(IDBRequest* aRequest);
+  explicit BackgroundRequestChild(IDBRequest* aRequest);
 
   void
   HoldFileInfosUntilComplete(nsTArray<nsRefPtr<FileInfo>>& aFileInfos);
 
 private:
   // Only destroyed by BackgroundTransactionChild or
   // BackgroundVersionChangeTransactionChild.
   ~BackgroundRequestChild();
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -249,17 +249,17 @@ struct FullDatabaseMetadata
   nsCString mDatabaseId;
   nsString mFilePath;
   ObjectStoreTable mObjectStores;
 
   int64_t mNextObjectStoreId;
   int64_t mNextIndexId;
 
 public:
-  FullDatabaseMetadata(const DatabaseMetadata& aCommonMetadata)
+  explicit FullDatabaseMetadata(const DatabaseMetadata& aCommonMetadata)
     : mCommonMetadata(aCommonMetadata)
     , mNextObjectStoreId(0)
     , mNextIndexId(0)
   {
     AssertIsOnBackgroundThread();
   }
 
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(FullDatabaseMetadata)
@@ -315,17 +315,17 @@ private:
     , mName(PromiseFlatString(aName))
     , mMetadata(nullptr)
     , mCheckName(true)
   {
     AssertIsOnBackgroundThread();
     MOZ_ASSERT(aId);
   }
 
-  MetadataNameOrIdMatcher(const int64_t& aId)
+  explicit MetadataNameOrIdMatcher(const int64_t& aId)
     : mId(aId)
     , mMetadata(nullptr)
     , mCheckName(false)
   {
     AssertIsOnBackgroundThread();
     MOZ_ASSERT(aId);
   }
 
@@ -2719,17 +2719,17 @@ public:
 
   // This callback will be called on the background thread before releasing the
   // final reference to this request object. Subclasses may perform any
   // additional cleanup here but must always call the base class implementation.
   virtual void
   Cleanup();
 
 protected:
-  TransactionDatabaseOperationBase(TransactionBase* aTransaction);
+  explicit TransactionDatabaseOperationBase(TransactionBase* aTransaction);
 
   virtual
   ~TransactionDatabaseOperationBase();
 
   // Must be overridden in subclasses. Called on the target thread to allow the
   // subclass to perform necessary database or file operations. A successful
   // return value will trigger a SendSuccessResult callback on the background
   // thread while a failure value will trigger a SendFailureResult callback.
@@ -2785,17 +2785,17 @@ public:
     AssertIsOnBackgroundThread();
     MOZ_ASSERT(mTransactionThreadPool);
 
     return mTransactionThreadPool;
   }
 
 private:
   // Only constructed in Create().
-  Factory(const OptionalWindowId& aOptionalWindowId);
+  explicit Factory(const OptionalWindowId& aOptionalWindowId);
 
   // Reference counted.
   ~Factory();
 
   // IPDL methods are only called by IPDL.
   virtual void
   ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
 
@@ -3068,17 +3068,17 @@ public:
   already_AddRefed<nsIInputStream>
   GetInputStream() const;
 
   void
   ClearInputStreamParams();
 
 private:
   // Called when sending to the child.
-  DatabaseFile(FileInfo* aFileInfo)
+  explicit DatabaseFile(FileInfo* aFileInfo)
     : mFileInfo(aFileInfo)
   {
     AssertIsOnBackgroundThread();
     MOZ_ASSERT(aFileInfo);
   }
 
   // Called when receiving from the child.
   DatabaseFile(const InputStreamParams& aInputStreamParams, FileInfo* aFileInfo)
@@ -3466,17 +3466,17 @@ class TransactionBase::UpdateRefcountFun
   {
     friend class UpdateRefcountFunction;
 
     nsRefPtr<FileInfo> mFileInfo;
     int32_t mDelta;
     int32_t mSavepointDelta;
 
   public:
-    FileInfoEntry(FileInfo* aFileInfo)
+    explicit FileInfoEntry(FileInfo* aFileInfo)
       : mFileInfo(aFileInfo)
       , mDelta(0)
       , mSavepointDelta(0)
     { }
   };
 
   enum UpdateType
   {
@@ -3526,17 +3526,17 @@ class TransactionBase::UpdateRefcountFun
   nsTArray<int64_t> mJournalsToRemoveAfterAbort;
 
   bool mInSavepoint;
 
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_MOZISTORAGEFUNCTION
 
-  UpdateRefcountFunction(FileManager* aFileManager)
+  explicit UpdateRefcountFunction(FileManager* aFileManager)
     : mFileManager(aFileManager)
     , mInSavepoint(false)
   { }
 
   void
   ClearFileInfoEntries()
   {
     mFileInfoEntries.Clear();
@@ -3731,17 +3731,17 @@ class VersionChangeTransaction MOZ_FINAL
 
   nsRefPtr<OpenDatabaseOp> mOpenDatabaseOp;
   nsRefPtr<FullDatabaseMetadata> mOldMetadata;
 
   bool mActorWasAlive;
 
 private:
   // Only called by OpenDatabaseOp.
-  VersionChangeTransaction(OpenDatabaseOp* aOpenDatabaseOp);
+  explicit VersionChangeTransaction(OpenDatabaseOp* aOpenDatabaseOp);
 
   // Reference counted.
   ~VersionChangeTransaction();
 
   bool
   IsSameProcessActor();
 
   // Only called by OpenDatabaseOp.
@@ -4012,17 +4012,17 @@ private:
   FinishOpen();
 };
 
 struct FactoryOp::MaybeBlockedDatabaseInfo MOZ_FINAL
 {
   nsRefPtr<Database> mDatabase;
   bool mBlocked;
 
-  MaybeBlockedDatabaseInfo(Database* aDatabase)
+  MOZ_IMPLICIT MaybeBlockedDatabaseInfo(Database* aDatabase)
     : mDatabase(aDatabase)
     , mBlocked(false)
   {
     MOZ_ASSERT(aDatabase);
 
     MOZ_COUNT_CTOR(FactoryOp::MaybeBlockedDatabaseInfo);
   }
 
@@ -4140,17 +4140,17 @@ class OpenDatabaseOp::VersionChangeOp MO
 {
   friend class OpenDatabaseOp;
 
   nsRefPtr<OpenDatabaseOp> mOpenDatabaseOp;
   const uint64_t mRequestedVersion;
   uint64_t mPreviousVersion;
 
 private:
-  VersionChangeOp(OpenDatabaseOp* aOpenDatabaseOp)
+  explicit VersionChangeOp(OpenDatabaseOp* aOpenDatabaseOp)
     : TransactionDatabaseOperationBase(
                                      aOpenDatabaseOp->mVersionChangeTransaction)
     , mOpenDatabaseOp(aOpenDatabaseOp)
     , mRequestedVersion(aOpenDatabaseOp->mRequestedVersion)
     , mPreviousVersion(aOpenDatabaseOp->mMetadata->mCommonMetadata.version())
   {
     MOZ_ASSERT(aOpenDatabaseOp);
     MOZ_ASSERT(mRequestedVersion);
@@ -4221,17 +4221,17 @@ private:
 class DeleteDatabaseOp::VersionChangeOp MOZ_FINAL
   : public DatabaseOperationBase
 {
   friend class DeleteDatabaseOp;
 
   nsRefPtr<DeleteDatabaseOp> mDeleteDatabaseOp;
 
 private:
-  VersionChangeOp(DeleteDatabaseOp* aDeleteDatabaseOp)
+  explicit VersionChangeOp(DeleteDatabaseOp* aDeleteDatabaseOp)
     : mDeleteDatabaseOp(aDeleteDatabaseOp)
   {
     MOZ_ASSERT(aDeleteDatabaseOp);
     MOZ_ASSERT(!aDeleteDatabaseOp->mDatabaseDirectoryPath.IsEmpty());
   }
 
   ~VersionChangeOp()
   { }
@@ -4253,17 +4253,17 @@ private:
 class VersionChangeTransactionOp
   : public TransactionDatabaseOperationBase
 {
 public:
   virtual void
   Cleanup() MOZ_OVERRIDE;
 
 protected:
-  VersionChangeTransactionOp(VersionChangeTransaction* aTransaction)
+  explicit VersionChangeTransactionOp(VersionChangeTransaction* aTransaction)
     : TransactionDatabaseOperationBase(aTransaction)
   { }
 
   virtual
   ~VersionChangeTransactionOp()
   { }
 
 private:
@@ -4447,17 +4447,17 @@ class NormalTransactionOp
 {
   DebugOnly<bool> mResponseSent;
 
 public:
   virtual void
   Cleanup() MOZ_OVERRIDE;
 
 protected:
-  NormalTransactionOp(TransactionBase* aTransaction)
+  explicit NormalTransactionOp(TransactionBase* aTransaction)
     : TransactionDatabaseOperationBase(aTransaction)
     , mResponseSent(false)
   { }
 
   virtual
   ~NormalTransactionOp()
   { }
 
@@ -4881,17 +4881,17 @@ protected:
   nsRefPtr<Cursor> mCursor;
   FallibleTArray<StructuredCloneFile> mFiles;
 
   CursorResponse mResponse;
 
   DebugOnly<bool> mResponseSent;
 
 protected:
-  CursorOpBase(Cursor* aCursor)
+  explicit CursorOpBase(Cursor* aCursor)
     : TransactionDatabaseOperationBase(aCursor->mTransaction)
     , mCursor(aCursor)
     , mResponseSent(false)
   {
     AssertIsOnBackgroundThread();
     MOZ_ASSERT(aCursor);
   }
 
@@ -5163,17 +5163,17 @@ private:
 class QuotaClient::ShutdownTransactionThreadPoolRunnable MOZ_FINAL
   : public nsRunnable
 {
   nsRefPtr<QuotaClient> mQuotaClient;
   bool mHasRequestedShutDown;
 
 public:
 
-  ShutdownTransactionThreadPoolRunnable(QuotaClient* aQuotaClient)
+  explicit ShutdownTransactionThreadPoolRunnable(QuotaClient* aQuotaClient)
     : mQuotaClient(aQuotaClient)
     , mHasRequestedShutDown(false)
   {
     MOZ_ASSERT(NS_IsMainThread());
     MOZ_ASSERT(aQuotaClient);
     MOZ_ASSERT(QuotaClient::GetInstance() == aQuotaClient);
     MOZ_ASSERT(aQuotaClient->mShutdownRequested);
   }
@@ -5659,17 +5659,17 @@ FullDatabaseMetadata::Duplicate() const
 {
   AssertIsOnBackgroundThread();
 
   class MOZ_STACK_CLASS IndexClosure MOZ_FINAL
   {
     FullObjectStoreMetadata& mNew;
 
   public:
-    IndexClosure(FullObjectStoreMetadata& aNew)
+    explicit IndexClosure(FullObjectStoreMetadata& aNew)
       : mNew(aNew)
     { }
 
     static PLDHashOperator
     Copy(const uint64_t& aKey, FullIndexMetadata* aValue, void* aClosure)
     {
       MOZ_ASSERT(aKey);
       MOZ_ASSERT(aValue);
@@ -5690,17 +5690,17 @@ FullDatabaseMetadata::Duplicate() const
     }
   };
 
   class MOZ_STACK_CLASS ObjectStoreClosure MOZ_FINAL
   {
     FullDatabaseMetadata& mNew;
 
   public:
-    ObjectStoreClosure(FullDatabaseMetadata& aNew)
+    explicit ObjectStoreClosure(FullDatabaseMetadata& aNew)
       : mNew(aNew)
     { }
 
     static PLDHashOperator
     Copy(const uint64_t& aKey, FullObjectStoreMetadata* aValue, void* aClosure)
     {
       MOZ_ASSERT(aKey);
       MOZ_ASSERT(aValue);
@@ -12013,17 +12013,17 @@ OpenDatabaseOp::MetadataToSpec(DatabaseS
 
       aSpec.metadata() = aMetadata->mCommonMetadata;
 
       Helper helper(aSpec);
       aMetadata->mObjectStores.EnumerateRead(Enumerate, &helper);
     }
 
   private:
-    Helper(DatabaseSpec& aSpec)
+    explicit Helper(DatabaseSpec& aSpec)
       : mSpec(aSpec)
       , mCurrentObjectStoreSpec(nullptr)
     { }
 
     static PLDHashOperator
     Enumerate(const uint64_t& aKey,
               FullObjectStoreMetadata* aValue,
               void* aClosure)
@@ -12090,17 +12090,17 @@ OpenDatabaseOp::AssertMetadataConsistenc
     AssertConsistent(const ObjectStoreTable& aThisObjectStores,
                      const ObjectStoreTable& aOtherObjectStores)
     {
       Helper helper(aOtherObjectStores);
       aThisObjectStores.EnumerateRead(Enumerate, &helper);
     }
 
   private:
-    Helper(const ObjectStoreTable& aOtherObjectStores)
+    explicit Helper(const ObjectStoreTable& aOtherObjectStores)
       : mOtherObjectStores(aOtherObjectStores)
       , mCurrentOtherIndexTable(nullptr)
     { }
 
     static PLDHashOperator
     Enumerate(const uint64_t& /* aKey */,
               FullObjectStoreMetadata* aThisObjectStore,
               void* aClosure)
--- a/dom/indexedDB/IDBDatabase.cpp
+++ b/dom/indexedDB/IDBDatabase.cpp
@@ -112,17 +112,17 @@ private:
 };
 
 class DatabaseFile MOZ_FINAL
   : public PBackgroundIDBDatabaseFileChild
 {
   IDBDatabase* mDatabase;
 
 public:
-  DatabaseFile(IDBDatabase* aDatabase)
+  explicit DatabaseFile(IDBDatabase* aDatabase)
     : mDatabase(aDatabase)
   {
     MOZ_ASSERT(aDatabase);
     aDatabase->AssertIsOnOwningThread();
 
     MOZ_COUNT_CTOR(DatabaseFile);
   }
 
--- a/dom/indexedDB/IDBFactory.cpp
+++ b/dom/indexedDB/IDBFactory.cpp
@@ -73,17 +73,17 @@ GetPrincipalInfoFromPrincipal(nsIPrincip
 } // anonymous namespace
 
 class IDBFactory::BackgroundCreateCallback MOZ_FINAL
   : public nsIIPCBackgroundChildCreateCallback
 {
   nsRefPtr<IDBFactory> mFactory;
 
 public:
-  BackgroundCreateCallback(IDBFactory* aFactory)
+  explicit BackgroundCreateCallback(IDBFactory* aFactory)
   : mFactory(aFactory)
   {
     MOZ_ASSERT(aFactory);
   }
 
   NS_DECL_ISUPPORTS
 
 private:
--- a/dom/indexedDB/IDBObjectStore.cpp
+++ b/dom/indexedDB/IDBObjectStore.cpp
@@ -68,17 +68,17 @@ struct IDBObjectStore::StructuredCloneWr
     }
   };
 
   JSAutoStructuredCloneBuffer mCloneBuffer;
   nsTArray<BlobOrFileInfo> mBlobOrFileInfos;
   IDBDatabase* mDatabase;
   uint64_t mOffsetToKeyProp;
 
-  StructuredCloneWriteInfo(IDBDatabase* aDatabase)
+  explicit StructuredCloneWriteInfo(IDBDatabase* aDatabase)
     : mDatabase(aDatabase)
     , mOffsetToKeyProp(0)
   {
     MOZ_ASSERT(aDatabase);
 
     MOZ_COUNT_CTOR(StructuredCloneWriteInfo);
   }
 
--- a/dom/indexedDB/IndexedDatabase.h
+++ b/dom/indexedDB/IndexedDatabase.h
@@ -63,16 +63,16 @@ struct StructuredCloneReadInfo
   ~StructuredCloneReadInfo();
 
   // In IndexedDatabaseInlines.h
   inline StructuredCloneReadInfo&
   operator=(StructuredCloneReadInfo&& aOther);
 
   // In IndexedDatabaseInlines.h
   inline
-  StructuredCloneReadInfo(SerializedStructuredCloneReadInfo&& aOther);
+  MOZ_IMPLICIT StructuredCloneReadInfo(SerializedStructuredCloneReadInfo&& aOther);
 };
 
 } // namespace indexedDB
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_indexeddb_indexeddatabase_h__
--- a/dom/ipc/Blob.cpp
+++ b/dom/ipc/Blob.cpp
@@ -929,17 +929,17 @@ public:
   }
 
   RemoteBlob(BlobChild* aActor, const nsAString& aContentType, uint64_t aLength)
     : DOMFileImplBase(aContentType, aLength)
   {
     CommonInit(aActor);
   }
 
-  RemoteBlob(BlobChild* aActor)
+  explicit RemoteBlob(BlobChild* aActor)
     : DOMFileImplBase(EmptyString(), EmptyString(), UINT64_MAX, UINT64_MAX)
   {
     CommonInit(aActor);
   }
 
   void
   NoteDyingActor()
   {
--- a/dom/promise/AbortablePromise.h
+++ b/dom/promise/AbortablePromise.h
@@ -33,17 +33,17 @@ public:
 
 protected:
   // Constructor used to create native AbortablePromise with C++.
   AbortablePromise(nsIGlobalObject* aGlobal,
                    PromiseNativeAbortCallback& aAbortCallback);
 
   // 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();
 
 public:
   virtual JSObject*
   WrapObject(JSContext* aCx) MOZ_OVERRIDE;
 
   static already_AddRefed<AbortablePromise>