Commit Graph

1816 Commits

Author SHA1 Message Date
Jan Varga
83a9cec642 Bug 1866402 - Resolve promises for origin initialization immediately if origins are already initialized; r=dom-storage-reviewers,jari
It's now possible to check if an origin is already initialized on the owning
thread and it's also possible to evaluate existing directory locks if there are
any uninit origin operations pending. So we can add optimizations to origin
initialization methods to resolve promises immediately if origins are already
initialized and there are no pending uninit storage or uninit origin operations.

Differential Revision: https://phabricator.services.mozilla.com/D195548
2024-10-09 22:16:53 +00:00
Jan Varga
b55e694825 Bug 1866402 - Add UninitOrigins directory lock category and use it for directory locks which uninitialize origins; r=dom-storage-reviewers,jari
The new category is needed for implementing an optimization in
QuotaManager::InitializePersistentOrigin,
QuotaManager::InitializeTemporaryOrigin and
QuotaManager::OpenClientDirectory to avoid creating a new origin initialization
operations when a given origin is already initialized.

Differential Revision: https://phabricator.services.mozilla.com/D195543
2024-10-09 22:16:52 +00:00
Jan Varga
7d76266a7c Bug 1866402 - Implement origin initialization status tracking on the owning thread; r=dom-storage-reviewers,jari
Origin initialization tracking on the owning thread is needed for covering
origin initialization in QuotaManager::OpenClientDirectory.

Differential Revision: https://phabricator.services.mozilla.com/D195535
2024-10-09 22:16:52 +00:00
Jan Varga
55899a161a Bug 1866402 - Rename nsCStringHashKeyDM to nsCStringHashKeyWithDisabledMemmove; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D223302
2024-10-09 22:16:51 +00:00
Jan Varga
254757cad2 Bug 1866402 - Move nsCStringHashKeyDM to a dedicated hash keys header file; r=dom-storage-reviewers,jari
This removes some code duplication, but the primary motivation is to use it for
a member variable declaration in QuotaManager.h

Differential Revision: https://phabricator.services.mozilla.com/D195532
2024-10-09 22:16:51 +00:00
Jan Varga
3d5864cea5 Bug 1866402 - Add nsIQuotaManagerService::PersistentOriginInitialized and nsIQuotaManagerService::TemporaryOriginInitialized methods; r=dom-storage-reviewers,jari
This additional testing infrastructure is needed for verifying origin
initialization status.

Differential Revision: https://phabricator.services.mozilla.com/D195526
2024-10-09 22:16:50 +00:00
Jan Varga
14d1cca216 Bug 1866402 - Change all origin operations which uninit origins to return an array of origin metadata; r=dom-storage-reviewers,jari
This is a preparation for unsetting some flags when origins are either cleared
or reset.

Differential Revision: https://phabricator.services.mozilla.com/D195522
2024-10-09 22:16:50 +00:00
Jan Varga
61bffae5df Bug 1866402 - QM: Generalize the helper for mapping MozPromise values to support both exclusive and non-exclusive promises; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D223276
2024-10-09 22:16:49 +00:00
Jan Varga
dca4a3ceec Bug 1866402 - QM: Add a helper for mapping MozPromise values; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D223274
2024-10-09 22:16:49 +00:00
Jan Varga
b43f7b942a Bug 1866402 - Change nsIQuotaManagerService::ResetStoragesForPrincipal to support resetting of entire origins only; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D195510
2024-10-09 11:59:35 +00:00
Jan Varga
4ae556c1fc Bug 1866402 - Replace some nsIQuotaManagerService::ResetStoragesForPrincipal calls with nsIQuotaManagerService::ResetStoragesForClient; r=dom-storage-reviewers,jari
There's now a dedicated nsIQuotaManagerService::ResetStoragesForClient method
for resetting storages by client type. All callers of
nsIQuotaManagerService::ResetStoragesForPrincipal which want to reset storages
for a specific client only can be now converted to call the new method.

