gecko-dev/storage
Marco Bonardo 1d88de7d2f Bug 1371945 - Avoid a possible thread-safety problem with unfinalized statements. r=asuth
Avoids a thread-safety race condition on shutdown where we could try to finalize a statement twice.
Allows the async thread to be referenced until ShutdownAsyncThread, so async finalizers can make use of it.
Removes the no more useful mAsyncExecutionThreadIsAlive.
Nullifies the sqlite3_mutex pointer when the connection is closed, since it would be a dangling pointer.
Use a ScopeExit to ensure the connection and the mutex pointers are always nullified on failure.
Makes asyncClose bailout early if a Close method was already invoked before.
Makes AsyncInitDatabase not use AsyncClose to just shutdown the async thread.
Fixes various unfinalized statements in consumers code.
Makes mConnectionClosed better follow mDBConn status.
Replaces some mutex locking isClosed() calls with lockless isConnectionReadyOnThisThread.

MozReview-Commit-ID: 6sftFehsQTt

--HG--
extra : rebase_source : 2bf3088b500376e58e62e8f078d9950588adc649
2017-06-16 17:43:23 +02:00
..
build Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
test Bug 1371945 - Avoid a possible thread-safety problem with unfinalized statements. r=asuth 2017-06-16 17:43:23 +02:00
FileSystemModule.cpp
FileSystemModule.h
IStorageBindingParamsInternal.h
SQLCollations.cpp
SQLCollations.h
SQLiteMutex.h Bug 1371945 - Avoid a possible thread-safety problem with unfinalized statements. r=asuth 2017-06-16 17:43:23 +02:00
StatementCache.h
StorageBaseStatementInternal.cpp Bug 1166166 - Shrink storage cache off main thread r=mak 2017-06-01 14:46:53 -07:00
StorageBaseStatementInternal.h Bug 1007034 - Add console warnings for the deprecated BindXXXParameter methods in mozIStorageBaseStatement and replace calls to the deprecated methods in dom/indexedDB/ActorsParent.cpp. r=mak 2017-04-05 14:08:25 -04:00
TelemetryVFS.cpp Bug 1330907 - Rename Telemetry::ID to Telemetry::HistogramID. r=dexter 2017-02-16 00:45:15 +05:30
VacuumManager.cpp Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron 2017-03-14 15:26:27 +13:00
VacuumManager.h
Variant.h Bug 1305202 - Use NullString() more and remove superfluous Truncates(). r=smaug 2016-09-23 21:10:01 -04:00
Variant_inl.h
moz.build Bug 1363992 - Remove support for system jemalloc. r=njn 2017-05-11 13:03:20 +09:00
mozIStorageAggregateFunction.idl
mozIStorageAsyncConnection.idl Bug 1283083 - Cloning a connection should re-attach databases to the clone. r=asuth 2016-06-29 17:33:15 +02:00
mozIStorageAsyncStatement.idl
mozIStorageBaseStatement.idl
mozIStorageBindingParams.idl
mozIStorageBindingParamsArray.idl
mozIStorageCompletionCallback.idl
mozIStorageConnection.idl Bug 1283083 - Cloning a connection should re-attach databases to the clone. r=asuth 2016-06-29 17:33:15 +02:00
mozIStorageError.idl
mozIStorageFunction.idl
mozIStoragePendingStatement.idl
mozIStorageProgressHandler.idl
mozIStorageResultSet.idl
mozIStorageRow.idl
mozIStorageService.idl
mozIStorageStatement.idl Bug 1313309 - Remove getColumnDecltype and compile with SQLITE_OMIT_DECLTYPE. r=asuth 2016-11-03 21:04:00 +01:00
mozIStorageStatementCallback.idl
mozIStorageStatementParams.idl
mozIStorageStatementRow.idl
mozIStorageVacuumParticipant.idl
mozIStorageValueArray.idl
mozStorageArgValueArray.cpp Bug 1305202 - Use NullString() more and remove superfluous Truncates(). r=smaug 2016-09-23 21:10:01 -04:00
mozStorageArgValueArray.h
mozStorageAsyncStatement.cpp Bug 1371945 - Avoid a possible thread-safety problem with unfinalized statements. r=asuth 2017-06-16 17:43:23 +02:00
mozStorageAsyncStatement.h
mozStorageAsyncStatementExecution.cpp Bug 1371945 - Avoid a possible thread-safety problem with unfinalized statements. r=asuth 2017-06-16 17:43:23 +02:00
mozStorageAsyncStatementExecution.h Bug 1350752: Cleanup async mozStorage callback management r=layzell 2017-03-28 06:54:02 -04:00
mozStorageAsyncStatementJSHelper.cpp Bug 1332172 - Remove XPC_MAP_WANT_*. r=mccr8. 2017-01-23 13:33:58 +11:00
mozStorageAsyncStatementJSHelper.h
mozStorageAsyncStatementParams.cpp Bug 1332172 - Remove XPC_MAP_WANT_*. r=mccr8. 2017-01-23 13:33:58 +11:00
mozStorageAsyncStatementParams.h
mozStorageBindingParams.cpp Bug 964561 - Part 10: Fix a possible leak in BindAdoptedBlobByName()/BindAdoptedBlobByIndex(); r=mak 2016-10-25 21:18:37 +02:00
mozStorageBindingParams.h
mozStorageBindingParamsArray.cpp
mozStorageBindingParamsArray.h
mozStorageConnection.cpp Bug 1371945 - Avoid a possible thread-safety problem with unfinalized statements. r=asuth 2017-06-16 17:43:23 +02:00
mozStorageConnection.h Bug 1371945 - Avoid a possible thread-safety problem with unfinalized statements. r=asuth 2017-06-16 17:43:23 +02:00
mozStorageError.cpp
mozStorageError.h
mozStorageHelper.h Bug 1007034 - Add console warnings for the deprecated BindXXXParameter methods in mozIStorageBaseStatement and replace calls to the deprecated methods in dom/indexedDB/ActorsParent.cpp. r=mak 2017-04-05 14:08:25 -04:00
mozStoragePrivateHelpers.cpp Bug 1290337 - Part 20: Replace Value parameter to const Value& in storage. r=mak 2016-09-11 18:21:36 +09:00
mozStoragePrivateHelpers.h Bug 1290337 - Part 20: Replace Value parameter to const Value& in storage. r=mak 2016-09-11 18:21:36 +09:00
mozStorageResultSet.cpp
mozStorageResultSet.h
mozStorageRow.cpp
mozStorageRow.h
mozStorageSQLFunctions.cpp
mozStorageSQLFunctions.h
mozStorageService.cpp Bug 1371945 - Avoid a possible thread-safety problem with unfinalized statements. r=asuth 2017-06-16 17:43:23 +02:00
mozStorageService.h
mozStorageStatement.cpp Bug 1371945 - Avoid a possible thread-safety problem with unfinalized statements. r=asuth 2017-06-16 17:43:23 +02:00
mozStorageStatement.h
mozStorageStatementData.h Bug 1166166 - Shrink storage cache off main thread r=mak 2017-06-01 14:46:53 -07:00
mozStorageStatementJSHelper.cpp Bug 1332172 - Remove XPC_MAP_WANT_*. r=mccr8. 2017-01-23 13:33:58 +11:00
mozStorageStatementJSHelper.h
mozStorageStatementParams.cpp Bug 1332172 - Remove XPC_MAP_WANT_*. r=mccr8. 2017-01-23 13:33:58 +11:00
mozStorageStatementParams.h
mozStorageStatementRow.cpp Bug 1332172 - Remove XPC_MAP_WANT_*. r=mccr8. 2017-01-23 13:33:58 +11:00
mozStorageStatementRow.h
storage.h
style.txt
variantToSQLiteT_impl.h Bug 1278468 - Fix -Wshadow warnings in storage/ directory. r=mak 2016-06-07 22:08:41 -07:00