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

903 Коммитов

Автор SHA1 Сообщение Дата
Masatoshi Kimura 3424a95ee0 Bug 1682103 - Make nsContentPolicyType a CEnum type. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D99580
2020-12-16 11:36:47 +00:00
Simon Giesecke db8cc251fb Bug 1679987 - Replace strtok for Vary header by nsCCharSeparatedTokenizer and range-based for. r=necko-reviewers,dom-workers-and-storage-reviewers,asuth,valentin
Differential Revision: https://phabricator.services.mozilla.com/D98309
2020-12-16 19:10:41 +00:00
Simon Giesecke b9386ba506 Bug 1682542 - Make use of standard algorithms in dom/cache. r=dom-workers-and-storage-reviewers,asuth
Specifically, instead of using custom loops
- use std::find_if in CacheOpParent::ProcessCrossOriginResourcePolicyHeader
- use ReduceEach in SetupAction::RunSyncWithDBOnTarget
- use std::any_of in Manager::RemoveContext
- use std::find_if in Manager::(Add|Release)Ref(Cache|Body)Id and
  Manager::Set(Cache|Body)IdOrphanedIfRefed
- use std::copy_if in Manager::NoteOrphanedBodyIdList
- use std::any_of in StreamList::ShouldOpenStreamFor
- use std::find_if in StreamList::Extract, StreamList::NoteClosed
- use std::exchange in StreamList::CloseAll
- use std::transform in ToHeadersEntryList and change it to return a value
  rather than modifying an output parameter
- use std::transform in TypeUtils::ToInternalHeaders

Differential Revision: https://phabricator.services.mozilla.com/D99789
2020-12-16 19:10:57 +00:00
Simon Giesecke 0960f946b7 Bug 1681670 - Move shutdown timeout handling to QuotaManager. r=dom-workers-and-storage-reviewers,janv
Instead of having a separate timer for each quota client, we can use a single
timer in the QuotaManager for handling timeouts of all quota clients. The
original shutdown timeout of the quota manager itself can now be removed,
as AbortOperations is already called through InitiateShutdownWorkThreads on
each quota client.

This also moves MaybeRecordShutdownStep to the QuotaManager, which allows
easier access through the singleton instance returned by QuotaManager::GetRef.

Differential Revision: https://phabricator.services.mozilla.com/D98073
2020-12-15 17:15:27 +00:00
Simon Giesecke 6e49dfa042 Bug 1678030 - Move CollectWhileHasResult to QuotaCommon and use in other quota clients. r=dom-workers-and-storage-reviewers,ttung
This patch also:

- introduces CollectElementsWhileHasResult(Typed) to collects elements in and
  array.
- uses more QM_TRYs in our code.
- changes some pieces of code to match our coding gulideline.

Also, using CollectElementsWhileHasResult and CollectWhileHasResult helps the
code in cache/DBSchema to ensure the funtion returns an error result when
ExecuteStep returns an error in the loop's condition check consistently. Before
this change, DOM cache code often doesn't check the result from ExecuteStep
after exiting the loop.

Differential Revision: https://phabricator.services.mozilla.com/D97466
2020-12-14 10:42:36 +00:00
Jan Varga 88e9e3cb95 Bug 1680275 - DOMCACHE: Change Manager::Factory::mManagerList to use NotNull; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D98718
2020-12-10 12:13:46 +00:00
Simon Giesecke 4cab6ac723 Bug 1677466 - Move ParamTraits specializations with extra dependencies out of IPCMessageUtils.h. r=mccr8
This moves parts of IPCMessageUtils.h to two new header files and adapts
the include directives as necessary. The new header files are:
- EnumSerializer.h, which defines the templates for enum serializers
- IPCMessageUtilsSpecializations.h, which defines template specializations
  of ParamTraits with extra dependencies (building upon both IPCMessageUtils.h
  and EnumSerializer.h)

This should minimize the dependencies pulled in by every consumer of
IPCMessageUtils.h

