Instead of having a separate timer for each quota client, we can use a single
timer in the QuotaManager for handling timeouts of all quota clients. The
original shutdown timeout of the quota manager itself can now be removed,
as AbortOperations is already called through InitiateShutdownWorkThreads on
each quota client.
This also moves MaybeRecordShutdownStep to the QuotaManager, which allows
easier access through the singleton instance returned by QuotaManager::GetRef.
Differential Revision: https://phabricator.services.mozilla.com/D98073
Instead of having a separate timer for each quota client, we can use a single
timer in the QuotaManager for handling timeouts of all quota clients. The
original shutdown timeout of the quota manager itself can now be removed,
as AbortOperations is already called through InitiateShutdownWorkThreads on
each quota client.
This also moves MaybeRecordShutdownStep to the QuotaManager, which allows
easier access through the singleton instance returned by QuotaManager::GetRef.
Differential Revision: https://phabricator.services.mozilla.com/D98073
This patch changes the way how we abort operations when clearing of data is
requested. Instead of aborting all operations for given origin, we now abort
all operations for given directory locks which are blocking clearing of data.
Differential Revision: https://phabricator.services.mozilla.com/D98609
Client::AbortOperations no longer supports the case when an empty origin string
is passed (which was used to abort all operations).
Differential Revision: https://phabricator.services.mozilla.com/D98344
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
This patch moves client type checks to the parameter validation phase. The checks are now done using new Client::IsValidType method.
Differential Revision: https://phabricator.services.mozilla.com/D66948
--HG--
extra : moz-landing-system : lando
This patch converts index based client type loops to iterator based client type
loops. This way the static cast is avoided and the loops are simpler and more
readable.
Differential Revision: https://phabricator.services.mozilla.com/D38629
--HG--
extra : moz-landing-system : lando
This patch makes it easier to create new Client::TypeTo and Client::TypeFrom
variations by creating generic reusable helpers.
Differential Revision: https://phabricator.services.mozilla.com/D38628
--HG--
extra : moz-landing-system : lando
This patch gets rid of gUsages in LSNG. This provides better consistency and
makes it easier to cache quota info on disk.
The patch also fixes some edge cases when usage was not adjusted correctly after
a failed file or database operation.
Differential Revision: https://phabricator.services.mozilla.com/D38229
--HG--
extra : moz-landing-system : lando
This patch adds a fixed-size array of client usages to OriginInfo and modifies
quota tracking APIs to require the client type to be passed in.
A new method ResetUsageForClient is implemented. The method is used during
client-specific origin clearing. ResetUsageForClient is much faster than calling
GetUsageForOrigin and calling DecreaseUsageForOrigin after that.
LockedUsage now has an assertion that verifies that the total sum of client
usages matches total origin usage. This method should be called instead of
touching mUsage directly.
A new assertion is added to GetQuotaObject which verifies that passed file
belongs to the given persistence type, origin, and client.
Differential Revision: https://phabricator.services.mozilla.com/D38028
--HG--
extra : moz-landing-system : lando
The reasons of this patch:
- P9 didn't handle the deletion of deprecated client well. It shouldn't continue
if the client is failed to be removed. This patch correct this behavior.
- Meanwhile, it's not really good to just crash while finding a deprecated
client. At least, the client should be removed while finding it before
crashing the Firefox.
- Besides, if we eventaully only check the deprecated client during the
initialization. It makes the code simpler to make the deprecated check to
InitializeOrigin.
Therefore, this patch is a little bit against the P11, but I think it's a right
thing to do here.
Differential Revision: https://phabricator.services.mozilla.com/D24678
--HG--
extra : moz-landing-system : lando
The previous patches didn't take care of the case there might have an asmjs
folder in the older version. To fix that, this patch makes Client allow to have
asmjs folders in the older version by requesting the callee of TypeFromText()
for passing the current storage version. If the version is lower than the
deprecate version, then the assertion won't be enabled.
The test verfies the fix by adding the older profile an asmjs folder.
Differential Revision: https://phabricator.services.mozilla.com/D24542
--HG--
extra : moz-landing-system : lando
This adds a new quota client implementation, but only implements ShutdownWorkThreads.
At shutdown we wait for all running operations to finish including database actors which are closed by using an extra IPC message which avoids races between the parent and child.
Databases are dropped on the child side as soon as they are not used (e.g. after unlinking by the cycle collector).
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.
MozReview-Commit-ID: 5UQVHElSpCr
--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
To improve the Firefox 57 to 56 downgrade scenario, have 57 and 58
re-number the version 3.0 schema introduced by bug 1290481 to
version 2.1. Firefox 56's Quota Manager will recognize the minor
schema version and accept the schema from the future.
--HG--
extra : rebase_source : c2458e380966e4f1ec60a6df5f01135231f308fe
extra : source : e895c35e9b4e9dbc6849d40d644af97c028fffcf