Differential Revision: https://phabricator.services.mozilla.com/D195509
2024-10-09 11:59:34 +00:00
Jan Varga
38feaef417 Bug 1866402 - Add a dedicated method for resetting storages of a specific client; r=dom-storage-reviewers,jari
Client storages can be currently reset by using the optional argument of
nsIQuotaManagerService::ResetStoragesForPrincipal. However, supporting
resetting storages for both a principal and a client is not ideal for several
reasons. Resetting of origins will have to unset some flags which is
problematic when a client type is specified and resetting of clients will
eventually need to unset some other flags as well.

Differential Revision: https://phabricator.services.mozilla.com/D195508
2024-10-09 11:59:34 +00:00
Jan Varga
9433dc646a Bug 1866402 - Rework QuotaManagerService::ResetStoragesForPrincipal to use an async message with an async response; r=dom-storage-reviewers,jari
A sub actor is no longer created. Actual result is now returned as
an asynchronous response to an asynchronous message.

Differential Revision: https://phabricator.services.mozilla.com/D195507
2024-10-09 11:59:34 +00:00
Jan Varga
815152ffd4 Bug 1866402 - Change nsIQuotaManagerService::ClearStoragesForPrincipal to support clearing of entire origins only; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D195505
2024-10-09 05:34:37 +00:00
Jan Varga
3d12faf212 Bug 1866402 - Replace some nsIQuotaManagerService::ClearStoragesForPrincipal calls with nsIQuotaManagerService::ClearStoragesForClient; r=dom-storage-reviewers,jari
There's now a dedicated nsIQuotaManagerService::ClearStoragesForClient method
for clearing storages by client type. All callers of
nsIQuotaManagerService::ClearStoragesForPrincipal which want to clear storages
for a specific client only can be now converted to call the new method.

Differential Revision: https://phabricator.services.mozilla.com/D195504
2024-10-09 05:34:36 +00:00
Jan Varga
a24f57d27c Bug 1866402 - Add a dedicated method for clearing storages of a specific client; r=dom-storage-reviewers,jari
Client storages can be currently cleared by using the optional argument of
nsIQuotaManagerService::ClearStoragesForPrincipal. However, supporting clearing
storages for both a principal and a client is not ideal for several reasons.
Clearing of origins will have to unset some flags which is problematic when
a client type is specified and clearing of clients will eventually need to
unset some other flags as well.

Differential Revision: https://phabricator.services.mozilla.com/D195403
2024-10-09 05:34:36 +00:00
Jan Varga
10a3913005 Bug 1866402 - Add testing for clearing by client type; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D195420
2024-10-09 05:34:35 +00:00
Chris H-C
d5675e4d9d Bug 1920562 - Remove C++ Telemetry::SetEventRecordingEnabled r=florian,necko-reviewers,valentin
We leave the network.trr.confirmation_telemetry_enabled pref intact because
removing it causes failures in test_prefs_tracker.js

Differential Revision: https://phabricator.services.mozilla.com/D223832
2024-10-08 20:14:41 +00:00
Sandor Molnar
fc1cd91320 Backed out 5 changesets (bug 1920562) for causing xpc assertion failures. CLOSED TREE
Backed out changeset 8f085ab589a8 (bug 1920562)
Backed out changeset 4405387ae770 (bug 1920562)
Backed out changeset a68fd13a33ae (bug 1920562)
Backed out changeset cd3672fc08ed (bug 1920562)
Backed out changeset 62ab18879eea (bug 1920562)
2024-10-08 00:16:13 +03:00
Jan Varga
c4e7b4d62b Bug 1913561 - Add more tests for QuotaManager::InitializeTemporaryStorage method; r=dom-storage-reviewers,jari
These additional tests are mainly to improve code coverage of
QuotaManager::InitializeTemporaryStorage method.

Differential Revision: https://phabricator.services.mozilla.com/D195400
2024-10-07 18:10:29 +00:00
Jan Varga
d7beeddee4 Bug 1913561 - Update QuotaManager gtests to use Await instead of manual spinning of the event loop; r=dom-storage-reviewers,jari
TestQuotaManager.cpp is getting big and the use of the Await helper reduces the
size of the file significantly and also make the tests more readable.