Differential Revision: https://phabricator.services.mozilla.com/D94459
2020-12-10 11:09:21 +00:00
Mihai Alexandru Michis 783558e615 Backed out changeset 547a95c0bb90 (bug 1666214) for causing talos failures.
CLOSED TREE
2020-12-09 22:08:57 +02:00
Simon Giesecke 450b013593 Bug 1666214 - Move shutdown timeout handling to QuotaManager. r=dom-workers-and-storage-reviewers,janv
Instead of having a separate timer for each quota client, we can use a single
timer in the QuotaManager for handling timeouts of all quota clients. The
original shutdown timeout of the quota manager itself can now be removed,
as AbortOperations is already called through InitiateShutdownWorkThreads on
each quota client.

This also moves MaybeRecordShutdownStep to the QuotaManager, which allows
easier access through the singleton instance returned by QuotaManager::GetRef.

Differential Revision: https://phabricator.services.mozilla.com/D98073
2020-12-09 13:03:36 +00:00
Jan Varga fe7c71a9e0 Bug 1680031 - Abort operations for given directory lock ids; r=dom-workers-and-storage-reviewers,sg
This patch changes the way how we abort operations when clearing of data is
requested. Instead of aborting all operations for given origin, we now abort
all operations for given directory locks which are blocking clearing of data.

Differential Revision: https://phabricator.services.mozilla.com/D98609
2020-12-09 08:13:44 +00:00
Simon Giesecke b2d834a030 Bug 1680724 - Use ToMaybeRef or SafeRefPtr::maybeDeref where possible. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D98784
2020-12-08 17:49:30 +00:00
Simon Giesecke 0acc527c9e Bug 1678030 - Generalize CreateAndExecuteSingleStepStatement to accept an optional bind functor. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D97462
2020-12-04 15:15:31 +00:00
Simon Giesecke 1ff0e248eb Bug 1678030 - Support multiple variants of hasResult expectations in CreateAndExecuteSingleStepStatement. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D97461
2020-12-04 15:10:07 +00:00
Simon Giesecke e6b749fc81 Bug 1678030 - Move CreateAndExecuteSingleStepStatement to QuotaCommon and use in all quota clients. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D97460
2020-12-04 14:56:18 +00:00
Jan Varga 6aee31c945 Bug 1680031 - DOMCACHE: Change argument type of Condition in AbortMatching to a reference; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D98430
2020-12-02 16:48:45 +00:00
Jan Varga ccea28442b Bug 1680031 - Introduce Client::AbortAllOperations; r=dom-workers-and-storage-reviewers,sg
Client::AbortOperations no longer supports the case when an empty origin string
is passed (which was used to abort all operations).

Differential Revision: https://phabricator.services.mozilla.com/D98344
2020-12-02 16:38:07 +00:00
Simon Giesecke 6f59efdcd5 Bug 1672369 - Record Cache API shutdown steps. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D94740
2020-11-30 13:04:23 +00:00
Simon Giesecke 257530e1da Bug 1672369 - Unify handling shutdown timeout of quota clients. r=dom-workers-and-storage-reviewers,ttung,janv
Differential Revision: https://phabricator.services.mozilla.com/D94318
2020-11-30 10:40:59 +00:00
Simon Giesecke bafe1df218 Bug 1672369 - Pull up common ShutdownWorkThreads into QuotaClient. r=dom-workers-and-storage-reviewers,ttung,janv
Differential Revision: https://phabricator.services.mozilla.com/D94298
2020-11-26 09:20:03 +00:00
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Simon Giesecke d10d03d076 Bug 1676365 - Move SpinEventLoopUntil to separate header. r=#xpcom-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96556

Depends on D96554
2020-11-23 16:10:41 +00:00
Simon Giesecke 5b3084384e Bug 1660470 - Move void_t/null_t to a new IPCCore.h header. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93546

Depends on D93544
2020-11-23 16:05:20 +00:00
Simon Giesecke 0fc89f327c Bug 1660470 - Avoid including FetchIPCUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93248

Depends on D93246
2020-11-23 16:04:50 +00:00
Simon Giesecke 252f99be51 Bug 1660470 - Avoid including ErrorIPCUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93243

Depends on D93242
2020-11-23 16:04:28 +00:00
Simon Giesecke 394f4c2966 Bug 1660470 - Avoid including dom/cache/IPCUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93242

