This patch introduces a new notion of unaccessed origins. An origin is
considered as unaccessed if its age is older than a threshold (controlled by a
new preference, currently set to 13 months). Unaccessed origins are collected
during quota info loading.
When quota info loading is finished we check if it took a long time (controlled
by a new preference, currently set to 21s) and eventually archive unaccessed
origins which should speed up temporary storage initialization in a new
session.
Archiving consits of creating a new directory (archive) under storage/archives/0
directory (the name is based on the current date) and moving unaccessed origin
directories to the archive.
Once the patch lands, we will be monitoring QM_QUOTA_INFO_LOAD_TIME_V0
telemetry (quota info load time) and eventually lower down the preference for
long quota info load time.
If there are no issues, the archiving will be replaced with a hard removal of
unaccessed origins and also of the archives which were created in the meantime.
Differential Revision: https://phabricator.services.mozilla.com/D123049
This patch introduces a new notion of unaccessed origins. An origin is
considered as unaccessed if its age is older than a threshold (controlled by a
new preference, currently set to 13 months). Unaccessed origins are collected
during quota info loading.
When quota info loading is finished we check if it took a long time (controlled
by a new preference, currently set to 21s) and eventually archive unaccessed
origins which should speed up temporary storage initialization in a new
session.
Archiving consits of creating a new directory (archive) under storage/archives/0
directory (the name is based on the current date) and moving unaccessed origin
directories to the archive.
Once the patch lands, we will be monitoring QM_QUOTA_INFO_LOAD_TIME_V0
telemetry (quota info load time) and eventually lower down the preference for
long quota info load time.
If there are no issues, the archiving will be replaced with a hard removal of
unaccessed origins and also of the archives which were created in the meantime.
Differential Revision: https://phabricator.services.mozilla.com/D123049
This patch introduces a new type alias OkOrErr for Result<Ok, QMResult> and also converts some existing occurencies of Result<Ok, QMResult> to OkOrErr.
Differential Revision: https://phabricator.services.mozilla.com/D122206
ExecuteInitialization now takes a function argument instead of nsresult so
initializations are executed in the context of ExecuteInitialization. This
patch also removes a temporary overload of ExecuteInitialization.
Differential Revision: https://phabricator.services.mozilla.com/D119263
ExecuteInitialization now takes a function argument instead of nsresult so
initializations are executed in the context of ExecuteInitialization. This
patch also removes a temporary overload of ExecuteInitialization.
Differential Revision: https://phabricator.services.mozilla.com/D119263
This patch introduce an additional check inside the Helper::GetInactiveOriginInfos static method
used internally by CollectOriginsForEviction to ensure that QuotaManager will not select an
extension origin as an inactive origin to evict non persisted data from.
The rationale is that unlike websites (which may more likely using the locally stored data
as a local cache, but still able to retrieve the same data again from the server side),
extensions do not have a remote counterpart and so evicting their data would result
into potential data loss for the users.
Besides that, the browser extensions (unlike websites) are explicitly installed and uninstalled by
the user and all the data associated to the extension will be completely removed when the
extension is uninstalled.
Differential Revision: https://phabricator.services.mozilla.com/D120470
- the dom::quota:: prefix has been added
- it's now clear that the contexts are set only during first initialization
attempts
Differential Revision: https://phabricator.services.mozilla.com/D118142
The existing custom implementation of origin based first initialization
attempts handling has been replaced with the new generic implementation.
Differential Revision: https://phabricator.services.mozilla.com/D118141
- the class has been renamed to FirstInitializationAttemptImpl
- the class no longer automatically records first initialization attempts in
its destructor (the auto funcionality has been removed)
- the method names have been shortened
- new methods have been added
- the class is now intended to just forward calls to the owner
Differential Revision: https://phabricator.services.mozilla.com/D118138
- the method has been renamed to RecordFirstInitializationAttempt
- the second argument has been changed from bool to nsresult
- the method has been made public
Differential Revision: https://phabricator.services.mozilla.com/D118134
- AssertInitializationAttempted has been removed
- InitializationAttempted has been renamed to FirstInitializationAttemptRecorded
- FirstInitializationAttemptPending has been added
Differential Revision: https://phabricator.services.mozilla.com/D118132
MOZ_NEVER_INLINE can't 100% guarantee that all compilers never inline such
functions, but the current combination of MOZ_COLD and MOZ_NEVER_INLINE
produces sane builds with only minor code size increase (max 0.19% increase).
Differential Revision: https://phabricator.services.mozilla.com/D117142
Failures are not reported to the browser console until a context information is
available like the storage or temporary storage initialization.
Differential Revision: https://phabricator.services.mozilla.com/D117141