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

451 Коммитов

Автор SHA1 Сообщение Дата
Jan Varga a95b087aa8 Bug 1526891 - Part 9: Send an async IPC message instead of dispatching a runnable to the PBackground thread when aborting operations for process; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20918
2019-02-23 17:17:21 +01:00
Jan Varga 0fc1e10cf2 Bug 1526891 - Part 8: Move pref initialization to InitializeQuotaManager; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20917
2019-02-23 17:16:08 +01:00
Jan Varga 8815209a79 Bug 1526891 - Part 7: Move base dir path initialization to a profile observer; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20916
2019-02-23 17:12:09 +01:00
Jan Varga 39748c637d Bug 1526891 - Part 6: Introduce InitializeQuotaManager and call it in nsLayoutStatics::Initialize; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20915
2019-02-23 17:08:42 +01:00
Jan Varga 6b68f4dc07 Bug 1526891 - Part 5: Allow calling NextGenLocalStorageEnabled on any thread in the parent process; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20914
2019-02-23 17:06:40 +01:00
Jan Varga 105d16dc03 Bug 1526891 - Part 3: Get origin and base domain strings using MozURL for all URIs; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20912
2019-02-23 17:01:22 +01:00
Jan Varga ecbb521e47 Bug 1526891 - Part 1: Change handling of indexeddb:// from simple URI to standard URL; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20905
2019-02-23 04:20:29 +01:00
Jan Varga 383bad7c55 Bug 1517089 - Part 16: Implement QuotaManager::GetInfoFromValidatedPrincipalInfo; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D19213
2019-02-08 21:02:23 +01:00
Jan Varga b359db62fd Bug 1517089 - Part 15: Remove a hack for JetPack and DevTools fron QuotaManager:GetInfoFromPrincipal; r=asuth
The special case is now handled in GetSpecialBaseDomain in ContentPrincipal.cpp

Differential Revision: https://phabricator.services.mozilla.com/D19212
2019-02-08 21:02:19 +01:00
Jan Varga 61bb94bcb8 Bug 1517089 - Part 10: Implement QuotaManager::IsPrincipalInfoValid; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D19204
2019-02-08 21:01:59 +01:00
Jan Varga 5302b36c41 Bug 1517089 - Part 5: Move storage service initialization to InitializeLocalStorage; r=asuth 2019-02-07 19:51:22 +01:00
Ehsan Akhgari faecb1030e Bug 1525054 - Make ContentPermissionRequestBase calculate the isHandlingUserInput flag itself instead of relying on callers who may or may not pass in the correct information; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D18571

--HG--
extra : moz-landing-system : lando
2019-02-04 19:56:48 +00:00
Tom Tung 15907fc6e1 Bug 1519822 - Support IPv6 URL on OriginParser; r=asuth
The supporting format for IPv6 URL based on
https://url.spec.whatwg.org/#host-representation

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

--HG--
extra : moz-landing-system : lando
2019-02-01 13:04:14 +00:00
Tom Tung 834069f95a Bug 1423917 - P2 - Have a test to verify a set of hidden files don't block QuotaManager's initialization and getting usauge; r=asuth
--HG--
extra : rebase_source : 35419082ee854b3e69f383f7fcfb3b6a91b7573f
2018-10-19 15:40:07 +02:00
Tom Tung 2a60c08e55 Bug 1423917 - P1 - Ignore dot files in QM and add .desktop, Desktop.ini, desktop.ini, Thumbs.db into the list of OSMetadata; r=asuth
This patch mainly whitelist all the dot-files in the persistence directories and
origin directories. Ignore dot-files was first proposed in
Bug 944918 comment 39. ".desktop" was also mentioned in that comment Besides,
"desktop.ini" was first mentioned in Bug 944918 comment 42, "Thumbs.db" was
mentioned in 1493262 comment 11, and "Desktop.ini" was first mentioned
Bug 1423917 comment 46.Thus, this patch also whitelist them all during
initialization.

--HG--
extra : rebase_source : 6dc372c7e4bfc6dbe9774b5a9c72b95d20b7bea9
2018-09-20 14:54:42 +02:00
Tom Tung 698bbba539 Bug 1521017 - Using NS_NAMED_LITERNAL_CSTRING to avoid increasing the number of static constructors; r=asuth
This patch uses nsLiteralCString instead of nsCString for avoiding increasing
the number of static constructors. Also, it removes the declaration of
kInternalError and kExternalError on Beta and Release since they won't be use
in these channels.

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

--HG--
extra : moz-landing-system : lando
2019-01-18 22:52:06 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Tom Tung a4b7f90f3f Bug 1436188 - Add telemetry probes to collect the number of failures during the QuotaManager initialization; r=asuth, data-review=chutten
This patch uses categorical keyed Historgram to collect data. While the key is
used to determine whether is it an external error or an internal error (Note:
the external error is referred to low level failure, for example: database
corrupt, OS API errors, ... etc; the internal error is referred to errors, like:
not handle file properly, unexpected filenames, ... etc), the labels for
categorical indicates where the error happens.
Furthermore, this patch make QuotaManager keep traversing the profile even if
an error happens so that we can get more information in the telemetry data.
Please note that these things should only happen in the Nightly Channel.

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

