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

1251 Коммитов

Автор SHA1 Сообщение Дата
Jan Varga 1af2efb302 Bug 1731977 - Add MOZ_TO_RESULT_INVOKE_TYPED for invoking plain functions; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D126329
2021-11-30 05:05:53 +00:00
Jan Varga a7f7389681 Bug 1731969 - Rename ToResultInvoke member function overloads to ToResultInvokeMember; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D126328
2021-11-30 05:05:53 +00:00
Jan Varga ff4cf60eb4 Bug 1731962 - Move ToResultGet from QuotaCommon.h to ResultExtensions.h; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D126326
2021-11-30 05:05:51 +00:00
Jan Varga 8ff5e0ec6f Bug 1731961 - Add ToResultTransform for transforming Result<V, E2> to Result<V, E>; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D126325
2021-11-30 05:05:51 +00:00
Jan Varga adc8da34e9 Bug 1731960 - Move all Result extensions from QMResult.h to a dedicated file; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D126324
2021-11-30 05:05:51 +00:00
Haiyang Xu 4aae583bea Bug 1726809 - Simplify QuotaManager::GetOrCreate and intermediate state of opening QuotaManager; r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D131592
2021-11-28 00:09:56 +00:00
Butkovits Atila 7f647e7f41 Backed out changeset b4b0ae95055b (bug 1726809) for causing build bustages at ActorsParent.cpp. CLOSED TREE 2021-11-26 12:02:18 +02:00
Haiyang Xu a12fd4fda6 Bug 1726809 - Simplify QuotaManager::GetOrCreate and intermediate state of opening QuotaManager; r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D131592
2021-11-26 09:20:57 +00:00
Jan Varga 18a684b0eb Bug 1731864 - Add QM_TO_RESULT_INVOKE and QM_TO_RESULT_INVOKE_TYPED; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D126274
2021-11-12 16:12:39 +00:00
Jan Varga 367fa7927a Bug 1731804 - Allow ToResult(const QMResult& aValue) and ToResult(QMResult&& aValue) to return other nsresult like error types; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D126272
2021-11-12 07:58:47 +00:00
Jan Varga c48363726e Bug 1731803 - Change QM_TO_RESULT to use generic ToResult function; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D126271
2021-11-12 07:58:47 +00:00
Andrew Osmond 9cccd6a004 Bug 1739677 - Fix includes for PQuotaRequest.ipdl. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D130505
2021-11-05 20:23:37 +00:00
Haiyang Xu 35ca020a6b Bug 1722466 - Add an RAII helper class QuotaDatabaseAutoAttacher to ensure database will be detached automatically in scope exit if any error happens before explicitly detach; r=dom-storage-reviewers,janv
This patch add an RAII helper class QuotaDatabaseAutoAttacher, which provides an Attach() and Detach() method, and guarantees that the database will be detached in it's destructor when an instance of this class is out of scope.

Differential Revision: https://phabricator.services.mozilla.com/D128042
2021-11-05 10:39:45 +00:00
Haiyang Xu 2eff35a43c Bug 1726711 - Replace NS_ERROR with QM_TRY and return immediately in case of shutdown re-entrance; r=jstutte,dom-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D127948
2021-10-27 15:18:22 +00:00
Jan Varga 8f1db33652 Bug 1734332 - Allow creation of custom directory locks in classes which derive from NormalOriginOperationBase; r=hxu
Differential Revision: https://phabricator.services.mozilla.com/D127619
2021-10-12 14:01:29 +00:00
Jan Varga 8ea00fe8d0 Bug 1734151 - Add more shutdown step recording to ClearRequestBase::DeleteFiles; r=dom-storage-reviewers,hxu
Differential Revision: https://phabricator.services.mozilla.com/D127617
2021-10-12 12:29:43 +00:00
Jan Varga eb2d4109e9 Bug 1734151 - Add MaybeRecordQuotaManagerShutdownStepWith and use it in cases when the string must be dynamically generated; r=hxu
Differential Revision: https://phabricator.services.mozilla.com/D127548
2021-10-12 12:29:43 +00:00
Jan Varga 53d543c18f Bug 1734151 - Move the shutdown started check into public methods for shutdown step recording; r=hxu
This will allow to add a method like MaybeRecordQuotaManagerShutdownStepWith
which will take a function for generating the string.