Depends on D93241
2020-11-23 16:04:22 +00:00
Simon Giesecke c077183836 Bug 1660470 - Avoid including IPCMessageUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93235

Depends on D93234
2020-11-23 16:03:47 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Jan Varga f9fdb2de2a Bug 1619592 - Replace EnsureStorageAndOriginIsInitialized with EnsureTemporaryOriginIsInitialized in dom/cache; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D97258
2020-11-19 15:41:55 +00:00
Simon Giesecke d7abe77fa1 Bug 1671367 - Add overloads of NS_NewLocal*FileStream functions returning a Result and use them. r=dom-workers-and-storage-reviewers,necko-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D94138
2020-11-17 19:30:05 +00:00
Jan Varga a7d7c361aa Bug 1619592 - Remove unused aClientType argument in EnsureStorageAndOriginIsInitialized; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D97253
2020-11-17 08:37:00 +00:00
Bogdan Tara 0fbb64410b Backed out 8 changesets (bug 1671367) for ActorsParent.cpp related bustage CLOSED TREE
Backed out changeset cacebe0fc34c (bug 1671367)
Backed out changeset 37e2f1c36fc7 (bug 1671367)
Backed out changeset c4a3fca623aa (bug 1671367)
Backed out changeset 75e95ebade6a (bug 1671367)
Backed out changeset bfc08841dafb (bug 1671367)
Backed out changeset 445d4fd6004d (bug 1671367)
Backed out changeset 90e38a8f77d6 (bug 1671367)
Backed out changeset 7e5910c8a82e (bug 1671367)
2020-11-17 21:26:08 +02:00
Simon Giesecke 8aa789e16e Bug 1671367 - Add overloads of NS_NewLocal*FileStream functions returning a Result and use them. r=dom-workers-and-storage-reviewers,necko-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D94138
2020-11-17 15:13:22 +00:00
Simon Giesecke 3236acba9d Bug 1671369 - Change GetUsageForClient to return a UsageInfo. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D93777
2020-11-17 13:17:24 +00:00
Simon Giesecke 37c89691c2 Bug 1671369 - Change DirectoryPaddingFileExists to use CACHE_TRY. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D93776
2020-11-17 11:36:34 +00:00
Simon Giesecke dec6e1d21c Bug 1671369 - Change LockedDirectoryPaddingGet to return a Result and use CACHE_TRY. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D93775
2020-11-17 09:07:03 +00:00
Simon Giesecke a52d798cb2 Bug 1671369 - Change LockedDirectoryPaddingRestore to return a Result and use CACHE_TRY. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D93774
2020-11-17 09:04:35 +00:00
Simon Giesecke fe283bda0a Bug 1671369 - Change OpenDBConnection to return a Result. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D93773
2020-11-17 09:04:33 +00:00
Simon Giesecke 669e845944 Bug 1671369 - Extract ReduceEach function from ReduceUsageInfo. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D93772
2020-11-17 09:04:28 +00:00
Simon Giesecke cbccc42eb2 Bug 1671369 - Extract ReduceUsageInfo function from GetBodyUsage and GetUsageForOriginInternal. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D93771
2020-11-17 09:04:25 +00:00
Simon Giesecke 56ab947139 Bug 1671369 - Change GetBodyUsage to return a Result. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D93769
2020-11-17 09:04:23 +00:00
Simon Giesecke 923504afa0 Bug 1671369 - Move anonymous namespace inside mozilla::dom::cache. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D93767
2020-11-17 09:04:21 +00:00
Simon Giesecke dcd436349e Bug 1671369 - Change LockedGetPaddingSizeFromDB to return a Result. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D93766
2020-11-17 09:04:18 +00:00
Simon Giesecke ef9d87ac52 Bug 1671369 - Use CACHE_TRY in CacheQuotaClient::GetUsageForOriginInternal. r=ttung
Differential Revision: https://phabricator.services.mozilla.com/D93662
2020-11-17 09:04:16 +00:00
Sylvestre Ledru fde06f6d21 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Butkovits Atila 964cca3198 Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru 5f29324f60 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00