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

465 Коммитов

Автор SHA1 Сообщение Дата
Jari Jalkanen c491347fe1 Bug 1752265 - Prevent conversion of empty values to nulls on bind. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D135597
2022-01-28 11:22:14 +00:00
Jan Varga b5d63c6ae5 Bug 1733054 - Introduce prefs for peak usage pre-incrementation and idle timeout; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D135518
2022-01-19 21:32:15 +00:00
Jan Varga b4b60bf5d3 Bug 1733054 - Rename Timer to IdleTimer in LSSnapshot; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D135517
2022-01-19 21:32:15 +00:00
Jan Varga 55360aeeba Bug 1733054 - Move calculations for peak usage pre-incrementation to the parent process; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D135516
2022-01-19 21:32:14 +00:00
Nika Layzell f2916bb759 Bug 1737828 - Avoid the main thread when starting PBackground, r=asuth,ipc-reviewers,necko-reviewers,kershaw,handyman
This patch avoids requiring the main thread to create PBackground instances by
instead using a background starter TaskQueue, and sending messages from a
PBackgroundStarter actor hosted on that thread to the target background thread
directly. On the background thread, the relevant metadata is already registered
and present in the BackgroundStarterParent actor allowing the main thread in
both processes to be bypassed completely.

Various tasks remain bound to the main thread, such as PBackground cleanup and
async steps involved in PBackground creation.

This patch also unifies the in-process and cross-process PBackground codepaths,
allowing in-process PBackground creation to bypass the main thread as well, and
removing the need for a main thread event target from
GetOrCreateForCurrentThread().

Differential Revision: https://phabricator.services.mozilla.com/D129705
2022-01-10 20:09:14 +00:00
Jari Jalkanen 339fb22d6b Bug 1681300 - Fix local storage corruption. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D128459
2021-12-21 17:58:38 +00:00
Jari Jalkanen 63a7a5aa21 Bug 1681300 - Reproduce localstorage corruption with xpcshell test. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D129508
2021-12-21 16:34:05 +00:00
Randell Jesup c075d29d20 Bug 1625161: Move ASSERT_UNLESS_FUZZING() to mfbt and hook into FUZZING r=glandium,decoder
Differential Revision: https://phabricator.services.mozilla.com/D133166
2021-12-16 04:13:48 +00:00
Nika Layzell 7b2e6d4996 Bug 1741665 - Align nsCString's public size_type better with other C++ APIs, r=mccr8,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D131422
2021-12-13 21:47:56 +00:00
Chris Peterson f6fdbf028a Bug 1738401 - Remove -Wno-shadow warning suppressions. r=firefox-build-system-reviewers,glandium
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.

There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.

Differential Revision: https://phabricator.services.mozilla.com/D132289
2021-12-01 06:40:04 +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 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
Tim Huang 45bfad05fe Bug 1731982 - Part 6: Use the client's principal to verify client in localStorage. r=asuth
Currently, we use the script principal to verify the client to prevent
the principal forgery. After we moving to use foreign partitioned
principal for the Client, this no longer works. Instead, we can directly
use the client's principal to verify client.

Also, the patch rename StoragePrincipalHelper::VerifyValidStoragePrincipalInfoForPrincipalInfo() to
StoragePrincipalHelper::VerifyValidPartitionedPrincipalInfoForPrincipalInfo()
and fix a problem in the function that it should ignore the PartitionKey
instead of the FirstPartyDomain.

Differential Revision: https://phabricator.services.mozilla.com/D127840
2021-11-25 13:11:31 +00:00
Jari Jalkanen 762afb8a19 Bug 1741210 - Make type conversions more explicit. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D131248
2021-11-22 15:53:45 +00:00
Alexandru Michis 490a04115c Backed out 12 changesets (bug 1731982, bug 1736401) for causing crashes. a=backout
DONTBUILD

