1 # -*- Mode: python; c-basic-offset: 4; 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/.
12 'mozIStorageAggregateFunction.idl',
13 'mozIStorageAsyncConnection.idl',
14 'mozIStorageAsyncStatement.idl',
15 'mozIStorageBaseStatement.idl',
16 'mozIStorageBindingParams.idl',
17 'mozIStorageBindingParamsArray.idl',
18 'mozIStorageCompletionCallback.idl',
19 'mozIStorageConnection.idl',
20 'mozIStorageError.idl',
21 'mozIStorageFunction.idl',
22 'mozIStoragePendingStatement.idl',
23 'mozIStorageProgressHandler.idl',
24 'mozIStorageResultSet.idl',
26 'mozIStorageService.idl',
27 'mozIStorageStatement.idl',
28 'mozIStorageStatementCallback.idl',
29 'mozIStorageStatementParams.idl',
30 'mozIStorageStatementRow.idl',
31 'mozIStorageVacuumParticipant.idl',
32 'mozIStorageValueArray.idl',
35 XPIDL_MODULE = 'storage'
45 # NOTE When adding something to this list, you probably need to add it to the
47 EXPORTS.mozilla.storage += [
55 'FileSystemModule.cpp',
56 'mozStorageArgValueArray.cpp',
57 'mozStorageAsyncStatement.cpp',
58 'mozStorageAsyncStatementExecution.cpp',
59 'mozStorageAsyncStatementJSHelper.cpp',
60 'mozStorageAsyncStatementParams.cpp',
61 'mozStorageBindingParamsArray.cpp',
62 'mozStorageError.cpp',
63 'mozStoragePrivateHelpers.cpp',
64 'mozStorageResultSet.cpp',
66 'mozStorageService.cpp',
67 'mozStorageSQLFunctions.cpp',
68 'mozStorageStatement.cpp',
69 'mozStorageStatementJSHelper.cpp',
70 'mozStorageStatementParams.cpp',
71 'mozStorageStatementRow.cpp',
73 'StorageBaseStatementInternal.cpp',
78 # These files need to be built separately because they #include variantToSQLiteT_impl.h.
80 'mozStorageBindingParams.cpp',
81 'mozStorageConnection.cpp',
84 include('/ipc/chromium/chromium-config.mozbuild')
88 # Don't use the jemalloc allocator on Android, because we can't guarantee
89 # that Gecko will configure sqlite before it is first used (bug 730495).
91 # Don't use the jemalloc allocator when using system sqlite. Linked in libraries
92 # (such as NSS) might trigger an initialization of sqlite and allocation
93 # of memory using the default allocator, prior to the storage service
94 # registering its allocator, causing memory management failures (bug 938730).
95 # However, this is not an issue if both the jemalloc allocator and the default
96 # allocator are the same thing.
98 # Note: On Windows our sqlite build assumes we use jemalloc. If you disable
99 # MOZ_STORAGE_MEMORY on Windows, you will also need to change the "ifdef
100 # MOZ_MEMORY" options in db/sqlite3/src/Makefile.in.
101 if CONFIG['MOZ_MEMORY'] and (not CONFIG['MOZ_NATIVE_SQLITE']
102 or CONFIG['MOZ_NATIVE_JEMALLOC']):
103 if CONFIG['OS_TARGET'] != 'Android':
104 DEFINES['MOZ_STORAGE_MEMORY'] = True
106 # This is the default value. If we ever change it when compiling sqlite, we
107 # will need to change it here as well.
108 DEFINES['SQLITE_MAX_LIKE_PATTERN_LENGTH'] = 50000
115 CXXFLAGS += CONFIG['SQLITE_CFLAGS']