Skip to content

Commit

Permalink
Fix for DFL-2954: Inspecting CSS properties causes memory leak.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Håsäther committed Mar 26, 2012
1 parent 8d22666 commit 8070efb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/resource-manager/resource_base.js
Expand Up @@ -36,10 +36,10 @@ cls.ResourceDetailBase = function()
} }
else if (child.nodeType == TEXT) else if (child.nodeType == TEXT)
{ {
var pos; var value = child.nodeValue;
for (pos = 0; pos < child.nodeValue.length; pos++) for (var pos = 0, len = value.length; pos < len; pos++)
{ {
var c = child.nodeValue.charAt(pos); var c = value.charAt(pos);
// Linefeed recognition will not support Acorn BBC spooled text output // Linefeed recognition will not support Acorn BBC spooled text output
if ((c == CR ) || (c == LF)) if ((c == CR ) || (c == LF))
{ {
Expand Down Expand Up @@ -78,7 +78,7 @@ cls.ResourceDetailBase = function()
return; return;
} }
} }
if ((c == CR) && (child.nodeValue.charAt(pos+1) == LF)) if ((c == CR) && (value.charAt(pos+1) == LF))
{ {
pos++; pos++;
} }
Expand Down

0 comments on commit 8070efb

Please sign in to comment.