diff --git a/dom/quota/CachingDatabaseConnection.cpp b/dom/quota/CachingDatabaseConnection.cpp index 543f666b3bbb..4805d4e685da 100644 --- a/dom/quota/CachingDatabaseConnection.cpp +++ b/dom/quota/CachingDatabaseConnection.cpp @@ -14,7 +14,7 @@ namespace mozilla::dom::quota { CachingDatabaseConnection::CachingDatabaseConnection( MovingNotNull> aStorageConnection) : -#ifdef CACHING_DB_CONNECTION_CHECK_THREAD_OWNERSHIP +#ifdef MOZ_THREAD_SAFETY_OWNERSHIP_CHECKS_SUPPORTED mOwningThread{nsAutoOwningThread{}}, #endif mStorageConnection(std::move(aStorageConnection)) { @@ -22,7 +22,7 @@ CachingDatabaseConnection::CachingDatabaseConnection( void CachingDatabaseConnection::LazyInit( MovingNotNull> aStorageConnection) { -#ifdef CACHING_DB_CONNECTION_CHECK_THREAD_OWNERSHIP +#ifdef MOZ_THREAD_SAFETY_OWNERSHIP_CHECKS_SUPPORTED mOwningThread.init(); #endif mStorageConnection.init(std::move(aStorageConnection)); diff --git a/dom/quota/CachingDatabaseConnection.h b/dom/quota/CachingDatabaseConnection.h index 29d62d4ac0cc..64eeabe5c883 100644 --- a/dom/quota/CachingDatabaseConnection.h +++ b/dom/quota/CachingDatabaseConnection.h @@ -67,7 +67,7 @@ class CachingDatabaseConnection { class LazyStatement; void AssertIsOnConnectionThread() const { -#ifdef CACHING_DB_CONNECTION_CHECK_THREAD_OWNERSHIP +#ifdef MOZ_THREAD_SAFETY_OWNERSHIP_CHECKS_SUPPORTED mOwningThread->AssertOwnership("CachingDatabaseConnection not thread-safe"); #endif } @@ -125,7 +125,7 @@ class CachingDatabaseConnection { void Close(); private: -#ifdef CACHING_DB_CONNECTION_CHECK_THREAD_OWNERSHIP +#ifdef MOZ_THREAD_SAFETY_OWNERSHIP_CHECKS_SUPPORTED LazyInitializedOnce mOwningThread; #endif diff --git a/dom/quota/Config.h b/dom/quota/Config.h index 3ec16ab95dbf..10025883e16d 100644 --- a/dom/quota/Config.h +++ b/dom/quota/Config.h @@ -33,14 +33,4 @@ # define QM_COLLECTING_OPERATION_TELEMETRY #endif -/** - * The thread ownership checks in CachingDatabaseConnection assumes that the - * object lives on a single thread, not any serial event target. - * Defining CACHING_DB_CONNECTION_CHECK_THREAD_OWNERSHIP restores the checks. - * See bug 1858989. - */ -#if 0 -# define CACHING_DB_CONNECTION_CHECK_THREAD_OWNERSHIP 1 -#endif - #endif // DOM_QUOTA_CONFIG_H_