зеркало из https://github.com/mozilla/gecko-dev.git
257d9118dc
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 |
||
---|---|---|
.. | ||
build | ||
test | ||
FileSystemModule.cpp | ||
FileSystemModule.h | ||
IStorageBindingParamsInternal.h | ||
SQLCollations.cpp | ||
SQLCollations.h | ||
SQLiteMutex.h | ||
StatementCache.h | ||
StorageBaseStatementInternal.cpp | ||
StorageBaseStatementInternal.h | ||
TelemetryVFS.cpp | ||
VacuumManager.cpp | ||
VacuumManager.h | ||
Variant.h | ||
Variant_inl.h | ||
moz.build | ||
mozIStorageAggregateFunction.idl | ||
mozIStorageAsyncConnection.idl | ||
mozIStorageAsyncStatement.idl | ||
mozIStorageBaseStatement.idl | ||
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 | ||
mozStorageAsyncStatement.h | ||
mozStorageAsyncStatementExecution.cpp | ||
mozStorageAsyncStatementExecution.h | ||
mozStorageAsyncStatementJSHelper.cpp | ||
mozStorageAsyncStatementJSHelper.h | ||
mozStorageAsyncStatementParams.cpp | ||
mozStorageAsyncStatementParams.h | ||
mozStorageBindingParams.cpp | ||
mozStorageBindingParams.h | ||
mozStorageBindingParamsArray.cpp | ||
mozStorageBindingParamsArray.h | ||
mozStorageConnection.cpp | ||
mozStorageConnection.h | ||
mozStorageError.cpp | ||
mozStorageError.h | ||
mozStorageHelper.h | ||
mozStoragePrivateHelpers.cpp | ||
mozStoragePrivateHelpers.h | ||
mozStorageResultSet.cpp | ||
mozStorageResultSet.h | ||
mozStorageRow.cpp | ||
mozStorageRow.h | ||
mozStorageSQLFunctions.cpp | ||
mozStorageSQLFunctions.h | ||
mozStorageService.cpp | ||
mozStorageService.h | ||
mozStorageStatement.cpp | ||
mozStorageStatement.h | ||
mozStorageStatementData.h | ||
mozStorageStatementJSHelper.cpp | ||
mozStorageStatementJSHelper.h | ||
mozStorageStatementParams.cpp | ||
mozStorageStatementParams.h | ||
mozStorageStatementRow.cpp | ||
mozStorageStatementRow.h | ||
storage.h | ||
style.txt | ||
variantToSQLiteT_impl.h |