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 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
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
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.)
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.
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.
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 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
This patch, basically, turns the check. To avoid checking the same direcotries
multiple time, it creates a member hashtable |mValidOrigins| in QuotaManager and
use it in EnsureOriginDirectory(). Since it needs to use the member hashtable,
this patch also moves EnsureOriginDirectory() to become a QuotaManager member
function.
--HG--
extra : rebase_source : 170f749b07ca955e1dc41a627d339709381ffcad
To do this, reuse the code for initializing temporay storage in
EnsureOriginIsInitializedInternal(). Thus, create a helper function called
EnsureTemporaryStorageIsInitialized() and call it from both side.
MozReview-Commit-ID: vNQVteoicH
--HG--
extra : rebase_source : bb6101662213b099cbd7974b091c6c5e845b6311
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