Bug 874754 - Suppress nsIEditor.removeEditorObserver exception. r=fabrice

Based on patch from Yuan Xulei <xyuan@mozilla.com>

--HG--
extra : rebase_source : 77b563eaa784d42cdfd20a3aba1f5b928a53aaa6
This commit is contained in:
Kan-Ru Chen (陳侃如) 2013-07-16 18:00:58 +08:00
parent a1d5eb4c13
commit 3a8d1e08f0

View File

@ -235,7 +235,13 @@ let FormAssistant = {
this._documentEncoder = null;
if (this._editor) {
this._editor.removeEditorObserver(this);
// When the nsIFrame of the input element is reconstructed by
// CSS restyling, the editor observers are removed. Catch
// [nsIEditor.removeEditorObserver] failure exception if that
// happens.
try {
this._editor.removeEditorObserver(this);
} catch (e) {}
this._editor = null;
}