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
8953086494
Bug 1677284 - Move PackingStrategy::Variant implementation to separate header file. r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D97075
2020-11-23 15:49:14 +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
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
Ricky Stewart
50762dacab
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. 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-21 21:27:27 +00:00
Simon Giesecke
2282fb5a6a
Bug 1626555 - Make `dom/quota` buildable outside of `unified-build` environment. r=andi
...
Differential Revision: https://phabricator.services.mozilla.com/D94011
2020-10-21 13:16:19 +00:00
Simon Giesecke
64de9bfc62
Bug 1671897 - Fix test naming. r=janv,dom-workers-and-storage-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D94013
2020-10-19 15:00:55 +00:00
Simon Giesecke
855223cb72
Bug 1671897 - Add QM_DIAGNOSTIC_ASSERT_UNREACHABLE and define QM_*_ASSERT_UNREACHABLE only when the assert level is active. r=dom-workers-and-storage-reviewers,janv
...
Differential Revision: https://phabricator.services.mozilla.com/D93923
2020-10-19 12:43:13 +00:00
Simon Giesecke
2042d96195
Bug 1663924 - Use IDB_TRY in QuotaClient::GetUsageForOriginInternal and remove REPORT_TELEMETRY_INIT_ERR. r=dom-workers-and-storage-reviewers,ttung
...
Also add a new CollectEachInRange function template in QuotaCommon.h, along
with tests.
Differential Revision: https://phabricator.services.mozilla.com/D92278
2020-10-15 14:33:36 +00:00
Jan Varga
a1b49eac52
Bug 1671109 - Remove QM_DEBUG_TRY/QM_DEBUG_TRY_UNWRAP/QM_DEBUG_TRY_RETURN/QM_DEBUG_FAIL macros and quota client specific equivalents; r=dom-workers-and-storage-reviewers,sg
...
Differential Revision: https://phabricator.services.mozilla.com/D93474
2020-10-14 10:01:20 +00:00
Jan Varga
c865a665a1
Bug 1665019 - Add QM_ASSERT_UNREACHABLE/QM_ASSERT_UNREACHABLE_VOID as a custom return value and convert relevant code to use it; r=dom-workers-and-storage-reviewers,sg
...
Differential Revision: https://phabricator.services.mozilla.com/D90520
2020-10-14 13:03:35 +00:00
Simon Giesecke
20a9b720d4
Bug 1666219 - Renamed QM_TRY_VAR etc. to QM_TRY_UNWRAP etc. r=dom-workers-and-storage-reviewers,ttung,janv
...
Also change some left-over QM_TRY_VAR uses with const target declarations to
QM_TRY_INSPECT et al.
Differential Revision: https://phabricator.services.mozilla.com/D90873
2020-10-02 13:23:49 +00:00
Simon Giesecke
23a4305389
Bug 1668548 - Only pass the error value to a cleanup function with QM_TRY*. r=dom-workers-and-storage-reviewers,janv
...
Differential Revision: https://phabricator.services.mozilla.com/D92067
2020-10-02 10:04:37 +00:00
Simon Giesecke
6d35002b92
Bug 1668539
- Do not prevent RVO with QM_TRY_RETURN. r=dom-workers-and-storage-reviewers,janv
...
Differential Revision: https://phabricator.services.mozilla.com/D92061
2020-10-02 10:03:29 +00:00
Sebastian Hengst
ae5e3a0d7c
Backed out 5 changesets (bug 1666219, bug 1665347) for crashing hazard task. CLOSED TREE.
...
Backed out changeset c261ec06a826 (bug 1665347)
Backed out changeset 212c9df41410 (bug 1665347)
Backed out changeset 435f02d9f1d7 (bug 1665347)
Backed out changeset 7b36a79247b7 (bug 1666219)
Backed out changeset af8025162523 (bug 1665347)
2020-10-01 23:17:19 +02:00
Simon Giesecke
8598a731fc
Bug 1666219 - Renamed QM_TRY_VAR etc. to QM_TRY_UNWRAP etc. r=dom-workers-and-storage-reviewers,ttung,janv
...
Also change some left-over QM_TRY_VAR uses with const target declarations to
QM_TRY_INSPECT et al.
Differential Revision: https://phabricator.services.mozilla.com/D90873
2020-10-01 15:37:50 +00:00
Bogdan Tara
104db9798f
Backed out 5 changesets (bug 1666219, bug 1665347) for indexedDB related bustage CLOSED TREE
...
Backed out changeset 5cd7e2d67f91 (bug 1665347)
Backed out changeset 9159fdd05097 (bug 1665347)
Backed out changeset 64a086636738 (bug 1665347)
Backed out changeset 5ef18af381ec (bug 1666219)
Backed out changeset 3b81349a5f39 (bug 1665347)
2020-10-01 17:41:23 +03:00
Simon Giesecke
4c5b983d6f
Bug 1666219 - Renamed QM_TRY_VAR etc. to QM_TRY_UNWRAP etc. r=dom-workers-and-storage-reviewers,ttung,janv
...
Also change some left-over QM_TRY_VAR uses with const target declarations to
QM_TRY_INSPECT et al.
Differential Revision: https://phabricator.services.mozilla.com/D90873
2020-10-01 12:02:26 +00:00
Simon Giesecke
67084ddd9b
Bug 1666216 - Enable ScopedLogExtraInfo logging. r=dom-workers-and-storage-reviewers,janv
...
Differential Revision: https://phabricator.services.mozilla.com/D90877
2020-09-30 08:24:18 +00:00
Simon Giesecke
c711008a61
Bug 1666219 - Introduce QM_TRY_INSPECT to avoid unwrapping Result objects where not necessary. r=dom-workers-and-storage-reviewers,janv
...
Differential Revision: https://phabricator.services.mozilla.com/D90843
2020-09-29 10:57:14 +00:00
Simon Giesecke
eaa00050e4
Bug 1665850 - Switch JS to use non-reference errors with mozilla::Result. r=jandem
...
Also switch optimizations for HasFreeLSB and existing tests to no longer
use references.
Differential Revision: https://phabricator.services.mozilla.com/D90661
2020-09-21 13:14:10 +00:00
Simon Giesecke
2e065c64d6
Bug 1665614 - Make mozilla::Result work with non-copyable/non-param error types. r=emilio,jandem
...
Among other things, there were some misuses of std::forward, and
GenericErrorResult was (presumably accidentally) instatiated with
references as the template argument type, e.g. const nsresult&,
which circumvented the check for not calling it with NS_OK in
ResultExtensions.h
Differential Revision: https://phabricator.services.mozilla.com/D90561
2020-09-21 13:12:48 +00:00
Butkovits Atila
270e7e2200
Backed out 5 changesets (bug 1665927
, bug 1665614, bug 1665850) for causing bustage on Result.h. CLOSED TREE
...
Backed out changeset 1467e76399e8 (bug 1665927
)
Backed out changeset ebd4dfbc0a88 (bug 1665850)
Backed out changeset 5e23340e3b39 (bug 1665850)
Backed out changeset 5bc547e7a773 (bug 1665850)
Backed out changeset 8d88afb85a78 (bug 1665614)
2020-09-21 15:25:16 +03:00
Simon Giesecke
70bda1ef61
Bug 1665850 - Switch JS to use non-reference errors with mozilla::Result. r=jandem
...
Also switch optimizations for HasFreeLSB and existing tests to no longer
use references.
Differential Revision: https://phabricator.services.mozilla.com/D90661
2020-09-21 11:11:02 +00:00
Simon Giesecke
3b0420646e
Bug 1665614 - Make mozilla::Result work with non-copyable/non-param error types. r=emilio,jandem
...
Among other things, there were some misuses of std::forward, and
GenericErrorResult was (presumably accidentally) instatiated with
references as the template argument type, e.g. const nsresult&,
which circumvented the check for not calling it with NS_OK in
ResultExtensions.h
Differential Revision: https://phabricator.services.mozilla.com/D90561
2020-09-21 10:38:19 +00:00
Simon Giesecke
f05dba1711
Bug 1663924 - Add ScopedLogExtraInfo. r=dom-workers-and-storage-reviewers,janv
...
Differential Revision: https://phabricator.services.mozilla.com/D90112
2020-09-21 10:32:55 +00:00
Csoregi Natalia
2306d2079a
Backed out 11 changesets (bug 1663924, bug 1664844) for multiple failures. CLOSED TREE
...
Backed out changeset 2da9fde7a109 (bug 1663924)
Backed out changeset 9353759cc783 (bug 1663924)
Backed out changeset 309354891d60 (bug 1663924)
Backed out changeset 4e51461c369c (bug 1663924)
Backed out changeset e3196b68932c (bug 1663924)
Backed out changeset 25b16cbae152 (bug 1664844)
Backed out changeset e02961ac5ee7 (bug 1663924)
Backed out changeset dde2058c20ef (bug 1663924)
Backed out changeset a80f52551e3a (bug 1663924)
Backed out changeset 0c37ce712c2c (bug 1663924)
Backed out changeset 8cc5dcc86f40 (bug 1663924)
2020-09-18 04:52:32 +03:00
Jan Varga
f0debef582
Bug 1663565 - Introduce QM_TRY_RETURN/QM_TRY_DEBUG_RETURN macros and quota client specific equivalents; r=dom-workers-and-storage-reviewers,sg,ttung
...
Differential Revision: https://phabricator.services.mozilla.com/D89413
2020-09-17 14:01:01 +00:00
Simon Giesecke
4f1ba76c89
Bug 1663924 - Add ScopedLogExtraInfo. r=dom-workers-and-storage-reviewers,janv
...
Differential Revision: https://phabricator.services.mozilla.com/D90112
2020-09-17 09:38:12 +00:00
Razvan Maries
559e163f24
Backed out 9 changesets (bug 1663924, bug 1664844) for Linux Mochitests leaks. CLOSED TREE
...
Backed out changeset 8d28611ac9b2 (bug 1663924)
Backed out changeset e0b0b3a19544 (bug 1663924)
Backed out changeset 884e286909f9 (bug 1663924)
Backed out changeset ffed28f0b547 (bug 1664844)
Backed out changeset 4c22c3c8aa28 (bug 1663924)
Backed out changeset fcaed021597c (bug 1663924)
Backed out changeset 30394cbcaaf6 (bug 1663924)
Backed out changeset 014bcf5d13b9 (bug 1663924)
Backed out changeset ccf09dfa817a (bug 1663924)
2020-09-16 19:16:21 +03:00
Simon Giesecke
228c508686
Bug 1663924 - Add ScopedLogExtraInfo. r=dom-workers-and-storage-reviewers,janv
...
Differential Revision: https://phabricator.services.mozilla.com/D90112
2020-09-16 14:56:20 +00:00
Jan Varga
e5ee46c338
Bug 1662097 - QM_TRY/QM_TRY_VAR cleanup functions should have access to tryTempResult; r=dom-workers-and-storage-reviewers,sg
...
Differential Revision: https://phabricator.services.mozilla.com/D88807
2020-09-07 12:24:33 +00:00
Jan Varga
7e31de8547
Bug 1662004 - Add support for nested QM_TRY/QM_TRY_VAR macros; r=dom-workers-and-storage-reviewers,sg,ttung
...
Differential Revision: https://phabricator.services.mozilla.com/D88764
2020-09-07 18:00:00 +00:00
Jan Varga
16aa57011b
Bug 1661988 - Introduce QM_DEBUG_TRY/QM_DEBUG_TRY_VAR/QM_DEBUG_FAIL macros and quota client specific equivalents; r=dom-workers-and-storage-reviewers,sg,ttung
...
Differential Revision: https://phabricator.services.mozilla.com/D88760
2020-09-07 10:05:13 +00:00
Jan Varga
bd8716748a
Bug 1661988 - Clean up TestQuotaCommon.cpp; r=dom-workers-and-storage-reviewers,sg
...
Differential Revision: https://phabricator.services.mozilla.com/D89318
2020-09-07 08:51:21 +00:00
Simon Giesecke
a8d941f9a6
Bug 1661085 - Use IDB_TRY_* macros in CreateMarkerFile and RemoveMarkerFile. r=janv,dom-workers-and-storage-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D88170
2020-08-28 15:51:23 +00:00
Simon Giesecke
41774cf0d3
Bug 1661084 - Add CollectWhile/CollectEach algorithms for Result. r=janv
...
Differential Revision: https://phabricator.services.mozilla.com/D88169
2020-08-28 15:51:06 +00:00
Razvan Maries
7a010f17ae
Backed out 11 changesets (bug 1661083, bug 1661085, bug 1661084) for build bustages on ResultExtensions.h. CLOSED TREE
...
Backed out changeset 962967831dd4 (bug 1661085)
Backed out changeset 8e61a7d2daf9 (bug 1661085)
Backed out changeset 1edbc081c9f0 (bug 1661085)
Backed out changeset c640f4126079 (bug 1661085)
Backed out changeset b5fc9ebaac12 (bug 1661085)
Backed out changeset 4e3faaadccb6 (bug 1661085)
Backed out changeset 522cdd011e03 (bug 1661085)
Backed out changeset 896e47fc24e3 (bug 1661085)
Backed out changeset bf4043d4ce8e (bug 1661085)
Backed out changeset d0162bb5012e (bug 1661084)
Backed out changeset f0e7db520938 (bug 1661083)
2020-08-28 16:27:58 +03:00
Simon Giesecke
557c5bf3ad
Bug 1661085 - Use IDB_TRY_* macros in CreateMarkerFile and RemoveMarkerFile. r=janv,dom-workers-and-storage-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D88170
2020-08-28 10:03:07 +00:00
Simon Giesecke
fccf1a2cc3
Bug 1661084 - Add CollectWhile/CollectEach algorithms for Result. r=janv
...
Differential Revision: https://phabricator.services.mozilla.com/D88169
2020-08-28 10:02:49 +00:00
Jan Varga
f2f47372af
Bug 1659959 - Introduce QM_FAIL macro and quota client specific equivalents; r=dom-workers-and-storage-reviewers,sg
...
Differential Revision: https://phabricator.services.mozilla.com/D87633
2020-08-27 11:10:10 +00:00
Simon Giesecke
3dd521872b
Bug 1536596 - Added unit tests for AnonymizedOriginString. r=dom-workers-and-storage-reviewers,janv
...
Depends on D88288
Differential Revision: https://phabricator.services.mozilla.com/D88289
2020-08-26 13:54:53 +00:00
Jan Varga
57c6350d78
Bug 1659680 - QM: Introduce ToResultGet and use it in EnsureStorageIsInitialized; r=dom-workers-and-storage-reviewers,sg
...
Differential Revision: https://phabricator.services.mozilla.com/D87422
2020-08-24 17:41:30 +00:00
Jan Varga
549e4c14b7
Bug 1659677 - QM: Replace SuccessEnforcer with mozilla::Result::orElse; r=dom-workers-and-storage-reviewers,sg
...
Differential Revision: https://phabricator.services.mozilla.com/D87420
2020-08-24 16:36:08 +00:00
Jan Varga
b7ae478543
Bug 1659693 - Support additional cleanup function in QM_TRY/QM_TRY_VAR; r=dom-workers-and-storage-reviewers,sg
...
Differential Revision: https://phabricator.services.mozilla.com/D87431
2020-08-21 08:11:25 +00:00
Jan Varga
4d6fbf54e6
Bug 1658873 - Support variable declaration containing commas in QM_TRY_VAR; r=dom-workers-and-storage-reviewers,ttung
...
Differential Revision: https://phabricator.services.mozilla.com/D86912
2020-08-18 08:25:49 +00:00
Simon Giesecke
1fccb4c60f
Bug 1634436 - Make cipher-strategy stateful and keep mode, key and IV as state. r=dom-workers-and-storage-reviewers,janv
...
Differential Revision: https://phabricator.services.mozilla.com/D80014
2020-08-17 08:42:20 +00:00