gecko-dev/storage
Nicholas Nethercote bf48aecf29 Bug 1332172 - Remove XPC_MAP_WANT_*. r=mccr8.
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
2017-01-23 13:33:58 +11: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 503613 - Remove old 'tail =' lines from xpcshell.ini files; r=gps 2017-01-18 10:30:39 +00:00
.eslintrc.js Bug 1328851 - Enable eslint rule no-undef for storage/. r=mak 2017-01-05 11:54:49 +00:00
FileSystemModule.cpp
FileSystemModule.h
IStorageBindingParamsInternal.h
moz.build Bug 1313021 - Use a MEMORY SQLITE_TEMP_STORE on Android and 64bit builds. r=asuth 2016-11-03 22:11:59 +01:00
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 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 1293117 (part 4) - Change many NS_IMETHODIMP occurrences to NS_IMETHOD. r=froydnj. 2016-08-08 10:54:47 +10:00
mozStorageAsyncStatement.h
mozStorageAsyncStatementExecution.cpp Bug 1301127 - Make nsNavHistoryFolderResultNode QueryInterface to mozIStorageStatementCallback, r=smaug 2016-09-07 14:46:27 -04:00
mozStorageAsyncStatementExecution.h
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 Backed out 27 changesets (bug 1323100) for clipboard leaktest failures a=backout 2016-12-29 16:28:36 -08:00
mozStorageConnection.h Bug 1285041 - ignore locking when trying to read chrome DB file, r=mak 2016-07-18 16:46:45 +01:00
mozStorageError.cpp
mozStorageError.h
mozStorageHelper.h Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm. 2016-09-01 15:01:16 +10: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
mozStorageService.cpp Bug 835796 - Negative value in about:memory storage/sqlite/other due to double-counting of shared-cache connections. r=asuth 2016-11-03 23:14:35 +01:00
mozStorageService.h
mozStorageSQLFunctions.cpp
mozStorageSQLFunctions.h
mozStorageStatement.cpp Bug 1313309 - Remove getColumnDecltype and compile with SQLITE_OMIT_DECLTYPE. r=asuth 2016-11-03 21:04:00 +01:00
mozStorageStatement.h
mozStorageStatementData.h
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
SQLCollations.cpp
SQLCollations.h
SQLiteMutex.h
StatementCache.h
storage.h
StorageBaseStatementInternal.cpp Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm. 2016-08-08 12:18:10 +10:00
StorageBaseStatementInternal.h
style.txt
TelemetryVFS.cpp Bug 1330359 - Fix building with -Werror for non-SPS platforms. r=mstange 2017-01-11 17:22:19 +00:00
VacuumManager.cpp
VacuumManager.h
Variant_inl.h
Variant.h Bug 1305202 - Use NullString() more and remove superfluous Truncates(). r=smaug 2016-09-23 21:10:01 -04:00
variantToSQLiteT_impl.h