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

1037 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke b2d872c3b8 Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in dom/quota. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D104193
2021-02-09 18:19:36 +00:00
Simon Giesecke b87d2b0662 Bug 1682536 - Use references/NotNull for QuotaObject. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D99780
2021-02-09 18:19:36 +00:00
Jan Varga eee089ae3d Bug 1690025 - Split public DirectoryLock class into a hierarchy of public classes; r=dom-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D104360
2021-02-09 15:01:54 +00:00
Jan Varga 5e9556369c Bug 1690025 - Move DirectoryLockImpl class to separate files; r=dom-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D104163
2021-02-09 10:42:23 +00:00
Jan Varga 9e117b1b8d Bug 1690025 - Move DirectoryLock class to a separate file; r=dom-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D104154
2021-02-09 10:42:22 +00:00
Jan Varga affc82c199 Bug 1690025 - Create directory locks using factories defined on DirectoryLockImpl class; r=dom-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D104147
2021-02-09 08:30:30 +00:00
Butkovits Atila 7ab6339085 Backed out 3 changesets (bug 1690025) for causing failure on Client.h. CLOSED TREE
Backed out changeset 5d5e90d31294 (bug 1690025)
Backed out changeset d2b39aebfad2 (bug 1690025)
Backed out changeset 2684aad61a6b (bug 1690025)
2021-02-09 10:12:28 +02:00
Jan Varga 8eeb10cf67 Bug 1690025 - Move DirectoryLockImpl class to separate files; r=dom-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D104163
2021-02-09 06:52:57 +00:00
Jan Varga dcca4eaf0c Bug 1690025 - Move DirectoryLock class to a separate file; r=dom-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D104154
2021-02-09 06:52:57 +00:00
Jan Varga 9dfb414b4a Bug 1690025 - Create directory locks using factories defined on DirectoryLockImpl class; r=dom-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D104147
2021-02-09 06:52:56 +00:00
Jan Varga c1cb6823e7 Bug 1690493 - Reintroduce synchronous QuotaManager::GetOrCreate; r=dom-workers-and-storage-reviewers,sg
Besides reintroducing synchronous GetOrCreate, both GetOrCreate methods now
allow subsequent attempts to create QuotaManager if previous attemts failed
(only the first attempt was allowed before).

Differential Revision: https://phabricator.services.mozilla.com/D103881
2021-02-09 05:30:57 +00:00
Jan Varga 6e427cfc3c Bug 1690275 - LSNG: Remove LSObject::GetSyncLoopEventTarget; r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D103791
2021-02-08 18:06:12 +00:00
Simon Giesecke 72131ebb20 Bug 1687321 - Use GetDirEntryKind instead of IsDirectory when iterating over directory entries in dom/quota. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D103766
2021-02-08 15:21:44 +00:00
Jan Varga 6a6a366031 Bug 1686031 - Remove QuotaManager::GetDirectoryMetadata2 and QuotaManager::GetDirectoryMetadata2WithRestore; r=dom-workers-and-storage-reviewers,sg
Callers of these functions have been changed to call
GetDirectoryMetadataWithQuotaInfo2 and
GetDirectoryMetadataWithQuotaInfo2WithRestore instead which fully load the
metadata file.

Differential Revision: https://phabricator.services.mozilla.com/D101364
2021-02-05 15:28:25 +00:00
Simon Giesecke 68963cb062 Bug 1685677 - Extract functions from EnsureStorageIsInitialized. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D101183
2021-02-05 16:17:47 +00:00
Simon Giesecke 25b4bffa70 Bug 1689349 - Report QM_TRY failures to telemetry only on the first initialization attempt. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D103893
2021-02-04 13:27:36 +00:00
Simon Giesecke 5993084bb3 Bug 1690560 - Explicitly close lsArchiveTmpConnection and propagate any errors. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D103904
2021-02-04 13:35:07 +00:00
Simon Giesecke 989362a57a Bug 1690234 - Treat ERROR_FILE_CORRUPT errors like non-existent files in GetDirEntryKind. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D103762
2021-02-04 12:14:45 +00:00
Simon Giesecke c1c05c7017 Bug 1690291 - Handle NS_ERROR_STORAGE_IOERR when opening a database like NS_ERROR_FILE_CORRUPTED. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D103898
2021-02-04 11:43:22 +00:00
Simon Giesecke 495067f772 Bug 1685677 - Refactor QuotaManager::CollectOriginsForEviction. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D101182
2021-02-04 09:24:27 +00:00
Jan Varga 9dead77e35 Bug 1690025 - Make all directory lock creating methods use a common internal method; r=dom-workers-and-storage-reviewers,sg
This is especially about changing CreateDirectoryLockForEviction to not create
a lock directly using MakeRefPtr.

