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

441 Коммитов

Автор SHA1 Сообщение Дата
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
Tom Tung 7aaeb17302 Bug 1389378 - A test for verifying persisted origins bounded by the global limit; r=janv
Bug 1372116 reported that PersistOp() didn't create an originInfo object for the
persisting origin if the temporary storage had been initialized. The test
verifies that no matter the temporary storage was initialized or not the
PersistOp should hanlde the originInfo object properly so that the persisting
origin will be bounded by the global limit.

--HG--
extra : rebase_source : b2bd9553094f03a89cc8e9e733fe6909ade1f430
2018-09-17 11:21:41 +02:00
Tom Tung 8e0aa26fa8 Bug 1495687 - Introduce initTemporaryStorage to nsIQuotaManagerService for testing; r=janv
--HG--
extra : rebase_source : c38521eaf9f9c204971049b959efc5113ae86baa
2018-10-02 16:08:43 +02:00
Tom Tung f84d16cecf Bug 1389390 - Add a test to verify a persisted origin won't be evicted; r=janv
Bug 1298392 introduced persist() to QuotaManager. This patch intends to verify
that normally the oldest origin will be evicted if the global limit is reached,
but if the oldest origin is persisted, then it won't be evicted.

--HG--
extra : rebase_source : 72fc4cda25545df28cb15bffd9255ba51fe628ab
2018-09-25 17:14:53 +02:00
Jan Varga c30332cd26 Bug 1493908 - Part 2: Add a test to verify that persisted origins are not constrained by the group limit; r=asuth 2018-09-27 23:25:43 +02:00
Jan Varga 8fd43abb04 Bug 1493908 - Part 1: Add support for using async functions in tests; r=asuth 2018-09-27 23:25:16 +02:00
Kris Maglione 1c20e8cbbb Bug 1486147: Part 2 - Update JS string enumerator callers to use JS iteration. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D4270

--HG--
extra : rebase_source : 2adadcc8e51a7bce1da02f4bee1333b77bfa9944
extra : histedit_source : 9df920fd186f8c96a5d8b9cbff53ea9529f26ee0
2018-08-24 16:22:40 -07:00
Jonathan Kingston 71dcfa26fc Bug 1485305 - dom/ Ensure loadURI always passes a triggeringPrincipal() r=Nika
Differential Revision: https://phabricator.services.mozilla.com/D4557

--HG--
extra : source : 310e601c80a7d6c76b1ee986a7bfb98786150870
extra : intermediate-source : 43b6b33227f000090d6fb8fc20979a54c814918b
2018-08-29 15:47:29 +01:00
Brindusan Cristian 1db0587c0e Backed out 10 changesets (bug 1485305) for browser-chrome failures on docshell/test/browser/browser_loadURI.js. CLOSED TREE
Backed out changeset 50439ec01661 (bug 1485305)
Backed out changeset a05e40ef7215 (bug 1485305)
Backed out changeset c99b97b4348b (bug 1485305)
Backed out changeset 75220b2f6669 (bug 1485305)
Backed out changeset e698f2fc1c1a (bug 1485305)
Backed out changeset acce14683c13 (bug 1485305)
Backed out changeset 323773a395cc (bug 1485305)
Backed out changeset 1b74152cabc1 (bug 1485305)
Backed out changeset 4b5c9d5929fc (bug 1485305)
Backed out changeset 238d92348159 (bug 1485305)
2018-09-19 18:47:27 +03:00
Jonathan Kingston b4e3ef054c Bug 1485305 - dom/ Ensure loadURI always passes a triggeringPrincipal() r=Nika
Differential Revision: https://phabricator.services.mozilla.com/D4557

--HG--
extra : source : 546a2e9c719c4162e26ea216148ac0a3ca2ef9ac
2018-08-29 15:47:29 +01:00
arthur.iakab d2e647e133 Backed out 10 changesets (bug 1485305)for failing browser chrome tests on browser_loadDisallowInherit.js
Backed out changeset 138b8596a9cd (bug 1485305)
Backed out changeset d9f04aeeeef7 (bug 1485305)
Backed out changeset cd063d8afe4e (bug 1485305)
Backed out changeset 2f8a5a03ccb5 (bug 1485305)
Backed out changeset 8085d1eefd7c (bug 1485305)
Backed out changeset 3aaccb374a59 (bug 1485305)
Backed out changeset 3a111e9e5c9c (bug 1485305)
Backed out changeset 61aa1cfb0b01 (bug 1485305)
Backed out changeset bca973d90acc (bug 1485305)
Backed out changeset 4eb33bf25d6f (bug 1485305)
2018-09-18 20:30:07 +03:00