зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1729909 - Fix crash in Document::LocalizationLinkAdded; r=platform-i18n-reviewers,zbraniecki
If for some reason we can't create the promise for mDocumentL10n, we should return early rather than crashing. Differential Revision: https://phabricator.services.mozilla.com/D125234
This commit is contained in:
Родитель
d0485c8a55
Коммит
9f1ed581a6
|
@ -4171,7 +4171,9 @@ void Document::LocalizationLinkAdded(Element* aLinkElement) {
|
|||
|
||||
bool isSync = elem->HasAttr(nsGkAtoms::datal10nsync);
|
||||
mDocumentL10n = DocumentL10n::Create(this, isSync);
|
||||
MOZ_ASSERT(mDocumentL10n);
|
||||
if (NS_WARN_IF(!mDocumentL10n)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
mDocumentL10n->AddResourceId(NS_ConvertUTF16toUTF8(href));
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче