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
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
Origin initialization tracking on the owning thread is needed for covering
origin initialization in QuotaManager::OpenClientDirectory.
Differential Revision: https://phabricator.services.mozilla.com/D195535
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
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
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
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
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
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
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
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
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
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
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
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