Permalink
Browse files

Added getSize() to cookie.js

  • Loading branch information...
1 parent 5de9aa9 commit eb096e0f0e596cc42d180d7318a79a1f7bb890f4 bharath committed Aug 21, 2012
Showing with 8 additions and 2 deletions.
  1. +7 −1 extension/content/firebug/cookies/cookie.js
  2. +1 −1 extension/content/firebug/cookies/cookieReps.js
@@ -3,6 +3,7 @@
define([
"firebug/lib/xpcom",
"firebug/lib/json",
+ "firebug/lib/string",
],
function(Xpcom, Json) {
@@ -140,7 +141,12 @@ Cookie.prototype =
}
return null;
- }
+ },
+
+ getSize: function(cookie)
+ {
+ return cookie.cookie.name.length + cookie.cookie.value.length;
+ },
};
// ********************************************************************************************* //
@@ -973,7 +973,7 @@ CookieReps.SizeInfoTip = domplate(Firebug.Rep,
render: function(cookie, parentNode)
{
- var size = cookie.cookie.name.length + cookie.cookie.value.length;
+ var size = cookie.getSize(cookie);
var sizeInfo = [];
sizeInfo.push({label: Locale.$STR("cookie.sizeinfo.Size"), size: size});
this.tag.replace({sizeInfo: sizeInfo}, parentNode);

0 comments on commit eb096e0

Please sign in to comment.