gecko-dev/storage
Kris Maglione a75561bd62 Bug 1412726: Clean up XPCOM singleton constructor refcount handling. r=froydnj
This is a follow-up to bug 1409249. There are a lot of places where our
factory singleton constructors either don't correctly handle their returned
references being released by the component manager, or do handle it, but in
ways that are not obvious.

This patch handles a few places where we can sometimes wind up with dangling
singleton pointers, adds some explanatory comments and sanity check
assertions, and replaces some uses of manual refcounting with StaticRefPtr and
ClearOnShutdown.

There are still some places where we may wind up with odd behavior if the
first QI for a getService call fails. In those cases, we wind up destroying
the first instance of a service that we create, and re-creating a new one
later.

MozReview-Commit-ID: ANYndvd7aZx

--HG--
extra : rebase_source : acfb0611a028fef6b9387eb5d1d9e285782fbc7c
2017-10-29 16:02:40 -07:00
..
build
test Bug 1421992 - Hand written cleanup patch to make tests pass after removing obsolete xpcshell functions. r=Gijs,ochameau a=Aryx 2017-12-21 11:11:57 +01: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 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
StorageBaseStatementInternal.h Bug 645049 - Remove [deprecated] methods on mozIStorageBaseStatement.idl. r=asuth 2017-08-06 09:17:50 +09:00
TelemetryVFS.cpp Bug 730495, guarantee that sqlite3_config is called before any other SQLite function, r=asuth, r=froydnj, r=mak 2017-09-29 13:25:06 +02:00
VacuumManager.cpp Bug 1412726: Clean up XPCOM singleton constructor refcount handling. r=froydnj 2017-10-29 16:02:40 -07:00
VacuumManager.h Bug 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj 2017-10-16 21:08:42 -07:00
Variant.h Backed out changeset e2beba7e6875 (bug 1423798) for failing Browser Chrome tests browser_temporary_permissions_expiry.js on Windows 7 debug. r=backout on a CLOSED TREE 2017-12-09 07:23:35 +02:00
Variant_inl.h
moz.build Bug 1392554 - Port (Async)StatementParams to WebIDL bindings. r=asuth,qdot 2017-08-24 10:52:52 +02:00
mozIStorageAggregateFunction.idl
mozIStorageAsyncConnection.idl Bug 1422383 - Clone temporary tables, views, and triggers when cloning a storage connection. r=mak 2017-11-30 19:21:10 -08:00
mozIStorageAsyncStatement.idl
mozIStorageBaseStatement.idl Bug 645049 - Remove [deprecated] methods on mozIStorageBaseStatement.idl. r=asuth 2017-08-06 09:17:50 +09:00
mozIStorageBindingParams.idl
mozIStorageBindingParamsArray.idl
mozIStorageCompletionCallback.idl
mozIStorageConnection.idl Bug 1422383 - Clone temporary tables, views, and triggers when cloning a storage connection. r=mak 2017-11-30 19:21:10 -08:00
mozIStorageError.idl
mozIStorageFunction.idl
mozIStoragePendingStatement.idl
mozIStorageProgressHandler.idl
mozIStorageResultSet.idl
mozIStorageRow.idl
mozIStorageService.idl
mozIStorageStatement.idl
mozIStorageStatementCallback.idl
mozIStorageVacuumParticipant.idl
mozIStorageValueArray.idl
mozStorageArgValueArray.cpp
mozStorageArgValueArray.h
mozStorageAsyncStatement.cpp Bug 1409598 - Change nsIXPCScriptable::className and nsIClassInfo::{contractID,classDescription} from string to AUTF8String. r=froydnj. 2017-10-18 13:17:26 +11:00
mozStorageAsyncStatement.h Bug 1392554 - Port (Async)StatementParams to WebIDL bindings. r=asuth,qdot 2017-08-24 10:52:52 +02:00
mozStorageAsyncStatementExecution.cpp Bug 1320301 - Add partial support to sqlite3_interrupt. r=asuth 2017-07-31 22:27:23 +02:00
mozStorageAsyncStatementExecution.h Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
mozStorageAsyncStatementJSHelper.cpp Bug 1392554 - Port (Async)StatementParams to WebIDL bindings. r=asuth,qdot 2017-08-24 10:52:52 +02:00
mozStorageAsyncStatementJSHelper.h Bug 1392554 - Port (Async)StatementParams to WebIDL bindings. r=asuth,qdot 2017-08-24 10:52:52 +02:00
mozStorageAsyncStatementParams.cpp Bug 1392554 - Port (Async)StatementParams to WebIDL bindings. r=asuth,qdot 2017-08-24 10:52:52 +02:00
mozStorageAsyncStatementParams.h Bug 1392554 - Port (Async)StatementParams to WebIDL bindings. r=asuth,qdot 2017-08-24 10:52:52 +02:00
mozStorageBindingParams.cpp
mozStorageBindingParams.h
mozStorageBindingParamsArray.cpp
mozStorageBindingParamsArray.h
mozStorageConnection.cpp Bug 1423820 - Copy temp entities after reattaching databases to a cloned storage connection. r=mak 2017-12-06 22:34:18 -08:00
mozStorageConnection.h Bug 1423820 - Copy temp entities after reattaching databases to a cloned storage connection. r=mak 2017-12-06 22:34:18 -08:00
mozStorageError.cpp
mozStorageError.h
mozStorageHelper.h Bug 1423773 - Part 1: Remove usage of nsStringGlue.h. r=glandium 2017-12-06 16:52:51 -08:00
mozStoragePrivateHelpers.cpp Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
mozStoragePrivateHelpers.h
mozStorageResultSet.cpp
mozStorageResultSet.h
mozStorageRow.cpp
mozStorageRow.h
mozStorageSQLFunctions.cpp Bug 1386103 (part 1, attempt 3) - Specify nsAuto[C]String storage size via template parameter. r=dbaron. 2017-08-09 20:41:38 +10:00
mozStorageSQLFunctions.h Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
mozStorageService.cpp Bug 1412726: Clean up XPCOM singleton constructor refcount handling. r=froydnj 2017-10-29 16:02:40 -07:00
mozStorageService.h Bug 1414441 - Stop caching an XPConnect pointer in storage/. r=mak 2017-11-03 15:50:29 -07:00
mozStorageStatement.cpp Bug 1409598 - Change nsIXPCScriptable::className and nsIClassInfo::{contractID,classDescription} from string to AUTF8String. r=froydnj. 2017-10-18 13:17:26 +11:00
mozStorageStatement.h Bug 958643, part 6 - Remove some unused forward decls. r=krizsa 2017-09-20 12:02:47 -07:00
mozStorageStatementData.h Bug 1350958 - Finish labeling ProxyReleaseEvent, r=billm 2017-07-14 08:49:22 +02:00
mozStorageStatementJSHelper.cpp Bug 1414441 - Stop caching an XPConnect pointer in storage/. r=mak 2017-11-03 15:50:29 -07:00
mozStorageStatementJSHelper.h Bug 1392554 - Port (Async)StatementParams to WebIDL bindings. r=asuth,qdot 2017-08-24 10:52:52 +02:00
mozStorageStatementParams.cpp Bug 1392554 - Port (Async)StatementParams to WebIDL bindings. r=asuth,qdot 2017-08-24 10:52:52 +02:00
mozStorageStatementParams.h Bug 1392554 - Port (Async)StatementParams to WebIDL bindings. r=asuth,qdot 2017-08-24 10:52:52 +02:00
mozStorageStatementRow.cpp Bug 1390489 - Port StatementRow to WebIDL bindings. r=asuth,qdot 2017-08-22 09:25:37 +02:00
mozStorageStatementRow.h Bug 1390489 - Port StatementRow to WebIDL bindings. r=asuth,qdot 2017-08-22 09:25:37 +02:00
storage.h
style.txt
variantToSQLiteT_impl.h