gecko-dev/storage
Kris Maglione 257d9118dc Bug 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj
Right now, NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR expects singleton
constructors to return already-addrefed raw pointers, and while it accepts
constructors that return already_AddRefed, most existing don't do so.

Meanwhile, the convention elsewhere is that a raw pointer return value is
owned by the callee, and that the caller needs to addref it if it wants to
keep its own reference to it.

The difference in convention makes it easy to leak (I've definitely caused
more than one shutdown leak this way), so it would be better if we required
the singleton getters to return an explicit already_AddRefed, which would
behave the same for all callers.


This also cleans up several singleton constructors that left a dangling
pointer to their singletons when their initialization methods failed, when
they released their references without clearing their global raw pointers.

MozReview-Commit-ID: 9peyG4pRYcr

--HG--
extra : rebase_source : 2f5bd89c17cb554541be38444672a827c1392f3f
2017-10-16 21:08:42 -07:00
..
build
test Merge autoland to m-c. a=merge 2017-08-24 20:20:08 -04: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 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj 2017-10-16 21:08:42 -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
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 1320301 - Add partial support to sqlite3_interrupt. r=asuth 2017-07-31 22:27:23 +02: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
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 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
mozStorageConnection.h Bug 1166166 - Shrink storage cache off main thread r=mak 2017-06-01 14:46:53 -07:00
mozStorageError.cpp
mozStorageError.h
mozStorageHelper.h Bug 645049 - Remove [deprecated] methods on mozIStorageBaseStatement.idl. r=asuth 2017-08-06 09:17:50 +09: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 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj 2017-10-16 21:08:42 -07:00
mozStorageService.h Bug 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj 2017-10-16 21:08:42 -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 1392554 - Port (Async)StatementParams to WebIDL bindings. r=asuth,qdot 2017-08-24 10:52:52 +02: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