Backed out changeset ab85eef8a4fd (bug 1736401)
Backed out changeset 347ce2439936 (bug 1731982)
Backed out changeset fa0ff1505daa (bug 1731982)
Backed out changeset 5b1f2b0a5673 (bug 1731982)
Backed out changeset 4adc65d2f1a3 (bug 1731982)
Backed out changeset a8700204af07 (bug 1731982)
Backed out changeset 88bd00ed8d94 (bug 1731982)
Backed out changeset 80bd8c79b931 (bug 1731982)
Backed out changeset 58ca3a94fec0 (bug 1731982)
Backed out changeset 0b28570dea43 (bug 1731982)
Backed out changeset 23524ce67bb9 (bug 1731982)
Backed out changeset d29cc06a65db (bug 1731982)
2021-11-09 09:23:38 +02:00
Tim Huang 439f2f56d3 Bug 1731982 - Part 6: Use the client's principal to verify client in localStorage. r=asuth
Currently, we use the script principal to verify the client to prevent
the principal forgery. After we moving to use foreign partitioned
principal for the Client, this no longer works. Instead, we can directly
use the client's principal to verify client.

Also, the patch rename StoragePrincipalHelper::VerifyValidStoragePrincipalInfoForPrincipalInfo() to
StoragePrincipalHelper::VerifyValidPartitionedPrincipalInfoForPrincipalInfo()
and fix a problem in the function that it should ignore the PartitionKey
instead of the FirstPartyDomain.

Differential Revision: https://phabricator.services.mozilla.com/D127840
2021-11-08 14:30:55 +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
Butkovits Atila 47821a8f76 Backed out 11 changesets (bug 1731982, bug 1736401) for causing crashes in mozilla::dom::ClientHandle::Control. a=backout
Backed out changeset 83176c86784c (bug 1736401)
Backed out changeset 4826707af5b3 (bug 1731982)
Backed out changeset a748e43fada0 (bug 1731982)
Backed out changeset 49302f7705a4 (bug 1731982)
Backed out changeset 59a5860fd74d (bug 1731982)
Backed out changeset 1f7ec5f62c7c (bug 1731982)
Backed out changeset 3142414872de (bug 1731982)
Backed out changeset 363ae2df245d (bug 1731982)
Backed out changeset ae319f8182ac (bug 1731982)
Backed out changeset 23edbfc8e84a (bug 1731982)
Backed out changeset 5f35364352f0 (bug 1731982)
2021-10-19 22:23:12 +03:00
Tim Huang 54fa907186 Bug 1731982 - Part 7: Use the client's principal to verify client in localStorage. r=asuth
Currently, we use the script principal to verify the client to prevent
the principal forgery. After we moving to use foreign partitioned
principal for the Client, this no longer works. Instead, we can directly
use the client's principal to verify client.

Also, the patch rename StoragePrincipalHelper::VerifyValidStoragePrincipalInfoForPrincipalInfo() to
StoragePrincipalHelper::VerifyValidPartitionedPrincipalInfoForPrincipalInfo()
and fix a problem in the function that it should ignore the PartitionKey
instead of the FirstPartyDomain.

Differential Revision: https://phabricator.services.mozilla.com/D127840
2021-10-19 06:33:08 +00:00
Cosmin Sabou 49f2f21930 Backed out 10 changesets (bug 1731982) for causing OS X performance test failures and crashes (Bug 1736436). a=backout DONTBUILD
Backed out changeset 48e6f591f699 (bug 1731982)
Backed out changeset 77907884b2fa (bug 1731982)
Backed out changeset a299a2d43ebe (bug 1731982)
Backed out changeset 005801e7cf91 (bug 1731982)
Backed out changeset ef71b02c40cc (bug 1731982)
Backed out changeset a52dd02f2b3f (bug 1731982)
Backed out changeset 50b14ef1eb4a (bug 1731982)
Backed out changeset 80641bdceb6a (bug 1731982)
Backed out changeset ada9e2008ca4 (bug 1731982)
Backed out changeset a208016e9953 (bug 1731982)
2021-10-18 22:18:08 +03:00
Tim Huang 2bbbe3855b Bug 1731982 - Part 7: Use the client's principal to verify client in localStorage. r=asuth
Currently, we use the script principal to verify the client to prevent
the principal forgery. After we moving to use foreign partitioned
principal for the Client, this no longer works. Instead, we can directly
use the client's principal to verify client.

