From ca1fa6d6a7ed1eaf7fd4a7200a91ece263adaa69 Mon Sep 17 00:00:00 2001 From: Joe Walker Date: Fri, 27 Jan 2012 13:42:05 +0000 Subject: [PATCH] Bug 719292 - Error: hud.jsterm is null in resource:///modules/HUDService.jsm:2074; r=msucan --- browser/devtools/webconsole/HUDService.jsm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/browser/devtools/webconsole/HUDService.jsm b/browser/devtools/webconsole/HUDService.jsm index 934930d012bb..a57e8f519938 100644 --- a/browser/devtools/webconsole/HUDService.jsm +++ b/browser/devtools/webconsole/HUDService.jsm @@ -2067,7 +2067,16 @@ HUD_SERVICE.prototype = // Pipe the message to createMessageNode(). let hud = HUDService.hudReferences[aHUDId]; function formatResult(x) { - return (typeof(x) == "string") ? x : hud.jsterm.formatResult(x); + if (typeof(x) == "string") { + return x; + } + if (hud.gcliterm) { + return hud.gcliterm.formatResult(x); + } + if (hud.jsterm) { + return hud.jsterm.formatResult(x); + } + return x; } let body = null; @@ -7068,5 +7077,8 @@ GcliTerm.prototype = { }, clearOutput: JSTerm.prototype.clearOutput, -}; + formatResult: JSTerm.prototype.formatResult, + getResultType: JSTerm.prototype.getResultType, + formatString: JSTerm.prototype.formatString, +};