mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1071771, disable dictionary list when it cannot be accessed from another process. This makes the context menu work again after using it on a misspelled word, r=mconley
This commit is contained in:
parent
172c321d53
commit
424e165e6b
@ -384,7 +384,8 @@ nsContextMenu.prototype = {
|
||||
if (canSpell) {
|
||||
var dictMenu = document.getElementById("spell-dictionaries-menu");
|
||||
var dictSep = document.getElementById("spell-language-separator");
|
||||
InlineSpellCheckerUI.addDictionaryListToMenu(dictMenu, dictSep);
|
||||
let count = InlineSpellCheckerUI.addDictionaryListToMenu(dictMenu, dictSep);
|
||||
this.showItem(dictSep, count > 0);
|
||||
this.showItem("spell-add-dictionaries-main", false);
|
||||
}
|
||||
else if (this.onEditableArea) {
|
||||
|
@ -159,6 +159,11 @@ InlineSpellChecker.prototype = {
|
||||
if (! this.mInlineSpellChecker || ! this.enabled)
|
||||
return 0;
|
||||
var spellchecker = this.mInlineSpellChecker.spellChecker;
|
||||
|
||||
// Cannot access the dictionary list from another process so just return 0.
|
||||
if (Components.utils.isCrossProcessWrapper(spellchecker))
|
||||
return 0;
|
||||
|
||||
var o1 = {}, o2 = {};
|
||||
spellchecker.GetDictionaryList(o1, o2);
|
||||
var list = o1.value;
|
||||
|
Loading…
Reference in New Issue
Block a user