1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 BUG_COMPONENT = ("Toolkit", "Storage")
15 'mozIStorageAggregateFunction.idl',
16 'mozIStorageAsyncConnection.idl',
17 'mozIStorageAsyncStatement.idl',
18 'mozIStorageBaseStatement.idl',
19 'mozIStorageBindingParams.idl',
20 'mozIStorageBindingParamsArray.idl',
21 'mozIStorageCompletionCallback.idl',
22 'mozIStorageConnection.idl',
23 'mozIStorageError.idl',
24 'mozIStorageFunction.idl',
25 'mozIStoragePendingStatement.idl',
26 'mozIStorageProgressHandler.idl',
27 'mozIStorageResultSet.idl',
29 'mozIStorageService.idl',
30 'mozIStorageStatement.idl',
31 'mozIStorageStatementCallback.idl',
32 'mozIStorageVacuumParticipant.idl',
33 'mozIStorageValueArray.idl',
36 XPIDL_MODULE = 'storage'
46 # NOTE When adding something to this list, you probably need to add it to the
48 EXPORTS.mozilla.storage += [
49 'mozStorageAsyncStatementParams.h',
50 'mozStorageStatementParams.h',
51 'mozStorageStatementRow.h',
59 'FileSystemModule.cpp',
60 'mozStorageArgValueArray.cpp',
61 'mozStorageAsyncStatement.cpp',
62 'mozStorageAsyncStatementExecution.cpp',
63 'mozStorageAsyncStatementJSHelper.cpp',
64 'mozStorageAsyncStatementParams.cpp',
65 'mozStorageBindingParamsArray.cpp',
66 'mozStorageError.cpp',
67 'mozStoragePrivateHelpers.cpp',
68 'mozStorageResultSet.cpp',
70 'mozStorageService.cpp',
71 'mozStorageSQLFunctions.cpp',
72 'mozStorageStatement.cpp',
73 'mozStorageStatementJSHelper.cpp',
74 'mozStorageStatementParams.cpp',
75 'mozStorageStatementRow.cpp',
77 'StorageBaseStatementInternal.cpp',
82 # These files need to be built separately because they #include variantToSQLiteT_impl.h.
84 'mozStorageBindingParams.cpp',
85 'mozStorageConnection.cpp',
88 include('/ipc/chromium/chromium-config.mozbuild')
92 # Don't use the jemalloc allocator on Android, because we can't guarantee
93 # that Gecko will configure sqlite before it is first used (bug 730495).
95 # Don't use the jemalloc allocator when using system sqlite. Linked in libraries
96 # (such as NSS) might trigger an initialization of sqlite and allocation
97 # of memory using the default allocator, prior to the storage service
98 # registering its allocator, causing memory management failures (bug 938730).
99 # However, this is not an issue if both the jemalloc allocator and the default
100 # allocator are the same thing.
102 # Note: On Windows our sqlite build assumes we use jemalloc. If you disable
103 # MOZ_STORAGE_MEMORY on Windows, you will also need to change the "ifdef
104 # MOZ_MEMORY" options in db/sqlite3/src/Makefile.in.
105 if CONFIG['MOZ_MEMORY'] and not CONFIG['MOZ_SYSTEM_SQLITE']:
106 if CONFIG['OS_TARGET'] != 'Android':
107 DEFINES['MOZ_STORAGE_MEMORY'] = True
109 # This is the default value. If we ever change it when compiling sqlite, we
110 # will need to change it here as well.
111 DEFINES['SQLITE_MAX_LIKE_PATTERN_LENGTH'] = 50000
113 # See Sqlite moz.build for reasoning about TEMP_STORE.
114 # For system sqlite we cannot use the compile time option, so we use a pragma.
115 if CONFIG['MOZ_SYSTEM_SQLITE'] and (CONFIG['OS_TARGET'] == 'Android'
116 or CONFIG['HAVE_64BIT_BUILD']):
117 DEFINES['MOZ_MEMORY_TEMP_STORE_PRAGMA'] = True
124 CXXFLAGS += CONFIG['SQLITE_CFLAGS']