Differential Revision: https://phabricator.services.mozilla.com/D195399
2024-10-07 18:10:28 +00:00
Jan Varga
d565a57f1b Bug 1913561 - Change QuotaManager::EnsureTemporaryStorageIsInitializedInternal to be a private method; r=dom-storage-reviewers,jari
The goal to call QuotaManager::EnsureTemporaryStorageIsInitializedInternal only
from InitTemporaryStorageOp has been achieved. It's now easy to change the
method to be a private method.

Differential Revision: https://phabricator.services.mozilla.com/D195396
2024-10-07 18:10:28 +00:00
Chris H-C
a0d39c1e98 Bug 1920562 - Remove C++ Telemetry::SetEventRecordingEnabled r=florian,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D223832
2024-10-07 17:29:56 +00:00
Jan Varga
ac3d53c454 Bug 1913561 - Remove QuotaManager::EnsureTemporaryStorageIsInitializedInternal calls from places where a directory lock is obtained via QuotaManager::OpenStorageDirectory; r=dom-storage-reviewers,jari
QuotaManager::OpenStorageDirectory already makes sure that temporary storage
is initialized so all these calls are now redundant.

Differential Revision: https://phabricator.services.mozilla.com/D195395
2024-10-07 10:25:01 +00:00
Jan Varga
9fc642a657 Bug 1913561 - Add support for initializing temporary storage to QuotaManager::OpenStorageDirectory; r=dom-storage-reviewers,jari
QuotaManager::OpenStorageDirectory can now detect the requested persistence
scope and initialize temporary storage if it's needed.

Differential Revision: https://phabricator.services.mozilla.com/D195393
2024-10-06 22:04:46 +00:00
Jan Varga
a0ead95a6f Bug 1913561 - Remove QuotaManager::EnsureTemporaryStorageIsInitializedInternal calls from places where a directory lock is obtained via QuotaManager::OpenClientDirectory; r=dom-storage-reviewers,jari
QuotaManager::OpenClientDirectory already makes sure that temporary storage
is initialized so all these calls are now redundant.

Differential Revision: https://phabricator.services.mozilla.com/D195391
2024-10-06 02:01:00 +00:00
Jan Varga
10ee22dfe2 Bug 1913561 - Add support for initializing temporary storage to QuotaManager::OpenClientDirectory; r=dom-storage-reviewers,jari
QuotaManager::OpenClientDirectory can now detect the requested persistence type
and initialize temporary storage if it's needed.

Differential Revision: https://phabricator.services.mozilla.com/D195390
2024-10-05 09:20:55 +00:00
Jan Varga
abeb2aa5df Bug 1920487 - QM: Rename helpers for resolving nsresult type; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D223131
2024-10-04 16:57:02 +00:00
Jan Varga
862daa5198 Bug 1920456 - QM: Use helpers for dropping directory locks; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D223108
2024-10-04 16:57:02 +00:00
Jan Varga
0477e63a6e Bug 1919555 - QM: Create a new module for process utilities; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D221830
2024-10-03 11:26:35 +00:00
Jan Varga
64442a38cd Bug 1919428 - QM: Add mozilla::dom::quota::SleepIfEnabled helper; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D222579
2024-09-30 17:01:48 +00:00
Jan Varga
b152f46a7f Bug 1919428 - QM: Expose NotifyObserversOnMainThread to quota clients; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D220106
2024-09-30 17:01:48 +00:00
Mike Hommey
a768bfcbee Bug 1916883 - Add missing thread safety annotations. r=jesup
that now make clang trunk trip.