--HG--
extra : moz-landing-system : lando
2019-01-17 17:12:27 +00:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Alex Gaynor 55e3f21b2b Bug 1515437 - mark several IPC methods as final; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D15011

--HG--
extra : moz-landing-system : lando
2018-12-19 21:46:49 +00:00
Mark Banner 8c00ef3f30 Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D13746

--HG--
extra : moz-landing-system : lando
2018-12-11 13:15:08 +00:00
Ciure Andrei ed617be144 Backed out 2 changesets (bug 1512052)for causing build bustages CLOSED TREE
Backed out changeset 4773a3f46c22 (bug 1512052)
Backed out changeset 2f48c5afbe57 (bug 1512052)

--HG--
rename : browser/components/attribution/test/xpcshell/.eslintrc.js => browser/components/attribution/test/.eslintrc.js
2018-12-05 05:47:39 +02:00
Mark Banner 8256078237 Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop
Depends on D13745

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

--HG--
extra : moz-landing-system : lando
2018-12-04 22:27:35 +00: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 d4d5f86d82 Bug 1286798 - Part 49: Add clearStoragesForPattern() method to the quota manager service; r=asuth 2018-11-29 21:49:52 +01:00
Jan Varga 6714997188 Bug 1286798 - Part 48: Add ParseOrigin() method to the quota manager; r=asuth 2018-11-29 21:49:49 +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 0649224345 Bug 1286798 - Part 26: Implement a lazy data migration from old webappsstore.sqlite; r=asuth,janv
This patch was enhanced by asuth to bind attached database path.
Places has shown that argument binding is necessary.  (Profiles may include usernames in their path which can have cool emoji and such.)
2018-11-29 21:48:38 +01:00
Jan Varga 7981be440b Bug 1286798 - Part 25: Add checks for the group and global limit; r=asuth 2018-11-29 21:48:34 +01:00
Jan Varga 480f7ccea1 Bug 1286798 - Part 24: A new exclusive directory lock shouldn't invalidate existing internal directory locks; r=asuth
This fixes an intermittent failure when multiple clearStoragesForPrincipal() are called at the same time.
2018-11-29 21:48:31 +01:00
Jan Varga 6e40a9dccb Bug 1286798 - Part 22: Add support for preloading of datastores; r=asuth
Datastores are preloaded only for content principals. The preloading is triggered as soon as possible to lower the chance of blocking the main thread in content process. If there is no physical database on disk for given origin, datastore is not created. Preloaded datastores are kept alive for 20 seconds.
2018-11-29 21:48:25 +01:00
Jan Varga b968ceb813 Bug 1286798 - Part 18: Verify that data is persisted on disk; r=asuth,mrbkap
New methods open() and close() are added to the Storage WebIDL interface. They are only available when a pref is set and are only intended for testing. There's also a new method resetStoragesForPrincipal() which is used as a callback for close() since datastores don't release directory locks immediately. resetStoragesForPrincipal() requests an exclusive lock for given origin, so it must wait for any exising shared locks to be released.
2018-11-29 21:48:11 +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 a47c296511 Bug 1286798 - Part 7: Teach QuotaManager's OriginParser to handle file://UNIVERSAL_FILE_URI_ORIGIN; r=asuth
See bug 1340710 which introduced this kind of URI.
2018-11-29 21:47:34 +01:00
Jan Varga c934ad618d Bug 1286798 - Part 6: Fix a dead lock in the single process case; r=asuth,janv
Expose the nested main event target, so it can be used in the single process case by the parent side to process runnables which need to run on the main thread.
After this change we don't have use hacks like getting profile directory path on the child side and sending it to the parent. The parent side can now do it freely even in the single process case.

This patch was enhanced by asuth to not tunnel the nested main event target through IPC.
2018-11-29 21:47:30 +01:00
Jan Varga c5676a58c7 Bug 1286798 - Part 5: More integration with QuotaManager; r=asuth
Preparation of datastores now creates real database files on disk. The LocalStorage directory is protected by a directory lock.
Infrastructure for database schema upgrades is in place too.
Database actors are now explicitely tracked by the datastore. When the last actor finishes the directory lock is released.
Added also implementation for QuotaClient::GetUsageForOrigin() and QuotaClient::AbortOperations().
2018-11-29 21:47:27 +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
Boris Zbarsky 64ae41821b Bug 1507540 part 6. Make nsIVariant's "type" a notxpcom attribute. r=froydnj 2018-11-19 20:20:05 -05:00
Ehsan Akhgari d8c3c5a17d Bug 1506014 - Refactor some of the common code in the implementations of nsIContentPermissionRequest into a common base class r=baku
Differential Revision: https://phabricator.services.mozilla.com/D11488

