Created
September 11, 2018 21:51
-
-
Save zbraniecki/dbab173d3d0aa040cccd8e1eb94e66fd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp | |
| --- a/dom/base/nsDocument.cpp | |
| +++ b/dom/base/nsDocument.cpp | |
| @@ -3360,6 +3360,12 @@ nsIDocument::LocalizationLinkAdded(Eleme | |
| AutoTArray<nsString, 1> resourceIds; | |
| resourceIds.AppendElement(href); | |
| mDocumentL10n->AddResourceIds(resourceIds); | |
| + } else if (mReadyState == READYSTATE_COMPLETE) { | |
| + // Otherwise, if the document has already been parsed | |
| + // we need to lazily initialize the localization. | |
| + AutoTArray<nsString, 1> resourceIds; | |
| + resourceIds.AppendElement(href); | |
| + InitializeLocalization(resourceIds); | |
| } else { | |
| // Otherwise, we're still parsing the document. | |
| // In that case, add it to the pending list. This list | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment