Bug 1687118 - Bail early from DocumentL10n::TriggerInitialTranslation if mReady is not available. r=emilio,nordzilla

Differential Revision: https://phabricator.services.mozilla.com/D131253
This commit is contained in:
Zibi Braniecki 2021-11-17 23:31:45 +00:00
parent cf8aa80ecf
commit 3881c4ca80

View File

@ -117,6 +117,13 @@ void DocumentL10n::TriggerInitialTranslation() {
if (mState >= DocumentL10nState::InitialTranslationTriggered) {
return;
}
if (!mReady) {
// If we don't have `mReady` it means that we are in shutdown mode.
// See bug 1687118 for details.
InitialTranslationCompleted(false);
return;
}
mInitialTranslationStart = mozilla::TimeStamp::Now();
AutoAllowLegacyScriptExecution exemption;