From 4b01cfe59117bd06d974410b0417cfb32f47bcb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kan-Ru=20Chen=20=28=E9=99=B3=E4=BE=83=E5=A6=82=29?= Date: Tue, 16 Jul 2013 18:00:58 +0800 Subject: [PATCH] Bug 874754 - Suppress nsIEditor.removeEditorObserver exception. r=fabrice Based on patch from Yuan Xulei --HG-- extra : rebase_source : 77b563eaa784d42cdfd20a3aba1f5b928a53aaa6 --- b2g/chrome/content/forms.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/b2g/chrome/content/forms.js b/b2g/chrome/content/forms.js index b48f24a214e6..56292d98669d 100644 --- a/b2g/chrome/content/forms.js +++ b/b2g/chrome/content/forms.js @@ -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; }