diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js index fcc4e50eb8f9..548f4372ae00 100644 --- a/browser/base/content/nsContextMenu.js +++ b/browser/base/content/nsContextMenu.js @@ -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) { diff --git a/toolkit/modules/InlineSpellChecker.jsm b/toolkit/modules/InlineSpellChecker.jsm index 917ea0561589..8c63133148b3 100644 --- a/toolkit/modules/InlineSpellChecker.jsm +++ b/toolkit/modules/InlineSpellChecker.jsm @@ -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;