Граф коммитов

27 Коммитов

Автор SHA1 Сообщение Дата
Florian Quèze ca7bbcc752 Bug 1720374 - Remove MOZ_GECKO_PROFILER ifdefs that are not useful, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D119810
2021-07-15 22:04:23 +00:00
Simon Giesecke c29475654f Bug 1639552 - Register ObfuscatingVFS. r=dom-workers-and-storage-reviewers,mak,janv
Differential Revision: https://phabricator.services.mozilla.com/D76147
2020-10-29 10:13:46 +00:00
Marco Bonardo 14784dc42d Bug 1650201 - Fix mozStorage prefs read before profile and fallback to a non-exclusive VFS when it can't get an exclusive lock. r=asuth,geckoview-reviewers,agi
mozStorage used to read prefs on service init, because they could only be read
on the main-thread. When service init was moved earlier, it started trying
to read prefs too early, before the profile was set up, thus it ended up always
reading the default value.

This patch moves the only relevant pref to mirrored StaticPrefs that can be accessed
from different threads, and removes two preferences that apparently are not necessary
(they have been broken from a long time) for now.
In particular, providing a global synchronous setting is a footgun, each consumer should
decide about their synchronous needs, rather than abusing a dangerous "go fast" setting.
The page size is something we don't change from quite some time, and it's unlikely to be
used to run experiments in the wild before doing local measurements first, for which Try
builds are enough.

The remaining exclusiveLock pref is a bit controversial, because in general exclusive lock
is better for various reasons, and mostly it is necessary to use WAL on network shares.
Though developers may find it useful for debugging, and some third parties are doing
dangerous things (like copying over databases) to work around it, for which it's safer to
provide a less dangerous alternative.
Note exclusive lock only works on Unix-derived systems for now (no Windows implementation).

Finally, this introduces a fallback to exclusive lock, so that if a third party is using our
databases, so that we can't get an exclusive lock, we'll fallback to normal locking.

Differential Revision: https://phabricator.services.mozilla.com/D82717
2020-07-10 21:45:53 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Tom Tung 3e754f2b5c Bug 1645943 - Override xFullPathname to avoid the use of GetFullPathNameW; r=janv,asuth
Differential Revision: https://phabricator.services.mozilla.com/D80202
2020-06-24 16:08:45 +00:00
Simon Giesecke 2e68c75bb1 Bug 1626973 - Add assertions for result of MaybeUpdateSize. r=janv,dom-workers-and-storage-reviewers
Depends on D69580

Differential Revision: https://phabricator.services.mozilla.com/D69587

--HG--
extra : moz-landing-system : lando
2020-04-03 16:16:50 +00:00
Marco Bonardo ext:(%20%3Cmbonardo%40mozilla.com%3E) 142f9d8d72 Bug 1611925 - Stop doing our own special parsing of Sqlite zName to build the Quota Object. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D61169

--HG--
extra : moz-landing-system : lando
2020-02-04 10:18:47 +00:00
Tom Tung a973874d9b Bug 1576593 - P2 - Change the way for tunneling quota information to SQLite; r=janv
Differential Revision: https://phabricator.services.mozilla.com/D48183

--HG--
extra : moz-landing-system : lando
2019-10-25 12:02:10 +00:00
Jan Varga 9f906cd7c4 Bug 1563023 - Part 1: Implement per client usage tracking; r=asuth
This patch adds a fixed-size array of client usages to OriginInfo and modifies
quota tracking APIs to require the client type to be passed in.
A new method ResetUsageForClient is implemented. The method is used during
client-specific origin clearing. ResetUsageForClient is much faster than calling
GetUsageForOrigin and calling DecreaseUsageForOrigin after that.
LockedUsage now has an assertion that verifies that the total sum of client
usages matches total origin usage. This method should be called instead of
touching mUsage directly.
A new assertion is added to GetQuotaObject which verifies that passed file
belongs to the given persistence type, origin, and client.

Differential Revision: https://phabricator.services.mozilla.com/D38028

--HG--
extra : moz-landing-system : lando
2019-08-22 13:06:48 +00:00
Eden Chuang e8c9e6170c Bug 1516333 - Part 1: Move group and origin re-escaping from QuotaManager::GetQuotaObject to GetQuotaObjectFromNameAndParameters in TelemetryVFS.cpp; r=janv,asuth
Differential Revision: https://phabricator.services.mozilla.com/D33769
2019-06-07 08:04:57 +02:00
Sylvestre Ledru e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

Differential Revision: https://phabricator.services.mozilla.com/D28956

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Marco Bonardo a543f35d4b Bug 1472722 - Use the unix-excl Sqlite VFS by default. r=nalexander,asuth
Use the exclusive VFS on unix systems, so that:
1. we can avoid the memory mapped -shm files in wal mode
2. we gain more compatibility with nfs shares
3. we gain some protection from third parties touching open dbs

On the other side it won't be possible anymore to use an open database from a
different process (like the Sqlite command line), for which we provide an hidden
pref: storage.multiProcessAccess.enabled