Differential Revision: https://phabricator.services.mozilla.com/D103790
2021-02-03 11:14:42 +00:00
Simon Giesecke 1ba38f7421 Bug 1689967 - Simplify CleanupTemporaryStorage and the functions it calls. r=dom-workers-and-storage-reviewers,janv
Instead of collection both origins exceeding their group limit and the global
limit before clearing any origin, do that separately. This removes the need
to adjust the global usage while determining which origins to evict simulating
the effects of evicting the origins exceeding their group limit.

This requires moving the lock into the GetOrigin* functions (thus removing
"Locked" from their names). Also, the arguments to GetOriginInfosExceedingGlobalLimit
are removed.

As an effect, the predicate passed into MaybeInsertOriginInfos is the same in
both uses, and just checks the IsPersisted property, so the predicate argument
is removed and the function is renamed to MaybeInsertNonPersistedOriginInfos.

Differential Revision: https://phabricator.services.mozilla.com/D103629
2021-02-02 17:47:11 +00:00
Simon Giesecke b4a539c9d7 Bug 1685677 - Reduce scope of variables only used within an if statement. r=jstutte
Differential Revision: https://phabricator.services.mozilla.com/D101181
2021-02-02 17:47:03 +00:00
Simon Giesecke af53bb423a Bug 1685677 - Don't unnecessarily materialize a flattened array of OriginInfo*. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D101151
2021-02-02 17:46:55 +00:00
Simon Giesecke 7cba0698f2 Bug 1685677 - Harmonize LockedGetOriginInfosExceedingGroupLimit and LockedGetOriginInfosExceedingGlobalLimit. r=dom-workers-and-storage-reviewers,janv
Instead of inserting all elements into OriginInfo array, and then removing
or skipping irrelevant entries, only insert the relevant ones in the first
place, using a new utility function template MaybeAppendOriginInfos.

Sort them by in least-recently used order according to the access timestamp.

Iterate over them to identify the threshold.

Finally, truncate the array to the threshold position.

Differential Revision: https://phabricator.services.mozilla.com/D101146
2021-02-02 17:46:47 +00:00
Simon Giesecke 9c23bfdb2e Bug 1685677 - Extract functions from CheckTemporaryStorageLimits and rename it to CleanupTemporaryStorage. r=dom-workers-and-storage-reviewers,janv
Extracts parts of CheckTemporaryStorageLimits into the following new private
member functions of QuotaManager:
* LockedGetOriginInfosExceedingGroupLimit
* LockedGetOriginInfosExceedingGlobalLimit
* GetOriginInfosExceedingLimits
* ClearOrigins

Differential Revision: https://phabricator.services.mozilla.com/D101145
2021-02-02 17:46:40 +00:00
Csoregi Natalia 74e4cf16bf Backed out 5 changesets (bug 1689967, bug 1685677) for bustage on TestFlatten.cpp. CLOSED TREE
Backed out changeset 129b45a961fb (bug 1689967)
Backed out changeset d354b3d5312c (bug 1685677)
Backed out changeset 3c1b1f51f19c (bug 1685677)
Backed out changeset cc4f20677a7e (bug 1685677)
Backed out changeset bcbba85964cb (bug 1685677)
2021-02-02 17:05:23 +02:00
Simon Giesecke bc0b8b002e Bug 1689967 - Simplify CleanupTemporaryStorage and the functions it calls. r=dom-workers-and-storage-reviewers,janv
Instead of collection both origins exceeding their group limit and the global
limit before clearing any origin, do that separately. This removes the need
to adjust the global usage while determining which origins to evict simulating
the effects of evicting the origins exceeding their group limit.

This requires moving the lock into the GetOrigin* functions (thus removing
"Locked" from their names). Also, the arguments to GetOriginInfosExceedingGlobalLimit
are removed.

As an effect, the predicate passed into MaybeInsertOriginInfos is the same in
both uses, and just checks the IsPersisted property, so the predicate argument
is removed and the function is renamed to MaybeInsertNonPersistedOriginInfos.

