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

101 Коммитов

Автор SHA1 Сообщение Дата
Haiyang Xu aafd5d8064 Bug 1672140 - Rename cache::ClientMetadata to cache::CacheDirectoryMetadata; r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D131590
2021-11-24 20:50:37 +00:00
hxu 93316dde65 Bug 1672140 - Change cache::ClientMetadata's base class from quota::OriginMetadata to quota::ClientMetadata; r=dom-storage-reviewers,janv
Depends on D125583

Differential Revision: https://phabricator.services.mozilla.com/D126056
2021-11-24 20:50:37 +00:00
hxu 2dbd17aeac Bug 1672140 - Rename cache::QuotaInfo to cache::ClientMetadata and rename corresponding functions; r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D125583
2021-11-24 20:50:36 +00:00
Butkovits Atila af69ca9209 Backed out 3 changesets (bug 1672140) for causing Bp-hybrid build bustages.
Backed out changeset 32edbc243607 (bug 1672140)
Backed out changeset 549556f430a7 (bug 1672140)
Backed out changeset 396640d13ece (bug 1672140)
2021-11-23 20:25:56 +02:00
Haiyang Xu cd667b26f8 Bug 1672140 - Rename cache::ClientMetadata to cache::CacheDirectoryMetadata; r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D131590
2021-11-23 16:53:50 +00:00
hxu 95d8bdaa44 Bug 1672140 - Change cache::ClientMetadata's base class from quota::OriginMetadata to quota::ClientMetadata; r=dom-storage-reviewers,janv
Depends on D125583

Differential Revision: https://phabricator.services.mozilla.com/D126056
2021-11-23 16:53:50 +00:00
hxu 45a53e311d Bug 1672140 - Rename cache::QuotaInfo to cache::ClientMetadata and rename corresponding functions; r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D125583
2021-11-23 16:53:49 +00:00
Jan Varga 5a11502111 Bug 1731546 - Replace existing ToResultGet uses with MOZ_TO_RESULT_GET_TYPED; r=dom-storage-reviewers,jstutte,jari
Differential Revision: https://phabricator.services.mozilla.com/D125325
2021-10-11 06:00:15 +00:00
Jan Varga 572fb1f823 Bug 1731544 - Replace existing ToResult uses with MOZ_TO_RESULT; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D125324
2021-10-10 19:06:36 +00:00
Jan Varga 685aa0cc5e Bug 1728267 - Remove implicit ToResult from QM_TRY when no extra argument is passed in dom/cache; r=dom-storage-reviewers,jstutte,jari
Differential Revision: https://phabricator.services.mozilla.com/D125319
2021-09-24 13:08:30 +00:00
Jan Varga b4ef3d074a Bug 1728267 - Remove implicit ToResult from QM_TRY when one extra argument is passed; r=dom-storage-reviewers,jstutte,jari
Differential Revision: https://phabricator.services.mozilla.com/D125316
2021-09-23 10:16:09 +00:00
Jan Varga eccdb851bb Bug 1728267 - Remove implicit ToResult from QM_WARNONLY_TRY macros; r=dom-storage-reviewers,jstutte,jari
We can use QM_TO_RESULT (instead of MOZ_TO_RESULT) because QM_WARNONLY_TRY
doesn't propagate errors, so no other adjustment is needed.

Differential Revision: https://phabricator.services.mozilla.com/D125314
2021-09-23 10:16:08 +00:00
Jan Varga f4a3bc258f Bug 1711848 - Add argument separation comments for QM_OR_ELSE(WARN|NOTE|LOG_VERBOSE)(_IF) uses; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D115465
2021-06-01 13:58:27 +00:00
Jan Varga f7d0092e58 Bug 1711656 - Rename QM_OR_ELSE_LOG to QM_OR_ELSE_LOG_VERBOSE; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D115363
2021-06-01 12:12:27 +00:00
Jan Varga 2792c72140 Bug 1708643 - CACHE: Replace QM_OR_ELSE_(WARN|LOG) with QM_OR_ELSE_(WARN|LOG)_IF in places where the fallback needs to be called conditionally; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D115150
2021-05-30 11:08:02 +00:00
Jan Varga 4f5624297e Bug 1711181 - Use QM_OR_ELSE_LOG in remaining places where QM_OR_ELSE_WARN would spam the reports; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D115159
2021-05-21 09:30:30 +00:00
Jan Varga 52086b9801 Bug 1711181 - Change uses of ordinary orElse to QM_OR_ELSE_LOG; r=dom-storage-reviewers,jstutte
This is more consistent with other cases where we either use QM_OR_ELSE_WARN or
QM_OR_ELSE_NOTE. We will later change some uses of QM_OR_ELSE_LOG to
QM_OR_ELSE_LOG_IF. The switch from custom OrElseIf to Result::orElseIf will be
easier when we don't use OrElseIf directly.