--HG--
extra : moz-landing-system : lando
2018-11-14 05:33:25 +00:00
prathiksha 7a42d37605 Bug 1459603 - Remove the checkbox from the persistent storage notification. r=johannh
Remove the checkbox from the persistent storage notification.

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

--HG--
extra : moz-landing-system : lando
2018-11-02 08:15:05 +00:00
Julian Descottes 079a123093 Bug 1467712 - Simplify calls to ok to use only 2 arguments;r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D10416

--HG--
extra : moz-landing-system : lando
2018-11-01 13:48:48 +00:00
Csoregi Natalia faba2c8c15 Backed out 4 changesets (bug 1467712) for multiple failures with: Too many arguments passed to ok. CLOSED TREE
Backed out changeset 9ce0ac2b9d71 (bug 1467712)
Backed out changeset 026eb1f6dc6e (bug 1467712)
Backed out changeset 0088a09d869a (bug 1467712)
Backed out changeset 1b19ea76aad6 (bug 1467712)
2018-11-01 15:22:52 +02:00
Julian Descottes b50a5ba4dc Bug 1467712 - Simplify calls to ok to use only 2 arguments;r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D10416

--HG--
extra : moz-landing-system : lando
2018-11-01 11:09:48 +00:00
Ehsan Akhgari 54b2e44577 Bug 1502747 - Remove nsIContentPermissionType.access and all of its supporting code r=snorp,baku
This field was originally added for the b2g-only DeviceStorage API,
and isn't used for anything else right now.

This reverts the remaining parts of bug 1043136 and bug 1043136
as well as some support code for mobile.

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

--HG--
extra : moz-landing-system : lando
2018-10-30 07:48:55 +00:00
Tom Tung b75ea7ded2 Bug 1395102 - P4 - Reuse the code for MaybeUpgradeClients() in the upgrade helpers; r=janv
This patch moves MaybeUpgradeClients to RepositoryOperationBase class from
UpgradeStorageFrom1_0To2_0Helper and  UpgradeStorageFrom2_0To2_1Helper so that
lines of code can be reused.

--HG--
extra : rebase_source : 1131ed8b01ed91b7bc5b362a7b1aaf15aa681a95
2018-10-19 11:36:08 +02:00
Tom Tung 7e3170879c Bug 1395102 - P3 - Reuse the code for QuotaManager::UpgradeStorageFromxxToxx(); r=janv
This patch adds a new function QM::UpgradeStorage() to reuse lines of code in
QM:UpgradeStorageFrom0_0To1_0(), QM:UpgradeStorageFrom1_0To2_0(), and
QM:UpgradeStorageFrom2_0To2_1().

--HG--
extra : rebase_source : 7b1cba884d375e0609f5c622a798c9c0f8129b90
2018-10-17 15:37:16 +02:00
Tom Tung 29e37afc3d Bug 1395102 - P2 - Rename the intermediate class in P1 to RepositoryOperationBase; r=janv
To do this, it also rename the StorageDirectoryHelper to StorageOperationBase to
align with classes naming. Bsides, this patch renames
RepositoryOperationBase::DoUpgrade() to
RepositoryOperationBase::ProcessRepository().

--HG--
extra : rebase_source : a7f57a6b670e18b88cf3484bfdfd86f98b23e43a
2018-10-17 14:29:55 +02:00
Tom Tung c2b832e21d Bug 1395102 - P1 - Introduce a intermediate helper class to reuse code for upgrading origin directories; r=janv
This patch mainly create a new helper class and it inherits from
StorageDirectoraryHelper to reuse the code in
CreateOrUpgradeDirectoryMetadataHelper::CreateOrUpgradeMetadataFiles(),
UpgradeStorageFrom0_0To1_0Helper::DoUpgrade(),
UpgradeStorageFrom1_0To2_0Helper::DoUpgrade(),
UpgradeStorageFrom2_0To2_1Helper::DoUpgrade().

--HG--
extra : rebase_source : cace0f54689cb13d42fb797833a13c861750be18
2018-10-18 11:12:28 +02:00
Tom Tung 4baf9ffe10 Bug 1481716 - Add a telemetry probe to track how long does the QM take for initializing repositories; r=janv, data-review=francois
This patch adds a telemetry probe to track the time for initializing both
the default and the temporary repositories.

--HG--
extra : rebase_source : f879a3bc53c41f209a2a09b322db43d27f9af4f8
2018-08-13 10:34:10 +02:00
Tom Tung c31875b7c3 Bug 1389380 - Add a test for storage pressure event; r=janv
A storage pressure event should be fired when the current usage is greater than
the global limit. Currently, the QuotaManger checks the usage and the limit in
two different cases, and this test verfiies both cases do fire a storage
pressure event with a correct value of usage. The first one is that a quota
client is asking for writting a new storage into the disk, but it will
make the currnet usage become greater than the global limit. The other one is
that the calculating limit is less than the current usage while initilaizing the
temporary storage.

--HG--
extra : rebase_source : 0ce65ee177175462ac8928f70972699c428a1135
2018-10-04 10:32:41 +02:00