rem: for (var i = bucket.childNodes.length - 1; i >= 0; i--) 
add: while (bucket.hasChildNodes()) 
context: function RemoveAllAttachments(){  var child;  var bucket = document.getElementById("attachmentBucket");  for (var i = bucket.childNodes.length - 1; i >= 0; i--)  {    child = bucket.removeChild(bucket.childNodes[i]);    // Let's release the attachment object hold by the node else it won't go away until the window is destroyed    child.attachment = null;  }    document.getElementById("attachments-box").setAttribute("hidden", "true");  document.getElementById("attachmentbucket-sizer").setAttribute("hidden", "true");   }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/4cba32786bcfe8ed3d92ee412e77e5d20b45181e/MsgComposeCommands.js/buggy/mail/components/compose/content/MsgComposeCommands.js