Differential Revision: https://phabricator.services.mozilla.com/D221580
2024-09-26 06:23:06 +00:00
Paul Zuehlcke
5c0f3d23b5 Bug 1915419 - CSSCacheCleaner, JSCacheCleaner support for OriginAttributesPattern. r=emilio,anti-tracking-reviewers,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D220713
2024-09-24 09:17:59 +00:00
Chris H-C
2023bfa52d Bug 1918226 - Use Glean APIs for dom.quota.try.error#step r=janv
Differential Revision: https://phabricator.services.mozilla.com/D221489
2024-09-20 18:42:58 +00:00
Butkovits Atila
e2848bdc49 Backed out 12 changesets (bug 1915419) for causing failures at test_bouncetracking_purge.js. CLOSED TREE
Backed out changeset e5c32a502e0f (bug 1915419)
Backed out changeset 8cbcbb25fc99 (bug 1915419)
Backed out changeset 947379a2f167 (bug 1915419)
Backed out changeset 4cfe3a954ade (bug 1915419)
Backed out changeset 94fba1a2786b (bug 1915419)
Backed out changeset 477b4f7c2760 (bug 1915419)
Backed out changeset ed6c8d9d39d4 (bug 1915419)
Backed out changeset e534c390101c (bug 1915419)
Backed out changeset bc3fe74a8b03 (bug 1915419)
Backed out changeset afefdce605f9 (bug 1915419)
Backed out changeset e58887b90d39 (bug 1915419)
Backed out changeset 114298b7b855 (bug 1915419)
2024-09-18 17:49:45 +03:00
Paul Zuehlcke
b63ab96761 Bug 1915419 - CSSCacheCleaner, JSCacheCleaner support for OriginAttributesPattern. r=emilio,anti-tracking-reviewers,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D220713
2024-09-18 12:50:45 +00:00
Norisz Fay
483f669512 Backed out 12 changesets (bug 1915419) for causing clearDataFromBaseDomain related gv-junit failures CLOSED TREE
Backed out changeset 6baf34e653ef (bug 1915419)
Backed out changeset 3015863afd5d (bug 1915419)
Backed out changeset 90558f317a75 (bug 1915419)
Backed out changeset 5f07cb9268dd (bug 1915419)
Backed out changeset aedba16d4af7 (bug 1915419)
Backed out changeset d9a2d5c2ba53 (bug 1915419)
Backed out changeset 4a250c451004 (bug 1915419)
Backed out changeset c6da2e632da6 (bug 1915419)
Backed out changeset 9256540ed21a (bug 1915419)
Backed out changeset 7621d766d6a4 (bug 1915419)
Backed out changeset 16d6589ba330 (bug 1915419)
Backed out changeset b3eebd764439 (bug 1915419)
2024-09-16 18:29:55 +03:00
Paul Zuehlcke
74960944d0 Bug 1915419 - CSSCacheCleaner, JSCacheCleaner support for OriginAttributesPattern. r=emilio,anti-tracking-reviewers,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D220713
2024-09-16 13:25:32 +00:00
Jan Varga
3a4a79ac42 Bug 1917454 - Add a timer for directory lock acquisition; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D219415
2024-09-16 11:01:23 +00:00
Jan Varga
9afb23532c Bug 1917454 - Adjust documentation for QuotaManager::OpenClientDirectory; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D220419
2024-09-16 11:01:23 +00:00
Jan Varga
bfeabfd3d5 Bug 1917454 - Add DirectoryLock::Invalidated getter; r=dom-storage-reviewers,jari
The property needs to be exposed to quota clients.

Differential Revision: https://phabricator.services.mozilla.com/D219604
2024-09-16 11:01:22 +00:00
Jan Varga
1cd0545845 Bug 1917454 - Add support for pausing QM IO thread after finishing storage initialization; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D219601
2024-09-16 11:01:22 +00:00
Jan Varga
0b03f4a7d6 Bug 1917454 - Add a new testing only notification for client directory opening; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D219516
2024-09-16 11:01:22 +00:00
Jan Varga
0a2832ca5a Bug 1917454 - QM: Create new modules for testing; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D220079
2024-09-16 11:01:20 +00:00
Jan Varga
1f464aab35 Bug 1917453 - Use a common helper for observing notifications in tests; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D219515
2024-09-13 12:24:11 +00:00
Jan Varga
a7b9d641d9 Bug 1917453 - Avoid firing notifications required only by tests when the testing pref is not set; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D219504
2024-09-13 12:24:10 +00:00
Jan Varga
ce0abb1cfa Bug 1917453 - Clean up and modernize NotifyUtils.cpp; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D219503
2024-09-13 12:24:09 +00:00
Jan Varga
cdfcca007f Bug 1917453 - Avoid using component manager for creating nsSupportsPRUint64 objects; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D219502
2024-09-13 12:24:08 +00:00
Jan Varga
24bc84775a Bug 1917453 - Move notification utils to separate files; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D219501
2024-09-13 12:24:07 +00:00