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

64 Коммитов

Автор SHA1 Сообщение Дата
Kagami Sascha Rosylight 6735c3170f Bug 1723050 - Part 23: Replace typedef by using in dom/quota/ r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D121321
2021-08-16 17:05:42 +00:00
Simon Giesecke 1730e59e4a Bug 708901 - Migrate to nsTHashSet in dom/quota. r=dom-storage-reviewers,janv
Depends on D108599

Differential Revision: https://phabricator.services.mozilla.com/D108600
2021-03-23 10:36:35 +00:00
Jan Varga 4323e6df02 Bug 1686031 - Rename GroupAndOrigin to OriginMetadata; r=dom-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D104970
2021-02-12 14:03:28 +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
Simon Giesecke 0960f946b7 Bug 1681670 - Move shutdown timeout handling to QuotaManager. r=dom-workers-and-storage-reviewers,janv
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
2020-12-15 17:15:27 +00:00
Simon Giesecke a7f8c31daa Bug 1679542 - Get rid of *QUOTA_NAMESPACE* macros and stop including QuotaCommon.h everywhere. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D98077
2020-12-15 10:26:08 +00:00
Mihai Alexandru Michis 783558e615 Backed out changeset 547a95c0bb90 (bug 1666214) for causing talos failures.
CLOSED TREE
2020-12-09 22:08:57 +02:00
Simon Giesecke 450b013593 Bug 1666214 - Move shutdown timeout handling to QuotaManager. r=dom-workers-and-storage-reviewers,janv
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
2020-12-09 13:03:36 +00:00
Jan Varga fe7c71a9e0 Bug 1680031 - Abort operations for given directory lock ids; r=dom-workers-and-storage-reviewers,sg
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
2020-12-09 08:13:44 +00:00
Simon Giesecke a95d13467c Bug 1666214 - Perform shutdown of all quota clients in parallel. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D96082
2020-12-07 14:49:36 +00:00
Jan Varga ccea28442b Bug 1680031 - Introduce Client::AbortAllOperations; r=dom-workers-and-storage-reviewers,sg
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
2020-12-02 16:38:07 +00:00
Simon Giesecke 6ae9eb7843 Bug 1672369 - Add ability to record intermediate shutdown steps for timeout analysis. r=dom-workers-and-storage-reviewers,ttung,janv
Differential Revision: https://phabricator.services.mozilla.com/D94333
2020-11-30 10:54:29 +00:00
Simon Giesecke f0fab90073 Bug 1672369 - Change infallible TypeToText to use a return value and remove unused variant. r=dom-workers-and-storage-reviewers,ttung,janv
Differential Revision: https://phabricator.services.mozilla.com/D94319
2020-11-30 10:47:02 +00:00
Simon Giesecke 257530e1da Bug 1672369 - Unify handling shutdown timeout of quota clients. r=dom-workers-and-storage-reviewers,ttung,janv
Differential Revision: https://phabricator.services.mozilla.com/D94318
2020-11-30 10:40:59 +00:00
Simon Giesecke bafe1df218 Bug 1672369 - Pull up common ShutdownWorkThreads into QuotaClient. r=dom-workers-and-storage-reviewers,ttung,janv
Differential Revision: https://phabricator.services.mozilla.com/D94298
2020-11-26 09:20:03 +00:00
Simon Giesecke 2282fb5a6a Bug 1626555 - Make `dom/quota` buildable outside of `unified-build` environment. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D94011
2020-10-21 13:16:19 +00:00
Simon Giesecke f92973bd13 Bug 1663924 - Replace output parameters by return values on GetInfo* methods. r=dom-workers-and-storage-reviewers,ttung
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
2020-10-20 11:46:31 +00:00
Simon Giesecke 55e3bdd7f8 Bug 1641512 - Use Result<UsageInfo, nsresult> as return type of InitOrigin and add separate InitOriginWithoutTracking. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D77453
2020-06-25 09:31:39 +00:00
Simon Giesecke c23800e5f2 Bug 1641512 - Use Result<UsageInfo, nsresult> as return type of GetUsageForOrigin. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D77452
2020-06-25 08:34:43 +00:00
Jan Varga d123d73b2d Bug 1621916 - Remove unused argument in Client::InitOrigin; r=dom-workers-and-storage-reviewers,sg
Depends on D77070

Differential Revision: https://phabricator.services.mozilla.com/D77072
2020-05-27 15:52:49 +00:00
Jan Varga c0757a0c2c Bug 1619592 - Refactor client type checks using new Client::IsValidType method; r=dom-workers-and-storage-reviewers,sg
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
2020-03-17 13:06:30 +00:00
Simon Giesecke 861998c782 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/quota. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D62557

--HG--
extra : moz-landing-system : lando
2020-02-12 10:25:22 +00:00
Jan Varga 3e97ea2f34 Bug 1563023 - Part 7: Implement caching functionality; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D38817

--HG--
extra : moz-landing-system : lando
2019-08-25 01:34:37 +00:00
Jan Varga 76cfa3e3e3 Bug 1563023 - Part 6: Simplify iterations over all client types; r=asuth
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
2019-08-23 04:48:36 +00:00
Jan Varga d97b501006 Bug 1563023 - Part 5: Rationalize Client::TypeToText and Client::TypeFromText methods; r=asuth
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
2019-08-23 04:49:14 +00:00
Jan Varga a650fac7b0 Bug 1563023 - Part 4: Get rid of custom usage tracking in LS by using client usage tracked by QM; r=asuth
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
2019-08-23 04:46:14 +00:00
Jan Varga 9f906cd7c4 Bug 1563023 - Part 1: Implement per client usage tracking; r=asuth
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
2019-08-22 13:06:48 +00:00
Tom Tung a3f0aa60d4 Bug 1514600 - P1 - Notify LS to cleanup the gUsages while storage initialization fails; r=janv
Differential Revision: https://phabricator.services.mozilla.com/D27502

