diff --git a/dom/l10n/DocumentL10n.cpp b/dom/l10n/DocumentL10n.cpp index b5a5fd82a58e..c65f53c73aed 100644 --- a/dom/l10n/DocumentL10n.cpp +++ b/dom/l10n/DocumentL10n.cpp @@ -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;