From 6e4eabd1a083fc9bd2000900fe00661f8e1cd1d9 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas <21@vingtetun.org> Date: Fri, 4 May 2012 20:05:40 +0200 Subject: [PATCH] Bug 748895 - Error message if an error message arrived after the destruction of the console binding. r=enndeakin --- toolkit/components/console/content/consoleBindings.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/toolkit/components/console/content/consoleBindings.xml b/toolkit/components/console/content/consoleBindings.xml index fab5f90eaf7c..bfbc38211867 100644 --- a/toolkit/components/console/content/consoleBindings.xml +++ b/toolkit/components/console/content/consoleBindings.xml @@ -80,7 +80,12 @@ this.mConsoleListener = { console: this, - observe : function(aObject) { this.console.appendItem(aObject); } + observe : function(aObject) { + // The message can arrive a little bit after the xbl binding has been + // unbind. So node.appendItem will not be available anymore. + if ('appendItem' in this.console) + this.console.appendItem(aObject); + } }; this.mConsoleRowBox = document.getAnonymousElementByAttribute(this, "role", "console-rows");