Differential Revision: https://phabricator.services.mozilla.com/D103629
2021-02-02 10:10:47 +00:00
Simon Giesecke 8f1ab470a9 Bug 1685677 - Reduce scope of variables only used within an if statement. r=jstutte
Differential Revision: https://phabricator.services.mozilla.com/D101181
2021-02-02 12:53:37 +00:00
Simon Giesecke d3bbd42d7f Bug 1685677 - Don't unnecessarily materialize a flattened array of OriginInfo*. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D101151
2021-02-02 14:21:42 +00:00
Simon Giesecke 10e39863df Bug 1685677 - Harmonize LockedGetOriginInfosExceedingGroupLimit and LockedGetOriginInfosExceedingGlobalLimit. r=dom-workers-and-storage-reviewers,janv
Instead of inserting all elements into OriginInfo array, and then removing
or skipping irrelevant entries, only insert the relevant ones in the first
place, using a new utility function template MaybeAppendOriginInfos.

Sort them by in least-recently used order according to the access timestamp.

Iterate over them to identify the threshold.

Finally, truncate the array to the threshold position.

Differential Revision: https://phabricator.services.mozilla.com/D101146
2021-02-02 12:53:39 +00:00
Simon Giesecke e4a5513e58 Bug 1685677 - Extract functions from CheckTemporaryStorageLimits and rename it to CleanupTemporaryStorage. r=dom-workers-and-storage-reviewers,janv
Extracts parts of CheckTemporaryStorageLimits into the following new private
member functions of QuotaManager:
* LockedGetOriginInfosExceedingGroupLimit
* LockedGetOriginInfosExceedingGlobalLimit
* GetOriginInfosExceedingLimits
* ClearOrigins

Differential Revision: https://phabricator.services.mozilla.com/D101145
2021-02-02 12:53:44 +00:00
smolnar d18d54a300 Backed out 4 changesets (bug 1685677) for causing build bustage in TestFlatten. CLOSED TREE DONTBUILD
Backed out changeset 0110eb26213b (bug 1685677)
Backed out changeset e3223c398959 (bug 1685677)
Backed out changeset d1fbaf6882a3 (bug 1685677)
Backed out changeset e1e26422161e (bug 1685677)
2021-02-02 14:46:30 +02:00
Simon Giesecke fe6a33b7ec Bug 1685677 - Reduce scope of variables only used within an if statement. r=jstutte
Differential Revision: https://phabricator.services.mozilla.com/D101181
2021-02-02 10:10:45 +00:00
Simon Giesecke 1f967af681 Bug 1685677 - Don't unnecessarily materialize a flattened array of OriginInfo*. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D101151
2021-02-02 11:33:52 +00:00
Simon Giesecke bfdca4825f Bug 1685677 - Harmonize LockedGetOriginInfosExceedingGroupLimit and LockedGetOriginInfosExceedingGlobalLimit. r=dom-workers-and-storage-reviewers,janv
Instead of inserting all elements into OriginInfo array, and then removing
or skipping irrelevant entries, only insert the relevant ones in the first
place, using a new utility function template MaybeAppendOriginInfos.

Sort them by in least-recently used order according to the access timestamp.

Iterate over them to identify the threshold.

Finally, truncate the array to the threshold position.

Differential Revision: https://phabricator.services.mozilla.com/D101146
2021-02-02 10:10:29 +00:00
Simon Giesecke 0da4951ba0 Bug 1685677 - Extract functions from CheckTemporaryStorageLimits and rename it to CleanupTemporaryStorage. r=dom-workers-and-storage-reviewers,janv
Extracts parts of CheckTemporaryStorageLimits into the following new private
member functions of QuotaManager:
* LockedGetOriginInfosExceedingGroupLimit
* LockedGetOriginInfosExceedingGlobalLimit
* GetOriginInfosExceedingLimits
* ClearOrigins

Differential Revision: https://phabricator.services.mozilla.com/D101145
2021-02-02 10:10:21 +00:00
Jan Varga 6d623c28f8 Bug 1690025 - Replace already_AddRefed<DirectoryLock> with RefPtr<DirectoryLock>; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D103677
2021-02-02 07:52:57 +00:00
Jan Varga a8d359bfc5 Bug 1689293 - Introduce DirectoryLock::Acquire; r=sg
Quota clients instead of doing:
RefPtr<DirectoryLock> pendingDirectoryLock = qm->OpenDirectory(..., listener);

now do:
RefPtr<DirectoryLock> directoryLock = qm->CreateDirectoryLock(...);
directoryLock->Acquire(listener);

