hsingh 9a445675ca Bug 1869087: Properly handle QuotaInitRunnable failure in Context::OnQuotaInit.r=dom-storage-reviewers,janv
QuotaInitRunnable is invoked by Context to set up cache directory. This is not always successful as it could be
interrupted by shutdown or other filesystem issues. By the time in ran into error, it's possible that some objects
needed by Context are not yet initialized in QuotaInitRunnable::Run. Since QuotaInitRunnable internal state machine
will always transition to 'COMPLETING' and Context::OnQuotaInit would always be called; it's possible that some objects
like mDirectoryLock, mCipherKeyManager and mDirectoryMetadata didn't get initialized yet. As an effect, we should
only assert these objects being non-null in Context::OnQuotaInit if the QuotaInitRunnable was successful.

Differential Revision: https://phabricator.services.mozilla.com/D196113
2023-12-14 16:31:23 +00:00
..