Differential Revision: https://phabricator.services.mozilla.com/D1964

--HG--
extra : moz-landing-system : lando
2018-07-13 16:54:57 +00:00
Andreea Pavel 4a8983bee5 Backed out changeset 91c6a8ba1579 (bug 1472722) for failing android at testPasswordProvider on a CLOSED TREE 2018-07-10 13:07:58 +03:00
Marco Bonardo 4e1512ef73 Bug 1472722 - Use the unix-excl Sqlite VFS by default. r=asuth
Use the exclusive VFS on unix systems, so that:
1. we can avoid the memory mapped -shm files in wal mode
2. we gain more compatibility with nfs shares
3. we gain some protection from third parties touching open dbs

On the other side it won't be possible anymore to use an open database from a
different process (like the Sqlite command line), for which we provide an hidden
pref: storage.multiProcessAccess.enabled

Differential Revision: https://phabricator.services.mozilla.com/D1964

--HG--
extra : moz-landing-system : lando
2018-07-09 18:27:40 +00:00
Tarek Ziadé 2ad736aa2e Bug 1447931 - NetworkActivity becomes IOActivity - r=baku,mak,valentin
Generalizes NetworkActivity so it can be used for sockets but also disk files.
The host/port data becomes a single location string prefixed with socket://
or file:// and we're not using the FD as the identifier anymore.

IOActivityMonitor is now used in three places:

- nsFileStreams for plain files
- TelemetryVFS for sqlite files
- nsSocketTransport & nsUDPSocket for UDP & TCP sockets

MozReview-Commit-ID: GNu5o400PaV

--HG--
rename : netwerk/base/NetworkActivityMonitor.cpp => netwerk/base/IOActivityMonitor.cpp
rename : netwerk/base/NetworkActivityMonitor.h => netwerk/base/IOActivityMonitor.h
rename : netwerk/base/nsINetworkActivityData.idl => netwerk/base/nsIIOActivityData.idl
extra : rebase_source : 55a1c51b261ffbe16f88671d55445d1b0d9106b6
2018-06-12 13:22:50 -07:00
Kai Engert 47d3b3ac0b Bug 730495, guarantee that sqlite3_config is called before any other SQLite function, r=asuth, r=froydnj, r=mak 2017-09-29 13:25:06 +02:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Vedant Sareen 7d4bd52fae Bug 1330907 - Rename Telemetry::ID to Telemetry::HistogramID. r=dexter
Changed |print("enum ID : uint32_t {", file=output)| to |print("enum HistogramID : uint32_t {", file=output)| at line 53 of the file |toolkit/components/telemetry/gen-histogram-enum.py|, and then replaced all the textual occurrences of |Telemetry::ID| to |Telemetry::HistogramID| and |ID| to |HistogramID| in 43 other files.
2017-02-16 00:45:15 +05:30
Nicholas Nethercote 22b6d342d7 Bug 1333296 (part 1) - Rename MOZ_ENABLE_PROFILER_SPS as MOZ_GECKO_PROFILER. r=mstange,glandium.
--HG--
extra : rebase_source : 223f3a17f009645369be503392cc1f0cea7f19a1
2017-01-24 14:15:12 +11:00
Jan Beich 13885f1a7b Bug 1330359 - Fix building with -Werror for non-SPS platforms. r=mstange
MozReview-Commit-ID: Ifb3zyGHn7U

--HG--
extra : rebase_source : 9b0e06b7f9e984d5c475e59ad7864a039eb8a695
2017-01-11 17:22:19 +00:00
Chris Peterson 6a5ea85fa5 Bug 1278468 - Fix -Wshadow warnings in storage/ directory. r=mak
storage/TelemetryVFS.cpp:81:44 [-Wshadow] declaration shadows a field of '(anonymous namespace)::IOThreadAutoTimer'
storage/VacuumManager.cpp:192:25 [-Wshadow] declaration shadows a local variable
storage/VacuumManager.cpp:248:13 [-Wshadow] declaration shadows a local variable
storage/VacuumManager.cpp:249:14 [-Wshadow] declaration shadows a local variable
storage/VacuumManager.cpp:251:19 [-Wshadow] declaration shadows a local variable
storage/mozStorageConnection.cpp:971:15 [-Wshadow] declaration shadows a local variable
storage/mozStorageStatement.cpp:449:19 [-Wshadow] declaration shadows a local variable
storage/variantToSQLiteT_impl.h:97:16 [-Wshadow] declaration shadows a local variable

