Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
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/.
7 XPIDL_SOURCES += [
8 'nsIAsyncInputStream.idl',
9 'nsIAsyncOutputStream.idl',
10 'nsIBinaryInputStream.idl',
11 'nsIBinaryOutputStream.idl',
12 'nsIConverterInputStream.idl',
13 'nsIConverterOutputStream.idl',
14 'nsIDirectoryEnumerator.idl',
15 'nsIDirectoryService.idl',
16 'nsIFile.idl',
17 'nsIInputStream.idl',
18 'nsIInputStreamTee.idl',
19 'nsIIOUtil.idl',
20 'nsILineInputStream.idl',
21 'nsILocalFile.idl',
22 'nsILocalFileWin.idl',
23 'nsIMultiplexInputStream.idl',
24 'nsIObjectInputStream.idl',
25 'nsIObjectOutputStream.idl',
26 'nsIOutputStream.idl',
27 'nsIPipe.idl',
28 'nsISafeOutputStream.idl',
29 'nsIScriptableBase64Encoder.idl',
30 'nsIScriptableInputStream.idl',
31 'nsISeekableStream.idl',
32 'nsISimpleUnicharStreamFactory.idl',
33 'nsIStorageStream.idl',
34 'nsIStreamBufferAccess.idl',
35 'nsIStringStream.idl',
36 'nsIUnicharInputStream.idl',
37 'nsIUnicharLineInputStream.idl',
38 'nsIUnicharOutputStream.idl',
39 ]
41 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
42 XPIDL_SOURCES += [
43 'nsILocalFileMac.idl',
44 ]
46 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
47 EXPORTS += ['nsLocalFileWin.h']
48 EXPORTS.mozilla += [
49 'FileUtilsWin.h',
50 ]
51 SOURCES += [
52 'FileUtilsWin.cpp',
53 'nsLocalFileWin.cpp',
54 ]
55 else:
56 EXPORTS += ['nsLocalFileUnix.h']
57 SOURCES += [
58 'nsLocalFileUnix.cpp',
59 ]
61 XPIDL_MODULE = 'xpcom_io'
63 EXPORTS += [
64 'nsAnonymousTemporaryFile.h',
65 'nsAppDirectoryServiceDefs.h',
66 'nsDirectoryService.h',
67 'nsDirectoryServiceAtomList.h',
68 'nsDirectoryServiceDefs.h',
69 'nsDirectoryServiceUtils.h',
70 'nsEscape.h',
71 'nsLinebreakConverter.h',
72 'nsLocalFile.h',
73 'nsMultiplexInputStream.h',
74 'nsNativeCharsetUtils.h',
75 'nsScriptableInputStream.h',
76 'nsStorageStream.h',
77 'nsStreamUtils.h',
78 'nsStringStream.h',
79 'nsUnicharInputStream.h',
80 'nsWildCard.h',
81 'SpecialSystemDirectory.h',
82 ]
84 EXPORTS.mozilla += [
85 'Base64.h',
86 ]
88 UNIFIED_SOURCES += [
89 'Base64.cpp',
90 'nsAnonymousTemporaryFile.cpp',
91 'nsAppFileLocationProvider.cpp',
92 'nsBinaryStream.cpp',
93 'nsDirectoryService.cpp',
94 'nsEscape.cpp',
95 'nsInputStreamTee.cpp',
96 'nsIOUtil.cpp',
97 'nsLinebreakConverter.cpp',
98 'nsLocalFileCommon.cpp',
99 'nsMultiplexInputStream.cpp',
100 'nsNativeCharsetUtils.cpp',
101 'nsPipe3.cpp',
102 'nsScriptableBase64Encoder.cpp',
103 'nsScriptableInputStream.cpp',
104 'nsSegmentedBuffer.cpp',
105 'nsStorageStream.cpp',
106 'nsStreamUtils.cpp',
107 'nsStringStream.cpp',
108 'nsUnicharInputStream.cpp',
109 'nsWildCard.cpp',
110 'SpecialSystemDirectory.cpp',
111 ]
113 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
114 SOURCES += [
115 'CocoaFileUtils.mm',
116 ]
118 FAIL_ON_WARNINGS = True
120 MSVC_ENABLE_PGO = True
122 include('/ipc/chromium/chromium-config.mozbuild')
124 FINAL_LIBRARY = 'xpcom_core'
126 if CONFIG['OS_ARCH'] == 'Linux' and 'lib64' in CONFIG['libdir']:
127 DEFINES['HAVE_USR_LIB64_DIR'] = True
129 LOCAL_INCLUDES += [
130 '../build'
131 ]
133 GENERATED_INCLUDES += ['..']