This patch only changes uses of ordinary orElse introduced in bug 1701346.

Remaining uses will be handled in bug 1711180 (the ones that were missed in bug
1686191).

Differential Revision: https://phabricator.services.mozilla.com/D115055
2021-05-21 09:30:30 +00:00
Jan Varga 09996cc685 Bug 1709067 - CACHE: Remove module specific QM_TRY macros; r=dom-storage-reviewers,jstutte
Depends on D114080

Differential Revision: https://phabricator.services.mozilla.com/D114081
2021-05-03 19:44:39 +00:00
Jan Varga 729a24595d Bug 1701346 - CACHE: Add explanatory comments for some ordinary orElse uses; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D113526
2021-04-28 07:33:55 +00:00
Jan Varga cf5e9e7c32 Bug 1690326 - Follow-up fix for the ERROR_FILE_CORRUPT to NS_ERROR_FILE_FS_CORRUPTED mapping; r=jstutte
The code which depends on the old generic NS_ERROR_MODULE_WIN32 mapping needs
to be updated too.

Depends on D113505

Differential Revision: https://phabricator.services.mozilla.com/D113518
2021-04-28 07:33:54 +00:00
Jan Varga 8785c44342 Bug 1701346 - CACHE: Revert QM_OR_ELSE_WARN to ordinary orElse in BodyCreateDir; r=asuth,dom-storage-reviewers,jstutte
Depends on D113068

Differential Revision: https://phabricator.services.mozilla.com/D113069
2021-04-24 08:58:32 +00:00
Jan Varga 1910186fa7 Bug 1701346 - CACHE: Revert QM_OR_ELSE_WARN to ordinary orElse in BodyGetCacheDir; r=asuth,dom-storage-reviewers,jstutte
Depends on D113067

Differential Revision: https://phabricator.services.mozilla.com/D113068
2021-04-24 08:58:31 +00:00
Tom Tung abf9f74311 Bug 1655953 - Remove mutex lock for protecting the padding file; r=dom-workers-and-storage-reviewers,sg,asuth,janv
Depends on D81680

Differential Revision: https://phabricator.services.mozilla.com/D85279
2021-04-16 01:09:10 +00:00
Jan Varga 7d3ef83b0f Bug 1686191 - Have a way to specifically report warnings around QM_TRY; r=asuth,sg,dom-storage-reviewers
This patch:
- adds QM_WARNONLY_TRY/QM_NOTEONLY_TRY macros
- adds QM_WARNONLY_TRY_UNWRAP/QM_NOTEONLY_TRY_UNWRAP macros
- adds QM_OR_ELSE_WARN/QM_OR_ELSE_NOTE sub macros
- replaces non-propagating uses of NS_WARNING with redundant messages by
  QM_WARNONLY_TRY
- replaces uses of QM_TRY with orElse by QM_TRY(QM_OR_ELSE_WARN(...))
- replaces uses of QM_TRY inside an extra lambda with QM_WARNONLY_TRY
- replaces uses of QM_TRY with QM_VOID with QM_WARNONLY_TRY.
- replaces uses of QM_TRY with unwanted warnings with QM_NOTEONLY_TRY
- replaces uses of QM_TRY with additional Maybe wrapping for doing a
  fallback with QM_TRY(QM_OR_ELSE_WARN(...))

