From 94e44a6d22be5bf260f25bad12f0a50239a2f155 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Thu, 20 Jan 2011 10:15:45 +0200 Subject: [PATCH] further changes to avoid a validation warning about modifying a global variable --- chrome/content/icedeb.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/chrome/content/icedeb.js b/chrome/content/icedeb.js index 391d253..061f3cd 100644 --- a/chrome/content/icedeb.js +++ b/chrome/content/icedeb.js @@ -15,14 +15,18 @@ IceDeb = { : clip.kGlobalClipboard ); - var str = new Object; - var strLength = new Object; - trans.getTransferData("text/unicode", str, strLength); + var s = new Object; + var p; + var len = new Object; + trans.getTransferData("text/unicode", s, len); var text = null; + var res; - if (str) str = str.value.QueryInterface(Components.interfaces.nsISupportsString); - if (str) text = str.data.substring(0, strLength.value / 2); + if (s) + p = s.value.QueryInterface(Components.interfaces.nsISupportsString, res); + if (p) + text = p.data.substring(0, len.value / 2); return text; }, -- 2.39.5