Also, the patch rename StoragePrincipalHelper::VerifyValidStoragePrincipalInfoForPrincipalInfo() to
StoragePrincipalHelper::VerifyValidPartitionedPrincipalInfoForPrincipalInfo()
and fix a problem in the function that it should ignore the PartitionKey
instead of the FirstPartyDomain.

Differential Revision: https://phabricator.services.mozilla.com/D127840
2021-10-18 12:20:33 +00:00
Cristian Tuns dd44cdf4ef Backed out 10 changesets (bug 1731982) for causing hybrid bustages on nsCORSListenerProxy.obj CLOSED TREE
Backed out changeset a248413c22ec (bug 1731982)
Backed out changeset 1bd7de5d93a1 (bug 1731982)
Backed out changeset d028e1ce1313 (bug 1731982)
Backed out changeset 7db7537bbc24 (bug 1731982)
Backed out changeset 28c18d83906d (bug 1731982)
Backed out changeset 6258b4e10406 (bug 1731982)
Backed out changeset 68bf86b1459c (bug 1731982)
Backed out changeset b8990af2fca2 (bug 1731982)
Backed out changeset 153783261021 (bug 1731982)
Backed out changeset bc9c3abbb8f8 (bug 1731982)
2021-10-15 18:12:21 -04:00
Tim Huang ebbb23509f Bug 1731982 - Part 7: Use the client's principal to verify client in localStorage. r=asuth
Currently, we use the script principal to verify the client to prevent
the principal forgery. After we moving to use foreign partitioned
principal for the Client, this no longer works. Instead, we can directly
use the client's principal to verify client.

Also, the patch rename StoragePrincipalHelper::VerifyValidStoragePrincipalInfoForPrincipalInfo() to
StoragePrincipalHelper::VerifyValidPartitionedPrincipalInfoForPrincipalInfo()
and fix a problem in the function that it should ignore the PartitionKey
instead of the FirstPartyDomain.

Differential Revision: https://phabricator.services.mozilla.com/D127840
2021-10-15 20:00:04 +00:00
Cristian Tuns d3df74e295 Backed out 9 changesets (bug 1731982) for causing wpt failures on localStorage. CLOSED TREE
Backed out changeset bbeba8b14a2f (bug 1731982)
Backed out changeset 645cc214c608 (bug 1731982)
Backed out changeset 3a8e2f9c15e8 (bug 1731982)
Backed out changeset 208dd7c57311 (bug 1731982)
Backed out changeset 76a13a728f13 (bug 1731982)
Backed out changeset a6bfce877a86 (bug 1731982)
Backed out changeset 5fc4e33a8232 (bug 1731982)
Backed out changeset 353e3b3e020a (bug 1731982)
Backed out changeset b07167090923 (bug 1731982)
2021-10-13 10:47:25 -04:00
Tim Huang df3c16b98f Bug 1731982 - Part 7: Use the client's principal to verify client in localStorage. r=asuth
Currently, we use the script principal to verify the client to prevent
the principal forgery. After we moving to use foreign partitioned
principal for the Client, this no longer works. Instead, we can directly
use the client's principal to verify client.

Also, the patch rename StoragePrincipalHelper::VerifyValidStoragePrincipalInfoForPrincipalInfo() to
StoragePrincipalHelper::VerifyValidPartitionedPrincipalInfoForPrincipalInfo()
and fix a problem in the function that it should ignore the PartitionKey
instead of the FirstPartyDomain.

Differential Revision: https://phabricator.services.mozilla.com/D127840
2021-10-13 11:18:54 +00:00
Noemi Erli cb0b4097d6 Backed out 9 changesets (bug 1731982) for causing Bp-hybrid bustages CLOSED TREE
Backed out changeset 82bb76c2e531 (bug 1731982)
Backed out changeset 8240ef0e1771 (bug 1731982)
Backed out changeset f46f05792c6a (bug 1731982)
Backed out changeset 449c821bc56e (bug 1731982)
Backed out changeset cb813505b5a9 (bug 1731982)
Backed out changeset 06fad8cd9345 (bug 1731982)
Backed out changeset 4b8cf4756686 (bug 1731982)
Backed out changeset 5468bf77f732 (bug 1731982)
Backed out changeset 7800585e3d6a (bug 1731982)
2021-10-12 23:12:19 +03:00
Tim Huang c76e241df9 Bug 1731982 - Part 7: Use the client's principal to verify client in localStorage. r=asuth
Currently, we use the script principal to verify the client to prevent
the principal forgery. After we moving to use foreign partitioned
principal for the Client, this no longer works. Instead, we can directly
use the client's principal to verify client.