--HG--
extra : moz-landing-system : lando
2019-04-29 10:49:58 +00:00
Sylvestre Ledru a1dce6440a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D28329

--HG--
extra : moz-landing-system : lando
2019-04-22 16:35:03 +00:00
Jan Varga bb200f7d87 Bug 1541771 - LSNG: Don't cache usage in InitOrigin if it's not for temporary storage initialization; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D27490
2019-04-15 13:35:38 +02:00
Luke Wagner b65bcf0771 Bug 1520931 - Remove dom/asmjscache (r=ttung)
Differential Revision: https://phabricator.services.mozilla.com/D24985

--HG--
extra : rebase_source : 359ed648d0f0120a7892c5ecc794c008b99d1e27
2019-03-26 16:57:55 -05:00
Tom Tung 25abf064bb Bug 1423917 - P12 - Return an error if it failed to remove the asmjs directory and move the deprecated client check to InitializeOrigin; r=asuth
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
2019-03-25 15:15:03 +00:00
Tom Tung 88e2f17179 Bug 1423917 - P11 - Make the deprecated client check only enable after upgrading to the newest version; r=asuth
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
2019-03-23 07:56:02 +00:00
Tom Tung 3b352c7bbf Bug 1423917 - P9 - Remove asmjs client in the 2_1to2_2 upgrade for QuotaManager; r=luke
Differential Revision: https://phabricator.services.mozilla.com/D21732

--HG--
extra : moz-landing-system : lando
2019-03-13 15:59:34 +00:00
Jan Varga 863112a0eb Bug 1526891 - Part 11: Initiate asynchronous deletion of unreferenced files in IDB databases directly on the PBackground thread instead of going through the main thread; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20920
2019-02-23 17:25:48 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jan Varga 9c1d177a11 Bug 1286798 - Part 47: Add AboutToClearOrigins() method to the quota client interface; r=asuth 2018-11-29 21:49:46 +01:00
Jan Varga 709a73dabf Bug 1286798 - Part 14: Enhance clearStoragesForPrincipal() to support clearing of storages for specific quota client; r=asuth
See also bug 1402254, original patch by baku.
2018-11-29 21:47:58 +01:00
Jan Varga 9f71846e2a Bug 1286798 - Part 4: Basic integration with QuotaManager; r=asuth
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).
2018-11-29 21:47:24 +01:00
Jan Varga 5733cbbbd3 Bug 1361330 - Part 4: Core implementation; r=asuth 2018-08-20 14:33:03 +02:00
Jan Varga 75397467ef Bug 1470811 - Update FF 62 to know about upcoming new quota client; r=asuth 2018-06-29 09:58:09 +02:00
Chris Peterson 2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
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
2018-06-17 22:43:11 -07:00
Andrew Sutherland 3fcf6eee0f Bug 1404344 - Part 1: Alias QuotaManager schema 3.0 to 2.1. r=janv
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
2017-10-03 10:02:27 -04:00
Tom Tung 65c21f0c77 Bug 1290481 - P6: Upgrade QuotaManager to v3.0 for adding directory padding file to existing DOM Cache directory. r=bkelly, janv
MozReview-Commit-ID: KlVsaGhpABk

--HG--
extra : rebase_source : ebc8bffa58ec4ab2226254fe5c3333d5425fa2fd
2017-07-18 18:54:20 +08:00
Jan Varga ae1ee28451 Bug 1348660 - Part 3: Separate the canceled state out of UsageInfo; r=btseng 2017-03-22 12:13:54 +01:00
Jan Varga b7172cf3d7 Bug 1339081 - Part 21: Rename file manager directories as part of new upgrade helper; r=asuth 2017-03-06 18:40:31 +01:00
Kartikaya Gupta 1af1a82edf Bug 1312319 - Add a NS_INLINE_DECL_PURE_VIRTUAL_REFCOUNTING macro and replace existing pure-virtual AddRef/Release declarations. r=froydnj
MozReview-Commit-ID: 5yt3O4Hoois

--HG--
extra : rebase_source : 5dad12cd8400b8a783e8407de874d4b7c75cb645
2017-01-25 14:51:34 -05:00
Jan Varga a6c44c3242 Bug 1261491 - Intermittent test_quotaExceeded_recovery.js | application crashed [@ mozilla::dom::IndexedDatabaseManager::Notify]; r=khuey 2016-07-18 18:51:54 +02:00
Jan Varga 38ee7f95d8 Bug 961049 - Part 4: QuotaManager on PBackground core changes; r=baku
--HG--
rename : dom/quota/QuotaManager.cpp => dom/quota/ActorsParent.cpp
rename : dom/quota/nsIUsageCallback.idl => dom/quota/nsIQuotaCallbacks.idl
rename : dom/quota/nsIQuotaManager.idl => dom/quota/nsIQuotaManagerService.idl
rename : dom/quota/nsIQuotaRequest.idl => dom/quota/nsIQuotaRequests.idl
2015-11-22 10:43:55 +01:00
Jan Varga baba1643c1 Bug 1130775 - Convert synchronized ops and storage registration into unified directory locks; r=bent
--HG--
rename : dom/quota/OriginOrPatternString.h => dom/quota/OriginScope.h
2015-06-30 14:59:27 +02:00