mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1029486 - Check for dead wrappers after running language detection r=felipe
This commit is contained in:
parent
3b01f496de
commit
4dcf437636
@ -85,8 +85,15 @@ TranslationContentHandler.prototype = {
|
||||
return;
|
||||
|
||||
LanguageDetector.detectLanguage(string).then(result => {
|
||||
if (!result.confident)
|
||||
// Bail if we're not confident.
|
||||
if (!result.confident) {
|
||||
return;
|
||||
}
|
||||
|
||||
// The window might be gone by now.
|
||||
if (Cu.isDeadWrapper(content)) {
|
||||
return;
|
||||
}
|
||||
|
||||
content.detectedLanguage = result.language;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user