Differential Revision: https://phabricator.services.mozilla.com/D103279
2021-02-02 08:20:18 +00:00
Butkovits Atila cc5cb272ff Backed out 2 changesets (bug 1685677) for causing xpcshell failure. CLOSED TREE
Backed out changeset 26e9adf102c8 (bug 1685677)
Backed out changeset ed3a62552625 (bug 1685677)
2021-02-01 22:54:39 +02:00
Simon Giesecke 3086414ac3 Bug 1685677 - Harmonize LockedGetOriginInfosExceedingGroupLimit and LockedGetOriginInfosExceedingGlobalLimit. r=dom-workers-and-storage-reviewers,janv
Instead of inserting all elements into OriginInfo array, and then removing
or skipping irrelevant entries, only insert the relevant ones in the first
place, using a new utility function template MaybeAppendOriginInfos.

Sort them by in least-recently used order according to the access timestamp.

Iterate over them to identify the threshold.

Finally, truncate the array to the threshold position.

Differential Revision: https://phabricator.services.mozilla.com/D101146
2021-02-01 14:42:12 +00:00
Simon Giesecke f78d2e7d7e Bug 1685677 - Extract functions from CheckTemporaryStorageLimits and rename it to CleanupTemporaryStorage. r=dom-workers-and-storage-reviewers,janv
Extracts parts of CheckTemporaryStorageLimits into the following new private
member functions of QuotaManager:
* LockedGetOriginInfosExceedingGroupLimit
* LockedGetOriginInfosExceedingGlobalLimit
* GetOriginInfosExceedingLimits
* ClearOrigins

Differential Revision: https://phabricator.services.mozilla.com/D101145
2021-02-01 14:42:15 +00:00
smolnar 0fc1e1e521 Backed out 4 changesets (bug 1685677) for causing xpcshell failures in test_storagePressure. CLOSED TREE
Backed out changeset 263d593f8609 (bug 1685677)
Backed out changeset 81a737afce4f (bug 1685677)
Backed out changeset ea958694bd17 (bug 1685677)
Backed out changeset 121e93b3787f (bug 1685677)
2021-02-01 16:38:01 +02:00
Simon Giesecke b46dca3235 Bug 1685677 - Reduce scope of variables only used within an if statement. r=jstutte
Differential Revision: https://phabricator.services.mozilla.com/D101181
2021-02-01 13:37:53 +00:00
Simon Giesecke b9443d148e Bug 1685677 - Don't unnecessarily materialize a flattened array of OriginInfo*. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D101151
2021-02-01 13:37:45 +00:00
Simon Giesecke 991f534d51 Bug 1685677 - Harmonize LockedGetOriginInfosExceedingGroupLimit and LockedGetOriginInfosExceedingGlobalLimit. r=dom-workers-and-storage-reviewers,janv
Instead of inserting all elements into OriginInfo array, and then removing
or skipping irrelevant entries, only insert the relevant ones in the first
place, using a new utility function template MaybeAppendOriginInfos.

Sort them by in least-recently used order according to the access timestamp.

Iterate over them to identify the threshold.

Finally, truncate the array to the threshold position.

Differential Revision: https://phabricator.services.mozilla.com/D101146
2021-02-01 13:37:38 +00:00
Simon Giesecke 1134a78170 Bug 1685677 - Extract functions from CheckTemporaryStorageLimits and rename it to CleanupTemporaryStorage. r=dom-workers-and-storage-reviewers,janv
Extracts parts of CheckTemporaryStorageLimits into the following new private
member functions of QuotaManager:
* LockedGetOriginInfosExceedingGroupLimit
* LockedGetOriginInfosExceedingGlobalLimit
* GetOriginInfosExceedingLimits
* ClearOrigins

Differential Revision: https://phabricator.services.mozilla.com/D101145
2021-02-01 13:37:30 +00:00
Simon Giesecke 79f07deece Bug 1682536 - Use references/NotNull for DirectoryLockImpl. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D99779
2021-02-01 10:46:29 +00:00
Jan Varga d260ee0316 Bug 1686420 - Wrap the expression in QM_TRY_RETURN in a ToResult call; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D101583
2021-01-13 11:12:22 +00:00
Simon Giesecke 09a0eebdd9 Bug 1686749 - Let CreateFile*Stream functions propagate all errors. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D101779
2021-01-28 11:12:19 +00:00