mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 08:13:35 +00:00
bf48aecf29
nsIXPCScriptable flags handling in xpc_map_end.h is a bit of a mess. - Half the flags relate to whether various functions are defined (PreCreate, GetProperty, etc). These are set using the XPC_MAP_WANT_* macros; for each one xpc_map_end.h inserts the corresponding flag using the preprocessor (see XPC_MAP_CLASSNAME::GetScriptableFlags()). - The other half of the flags relate to other things (IS_GLOBAL_OBJECT, DONT_REFLECT_INTERFACE_NAMES, etc). These are set using the XPC_MAP_FLAGS macro. Having two similar but different mechanisms to set the flags for a class is confusing. (Indeed, until recently we had some classes where a single flag was redundantly specified via both mechanisms.) Note also that the classes done in dom/base/nsIDOMClassInfo.h also specify all the flags in a single value, similar to how XPC_MAP_FLAGS works. This patch removes the XPC_MAP_WANT_* macros. All flags are now set via XPC_MAP_FLAGS. This is a significant simplification to xpc_map_end.h and all the places that use it. The downside of this change is that I had to change the flag constants from class constants (i.e. nsIXPCScriptable::FOO) to macros (i.e. NSIXPCSCRIPTABLE_FOO) because they need to be used in #if statements like this in xpc_map_end.h: #if !((XPC_MAP_FLAGS) & NSIXPCSCRIPTABLE_WANT_PRECREATE) and you can't use a '::'-qualified name inside a #if. I think this downside is outweighed by the simplification described above. Overall the patch removes 80 lines of code. --HG-- extra : rebase_source : 6d5c341d0deba8f1529d81c17bb8819e09620b05 |
||
---|---|---|
.. | ||
build | ||
test | ||
.eslintrc.js | ||
FileSystemModule.cpp | ||
FileSystemModule.h | ||
IStorageBindingParamsInternal.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 | ||
mozIStorageStatementParams.idl | ||
mozIStorageStatementRow.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 | ||
mozStorageService.cpp | ||
mozStorageService.h | ||
mozStorageSQLFunctions.cpp | ||
mozStorageSQLFunctions.h | ||
mozStorageStatement.cpp | ||
mozStorageStatement.h | ||
mozStorageStatementData.h | ||
mozStorageStatementJSHelper.cpp | ||
mozStorageStatementJSHelper.h | ||
mozStorageStatementParams.cpp | ||
mozStorageStatementParams.h | ||
mozStorageStatementRow.cpp | ||
mozStorageStatementRow.h | ||
SQLCollations.cpp | ||
SQLCollations.h | ||
SQLiteMutex.h | ||
StatementCache.h | ||
storage.h | ||
StorageBaseStatementInternal.cpp | ||
StorageBaseStatementInternal.h | ||
style.txt | ||
TelemetryVFS.cpp | ||
VacuumManager.cpp | ||
VacuumManager.h | ||
Variant_inl.h | ||
Variant.h | ||
variantToSQLiteT_impl.h |