Also, the patch rename StoragePrincipalHelper::VerifyValidStoragePrincipalInfoForPrincipalInfo() to
StoragePrincipalHelper::VerifyValidPartitionedPrincipalInfoForPrincipalInfo()
and fix a problem in the function that it should ignore the PartitionKey
instead of the FirstPartyDomain.

Differential Revision: https://phabricator.services.mozilla.com/D127840
2021-10-12 18:55:20 +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 2fd705fb88 Bug 1728267 - Remove implicit ToResult from QM_TRY when no extra argument is passed in dom/localstorage; r=dom-storage-reviewers,jstutte,jari
Differential Revision: https://phabricator.services.mozilla.com/D125321
2021-09-24 13:08:31 +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
Kagami Sascha Rosylight bdf127087c Bug 1723050 - Part 17: Replace typedef by using in dom/localstorage/ r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D121315
2021-08-16 17:05:41 +00:00
Gabriele Svelto 559377e821 Bug 1723934 - Remove useless nsExceptionHandler.h inclusions and crash reporter service definitions r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D121708
2021-08-09 20:08:17 +00:00
Jan Varga 226a68d16d Bug 1718197 - Have a way to set QM_TRY context in ExecuteInitialization; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D118808
2021-07-31 16:32:14 +00:00
Jan Varga a418c56853 Bug 1718197 - Simplify access to FirstInitializationAttempt objects in initialization functions; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D119389
2021-07-31 16:32:13 +00:00
Jan Varga e22168a74c Bug 1719281 - QM: Execute initializations in ExecuteInitialization() for real; r=dom-storage-reviewers,asuth
ExecuteInitialization now takes a function argument instead of nsresult so
initializations are executed in the context of ExecuteInitialization. This
patch also removes a temporary overload of ExecuteInitialization.

Differential Revision: https://phabricator.services.mozilla.com/D119263
2021-07-31 12:37:36 +00:00
Jan Varga f269c78d92 Bug 1719281 - QM: Add a generic wrapper for running initializations; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D119182
2021-07-31 12:37:36 +00:00
Sandor Molnar 01917ee5ce Backed out 2 changesets (bug 1719281) for causing bc failures in FirstInitializationAttempts. CLOSED TREE
Backed out changeset 58b39579def6 (bug 1719281)
Backed out changeset d6801824d47d (bug 1719281)
2021-07-30 21:53:23 +03:00
Jan Varga 107d5083bc Bug 1719281 - QM: Execute initializations in ExecuteInitialization() for real; r=dom-storage-reviewers,asuth
ExecuteInitialization now takes a function argument instead of nsresult so
initializations are executed in the context of ExecuteInitialization. This
patch also removes a temporary overload of ExecuteInitialization.

Differential Revision: https://phabricator.services.mozilla.com/D119263
2021-07-30 17:51:58 +00:00
Jan Varga 3a089efdf2 Bug 1719281 - QM: Add a generic wrapper for running initializations; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D119182
2021-07-30 17:51:58 +00:00
Jan Varga b9293292a5 Bug 1591877 - Share the same cached pref value of dom.storage.next_gen across all relevant processes; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D119711
2021-07-13 11:16:00 +00:00
Jan Varga ed1318cf0a Bug 1591877 - Forbid creation of PBackgroundLSRequest/PBackgroundLSSimpleRequest actors in the parent process if LSNG is not enabled; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D119710
2021-07-13 11:16:00 +00:00
Jan Varga ffa84fb55a Bug 1717990 - LSNG: Convert some NS_ERROR_FAILURE which should have been NS_ERROR_ABORT; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D118677
2021-06-25 06:27:59 +00:00
Jan Varga 5e3c6d6fc1 Bug 1716570 - LSNG: Add QM_TRY context for PrepareDatastoreOp::DatabaseWork; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D118673
2021-06-25 02:46:13 +00:00