--HG--
extra : rebase_source : 4e966f23ff352b6f8ea8e992278ab8a952c69e01
2016-06-07 22:08:41 -07:00
Jan Varga 7bb929b877 Bug 1182987 - Part 2: Add getQuotaObjects() to mozIStorageConnection; r=mak 2016-03-15 07:00:28 +01:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Birunthan Mohanathas 296aa63730 Bug 1164717 - Flatten storage/src/ directory. r=mak
--HG--
rename : storage/src/FileSystemModule.cpp => storage/FileSystemModule.cpp
rename : storage/src/FileSystemModule.h => storage/FileSystemModule.h
rename : storage/src/IStorageBindingParamsInternal.h => storage/IStorageBindingParamsInternal.h
rename : storage/src/SQLCollations.cpp => storage/SQLCollations.cpp
rename : storage/src/SQLCollations.h => storage/SQLCollations.h
rename : storage/src/SQLiteMutex.h => storage/SQLiteMutex.h
rename : storage/src/StorageBaseStatementInternal.cpp => storage/StorageBaseStatementInternal.cpp
rename : storage/src/StorageBaseStatementInternal.h => storage/StorageBaseStatementInternal.h
rename : storage/src/TelemetryVFS.cpp => storage/TelemetryVFS.cpp
rename : storage/src/VacuumManager.cpp => storage/VacuumManager.cpp
rename : storage/src/VacuumManager.h => storage/VacuumManager.h
rename : storage/src/Variant.h => storage/Variant.h
rename : storage/src/Variant_inl.h => storage/Variant_inl.h
rename : storage/src/mozStorageArgValueArray.cpp => storage/mozStorageArgValueArray.cpp
rename : storage/src/mozStorageArgValueArray.h => storage/mozStorageArgValueArray.h
rename : storage/src/mozStorageAsyncStatement.cpp => storage/mozStorageAsyncStatement.cpp
rename : storage/src/mozStorageAsyncStatement.h => storage/mozStorageAsyncStatement.h
rename : storage/src/mozStorageAsyncStatementExecution.cpp => storage/mozStorageAsyncStatementExecution.cpp
rename : storage/src/mozStorageAsyncStatementExecution.h => storage/mozStorageAsyncStatementExecution.h
rename : storage/src/mozStorageAsyncStatementJSHelper.cpp => storage/mozStorageAsyncStatementJSHelper.cpp
rename : storage/src/mozStorageAsyncStatementJSHelper.h => storage/mozStorageAsyncStatementJSHelper.h
rename : storage/src/mozStorageAsyncStatementParams.cpp => storage/mozStorageAsyncStatementParams.cpp
rename : storage/src/mozStorageAsyncStatementParams.h => storage/mozStorageAsyncStatementParams.h
rename : storage/src/mozStorageBindingParams.cpp => storage/mozStorageBindingParams.cpp
rename : storage/src/mozStorageBindingParams.h => storage/mozStorageBindingParams.h
rename : storage/src/mozStorageBindingParamsArray.cpp => storage/mozStorageBindingParamsArray.cpp
rename : storage/src/mozStorageBindingParamsArray.h => storage/mozStorageBindingParamsArray.h
rename : storage/src/mozStorageConnection.cpp => storage/mozStorageConnection.cpp
rename : storage/src/mozStorageConnection.h => storage/mozStorageConnection.h
rename : storage/src/mozStorageError.cpp => storage/mozStorageError.cpp
rename : storage/src/mozStorageError.h => storage/mozStorageError.h
rename : storage/src/mozStoragePrivateHelpers.cpp => storage/mozStoragePrivateHelpers.cpp
rename : storage/src/mozStoragePrivateHelpers.h => storage/mozStoragePrivateHelpers.h
rename : storage/src/mozStorageResultSet.cpp => storage/mozStorageResultSet.cpp
rename : storage/src/mozStorageResultSet.h => storage/mozStorageResultSet.h
rename : storage/src/mozStorageRow.cpp => storage/mozStorageRow.cpp
rename : storage/src/mozStorageRow.h => storage/mozStorageRow.h
rename : storage/src/mozStorageSQLFunctions.cpp => storage/mozStorageSQLFunctions.cpp
rename : storage/src/mozStorageSQLFunctions.h => storage/mozStorageSQLFunctions.h
rename : storage/src/mozStorageService.cpp => storage/mozStorageService.cpp
rename : storage/src/mozStorageService.h => storage/mozStorageService.h
rename : storage/src/mozStorageStatement.cpp => storage/mozStorageStatement.cpp
rename : storage/src/mozStorageStatement.h => storage/mozStorageStatement.h
rename : storage/src/mozStorageStatementData.h => storage/mozStorageStatementData.h
rename : storage/src/mozStorageStatementJSHelper.cpp => storage/mozStorageStatementJSHelper.cpp
rename : storage/src/mozStorageStatementJSHelper.h => storage/mozStorageStatementJSHelper.h
rename : storage/src/mozStorageStatementParams.cpp => storage/mozStorageStatementParams.cpp
rename : storage/src/mozStorageStatementParams.h => storage/mozStorageStatementParams.h
rename : storage/src/mozStorageStatementRow.cpp => storage/mozStorageStatementRow.cpp
rename : storage/src/mozStorageStatementRow.h => storage/mozStorageStatementRow.h
rename : storage/src/variantToSQLiteT_impl.h => storage/variantToSQLiteT_impl.h
2015-05-19 10:47:33 -07:00