Bug 1836974 - Rename createLanguageIdEngine function r=gregtatum

Renames function to getOrCreateLanguageIdEngine to
more accurately reflect what it does.

Differential Revision: https://phabricator.services.mozilla.com/D180743
This commit is contained in:
Erik Nordin 2023-06-27 06:38:42 +00:00
parent d1b927e773
commit 5f4fb76723
2 changed files with 2 additions and 2 deletions

View File

@ -206,7 +206,7 @@ export class AboutTranslationsChild extends JSWindowActorChild {
}
return this.#convertToContentPromise(
this.#getTranslationsChild()
.createLanguageIdEngine()
.getOrCreateLanguageIdEngine()
.then(engine => {
this.languageIdEngine = engine;
})

View File

@ -144,7 +144,7 @@ export class TranslationsChild extends JSWindowActorChild {
});
}
createLanguageIdEngine() {
getOrCreateLanguageIdEngine() {
return lazy.LanguageIdEngine.getOrCreate(() => {
if (this.#isPageHidden) {
throw new Error("The page was already hidden.");