From b4c2d5e2fc9d196081ad7958c236c22f4134ae7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Qu=C3=A8ze?= Date: Wed, 15 Jun 2011 16:26:21 +0200 Subject: [PATCH] Avoid calling clearTimeout with an invalid id in the buddy list (for compatibility with the jsProtoHelper module if an add-on ever wants to include it there). --- im/content/blist.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/im/content/blist.js b/im/content/blist.js index 93179ed96b..8d299833b9 100644 --- a/im/content/blist.js +++ b/im/content/blist.js @@ -448,7 +448,8 @@ var buddyList = { statusMessageRefreshTimer: function bl_statusMessageRefreshTimer() { const timeBeforeAutoValidate = 20 * 1000; - clearTimeout(this._stopEditStatusTimeout); + if ("_stopEditStatusTimeout" in this) + clearTimeout(this._stopEditStatusTimeout); this._stopEditStatusTimeout = setTimeout(this.finishEditStatusMessage, timeBeforeAutoValidate, true); }, @@ -476,6 +477,7 @@ var buddyList = { finishEditStatusMessage: function bl_finishEditStatusMessage(aSave) { clearTimeout(this._stopEditStatusTimeout); + delete this._stopEditStatusTimeout; let elt = document.getElementById("statusMessage"); if (aSave) { let newStatus = Ci.imIStatusInfo.STATUS_UNKNOWN;