Differential Revision: https://phabricator.services.mozilla.com/D108424
2021-03-24 12:27:53 +00:00
Butkovits Atila 9fc0210ad3 Backed out changeset 2a3316bd2409 (bug 1686191) for causing bustages on QuotaCommon.h. CLOSED TREE 2021-03-24 07:12:55 +02:00
Jan Varga 6edcf204fd Bug 1686191 - Have a way to specifically report warnings around QM_TRY; r=asuth,sg,dom-storage-reviewers
This patch:
- adds QM_WARNONLY_TRY/QM_NOTEONLY_TRY macros
- adds QM_WARNONLY_TRY_UNWRAP/QM_NOTEONLY_TRY_UNWRAP macros
- adds QM_OR_ELSE_WARN/QM_OR_ELSE_NOTE sub macros
- replaces non-propagating uses of NS_WARNING with redundant messages by
  QM_WARNONLY_TRY
- replaces uses of QM_TRY with orElse by QM_TRY(QM_OR_ELSE_WARN(...))
- replaces uses of QM_TRY inside an extra lambda with QM_WARNONLY_TRY
- replaces uses of QM_TRY with QM_VOID with QM_WARNONLY_TRY.
- replaces uses of QM_TRY with unwanted warnings with QM_NOTEONLY_TRY
- replaces uses of QM_TRY with additional Maybe wrapping for doing a
  fallback with QM_TRY(QM_OR_ELSE_WARN(...))

Differential Revision: https://phabricator.services.mozilla.com/D108424
2021-03-24 04:40:10 +00:00
Jan Varga b59182de8d Bug 1697115 - Rationalize QuotaManager::DecreaseUsageForClient arguments; r=dom-storage-reviewers,sg
Note that the method DecreaseUsageForOrigin has been renamed to
DecreaseUsageForClient.

Differential Revision: https://phabricator.services.mozilla.com/D107615
2021-03-17 06:56:39 +00:00
Simon Giesecke d3b3ad3a3d Bug 1690234 - Ignore ERROR_FILE_CORRUPT when calling BodyTraverseFiles from within CollectEachFile/ReduceUsageInfo. r=dom-workers-and-storage-reviewers,janv,asuth
Differential Revision: https://phabricator.services.mozilla.com/D103785
2021-02-12 09:14:21 +00:00
smolnar fa581f2aee Bug 1687321 - Fix lint failure in dom/cache/FileUtils.cpp a=lint-fix CLOSED TREE 2021-02-08 15:52:49 +02:00
Simon Giesecke 26725b587f Bug 1687321 - Use GetDirEntryKind instead of IsDirectory when iterating over directory entries in dom/cache. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D103763
2021-02-08 13:15:50 +00:00
Simon Giesecke 09a0eebdd9 Bug 1686749 - Let CreateFile*Stream functions propagate all errors. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D101779
2021-01-28 11:12:19 +00:00
Simon Giesecke 731e2bb3f2 Bug 1683828 - Use QM_TRY et al. in FileUtils and modernize signatures. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D100320
2021-01-14 16:42:32 +00:00
Simon Giesecke aa680355aa Bug 1679540 - Extract CollectEachFile function and use in quota manager and clients. r=dom-workers-and-storage-reviewers,ttung,janv
Differential Revision: https://phabricator.services.mozilla.com/D98075
2021-01-05 09:27:18 +00:00
Mihai Alexandru Michis a4520f52a9 Backed out changeset 9ef5f1fe26e8 (bug 1679540) for causing Bug 1683863. a=backout 2020-12-22 17:00:34 +02:00
Simon Giesecke 0a86aba723 Bug 1679540 - Extract CollectEachFile function and use in quota manager and clients. r=dom-workers-and-storage-reviewers,ttung,janv
Differential Revision: https://phabricator.services.mozilla.com/D98075
2020-12-21 18:13:56 +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
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 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
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
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 f92973bd13 Bug 1663924 - Replace output parameters by return values on GetInfo* methods. r=dom-workers-and-storage-reviewers,ttung
This also changes all methods that use a pair of group/origin or a tuple of
suffix/group/origin input/output parameters to use a single GroupAndOrigin
resp. QuotaInfo struct input parameter or return value. Also, several types
having a pair or 3-tuple of such data members are changed to use these structs
instead.

Differential Revision: https://phabricator.services.mozilla.com/D91131
2020-10-20 11:46:31 +00:00
Simon Giesecke d5b79ad8da Bug 1667957 - Use new IntTo(C)String functions in dom/quota and its clients. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D91717
2020-10-14 15:45:50 +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
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