Differential Revision: https://phabricator.services.mozilla.com/D127545
2021-10-12 12:29:42 +00:00
Haiyang Xu 7320cb7c88 Bug 1732274 - Use QM_WARNONLY_TRY when directory removal fails during clearing origins; r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D126798
2021-10-12 11:07:29 +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
Jens Stutte 2c7cda331d Bug 1731564: Use motivated SpinEventLoopUntil inside dom/*. r=smaug
Depends on D126714

Differential Revision: https://phabricator.services.mozilla.com/D126957
2021-10-07 08:06:11 +00:00
Marian-Vasile Laza 18fb16c542 Backed out 18 changesets (bug 1731564) for causing build bustages on SpinEventLoopUntil. CLOSED TREE
Backed out changeset 0464dbdc8584 (bug 1731564)
Backed out changeset 0d996df13545 (bug 1731564)
Backed out changeset 5630a0e7a109 (bug 1731564)
Backed out changeset 37b41d187cdb (bug 1731564)
Backed out changeset d37700fa60b6 (bug 1731564)
Backed out changeset b0ce7db44b99 (bug 1731564)
Backed out changeset aa5ec3aa1535 (bug 1731564)
Backed out changeset 73b648f1fa70 (bug 1731564)
Backed out changeset bb8fb0f9833e (bug 1731564)
Backed out changeset 0d8905144f5d (bug 1731564)
Backed out changeset 2cfb094a1ec3 (bug 1731564)
Backed out changeset 78d3b0257a6a (bug 1731564)
Backed out changeset e9d32926e93c (bug 1731564)
Backed out changeset 874cab520ce5 (bug 1731564)
Backed out changeset d8071cc32bd9 (bug 1731564)
Backed out changeset 283c5393cbbc (bug 1731564)
Backed out changeset 317bc38e3de5 (bug 1731564)
Backed out changeset 53e3f4862439 (bug 1731564)
2021-10-07 00:09:19 +03:00
Jens Stutte f764763e98 Bug 1731564: Use motivated SpinEventLoopUntil inside dom/*. r=smaug
Depends on D126714

Differential Revision: https://phabricator.services.mozilla.com/D126957
2021-10-06 19:45:12 +00:00
Jan Varga b75d89f7dc Bug 1728267 - Fix compilation when QM_ERROR_STACKS_ENABLED is not defined; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D126589
2021-09-30 11:14:58 +00:00
Mike Hommey 70b2676ce8 Bug 1733034 - Fix linux bustage. CLOSED TREE 2021-09-30 04:26:22 +03:00
Mike Hommey ceabf5781e Bug 1733034 - Ignore unreachable-code-loop-increment in TestFlatten. r=dom-workers-and-storage-reviewers,janv
dom/quota/test/gtest/TestFlatten.cpp:18:3: error: loop will run at most once (loop increment never executed) [-Werror,-Wunreachable-code-loop-increment]
  for (const auto& item : Flatten<int>(nsTArray<int>{})) {
  ^~~
dom/quota/test/gtest/TestFlatten.cpp:26:3: error: loop will run at most once (loop increment never executed) [-Werror,-Wunreachable-code-loop-increment]
  for (const auto& item : Flatten<int>(nsTArray<CopyableTArray<int>>{})) {
  ^~~
dom/quota/test/gtest/TestFlatten.cpp:34:3: error: loop will run at most once (loop increment never executed) [-Werror,-Wunreachable-code-loop-increment]
  for (const auto& item :
  ^~~

clang figures out that the loop is not going to execute, which is the
whole point of the test.

Differential Revision: https://phabricator.services.mozilla.com/D126874
2021-09-29 21:44:52 +00:00
Haiyang Xu bd1db4dc05 Bug 1732274 - Record a message when directory removal fails in quota manager shutdown; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D126769
2021-09-28 13:30:38 +00:00
Jan Varga 3a33acd549 Bug 1728267 - Remove implicit ToResult from QM_TRY when no extra argument is passed; r=dom-storage-reviewers,jstutte,jari
Differential Revision: https://phabricator.services.mozilla.com/D125323
2021-09-24 13:08:31 +00:00
Jan Varga d512bd65af Bug 1728267 - Remove implicit ToResult from QM_TRY when no extra argument is passed in dom/quota; r=dom-storage-reviewers,jstutte,jari
Differential Revision: https://phabricator.services.mozilla.com/D125317
2021-09-24 13:08:29 +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 4cc9bf1d18 Bug 1728267 - Remove implicit ToResult from QM_TRY when two extra arguments are passed; r=dom-storage-reviewers,jstutte,jari
Differential Revision: https://phabricator.services.mozilla.com/D125315
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 1c3defcc5b Bug 1728267 - Fix TestQMResult.cpp to start with the current last stack id instead of using a hard coded constant; r=dom-storage-reviewers,jstutte
This is needed especially when QMResult is used in some global initialization
like InitializeQuotaManager.

Differential Revision: https://phabricator.services.mozilla.com/D125313
2021-09-23 05:27:37 +00:00
Jan Varga c7dda8bf82 Bug 1728267 - Remove implicit ToResult from QM_TRY_RETURN; r=dom-storage-reviewers,jstutte,jari
Differential Revision: https://phabricator.services.mozilla.com/D125312
2021-09-23 04:06:11 +00:00
Jan Varga 1312f985cf Bug 1728267 - Remove auto conversion of QMResult to nsresult; r=dom-storage-reviewers,jstutte,jari
This will also prevent implicit conversion of Result<V, QMResult> to
Result<V, nsresult>.

Differential Revision: https://phabricator.services.mozilla.com/D125311
2021-09-23 04:06:10 +00:00
Jan Varga 7cd6d08965 Bug 1728267 - Introduce MOZ_TO_RESULT; r=dom-storage-reviewers,jstutte,jari
Differential Revision: https://phabricator.services.mozilla.com/D125310
2021-09-23 04:06:10 +00:00
criss 7f1d028a6f Bug 1722668 - Fix lint failure r=fix 2021-09-22 23:27:34 +03:00
Jan Varga 6e2ea3fb58 Bug 1722668 - Add test_unsetLastAccessTime.js for the case when quota information is cached; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D125169
2021-09-22 19:08:33 +00:00
Jan Varga a294b48418 Bug 1722668 - Implement nsIQuotaManagerService::getFullOriginMetadata; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D125168
2021-09-22 19:08:33 +00:00
Chris Peterson c9530ebe28 Bug 1729598 - Replace MOZ_MUST_USE_TYPE with [[nodiscard]]. r=static-analysis-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D125504
2021-09-15 05:10:51 +00:00
Jan Varga 7d0fd78cda Bug 1722668 - Speed up temporary storage initialization by archiving unaccessed origin directories; r=jari
This patch introduces a new notion of unaccessed origins. An origin is
considered as unaccessed if its age is older than a threshold (controlled by a
new preference, currently set to 13 months). Unaccessed origins are collected
during quota info loading.
When quota info loading is finished we check if it took a long time (controlled
by a new preference, currently set to 21s) and eventually archive unaccessed
origins which should speed up temporary storage initialization in a new
session.
Archiving consits of creating a new directory (archive) under storage/archives/0
directory (the name is based on the current date) and moving unaccessed origin
directories to the archive.
Once the patch lands, we will be monitoring QM_QUOTA_INFO_LOAD_TIME_V0
telemetry (quota info load time) and eventually lower down the preference for
long quota info load time.
If there are no issues, the archiving will be replaced with a hard removal of
unaccessed origins and also of the archives which were created in the meantime.

Differential Revision: https://phabricator.services.mozilla.com/D123049
2021-09-04 21:54:53 +00:00
Jan Varga d78c89f78e Bug 1722668 - Implement a workaround for the case when GetLastModifiedTime returns INT64_MIN; r=jari
Differential Revision: https://phabricator.services.mozilla.com/D123613
2021-09-04 21:54:52 +00:00
Csoregi Natalia 03b44ad93d Backed out 3 changesets (bug 1722668) for failures on test_unsetLastAccessTime.js. CLOSED TREE
Backed out changeset db05822c64ff (bug 1722668)
Backed out changeset c9f100cb3f86 (bug 1722668)
Backed out changeset a7179b67eb1a (bug 1722668)
2021-09-05 00:22:49 +03:00
Jan Varga 127496a5fe Bug 1722668 - Speed up temporary storage initialization by archiving unaccessed origin directories; r=jari
This patch introduces a new notion of unaccessed origins. An origin is
considered as unaccessed if its age is older than a threshold (controlled by a
new preference, currently set to 13 months). Unaccessed origins are collected
during quota info loading.
When quota info loading is finished we check if it took a long time (controlled
by a new preference, currently set to 21s) and eventually archive unaccessed
origins which should speed up temporary storage initialization in a new
session.
Archiving consits of creating a new directory (archive) under storage/archives/0
directory (the name is based on the current date) and moving unaccessed origin
directories to the archive.
Once the patch lands, we will be monitoring QM_QUOTA_INFO_LOAD_TIME_V0
telemetry (quota info load time) and eventually lower down the preference for
long quota info load time.
If there are no issues, the archiving will be replaced with a hard removal of
unaccessed origins and also of the archives which were created in the meantime.

Differential Revision: https://phabricator.services.mozilla.com/D123049
2021-09-04 20:10:13 +00:00
Jan Varga 2f260cc9c0 Bug 1722668 - Implement a workaround for the case when GetLastModifiedTime returns INT64_MIN; r=jari
Differential Revision: https://phabricator.services.mozilla.com/D123613
2021-09-04 20:10:12 +00:00
Andi-Bogdan Postelnicu e9592f0e49 Bug 1725145 - fixes in dom for win in non unified env. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D123544
2021-08-25 10:46:15 +00:00
Kagami Sascha Rosylight 6735c3170f Bug 1723050 - Part 23: Replace typedef by using in dom/quota/ r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D121321
2021-08-16 17:05:42 +00:00
Jan Varga fc6c77e407 Bug 1724377 - QM: Replace nsresult with QMResult in InvalidateCache; r=jari
Differential Revision: https://phabricator.services.mozilla.com/D121947
2021-08-10 13:59:05 +00:00
Jan Varga d017e0a42a Bug 1724897 - QM: Introduce QM_TO_RESULT sub-macro; r=jari
Differential Revision: https://phabricator.services.mozilla.com/D122208
2021-08-10 13:59:05 +00:00