for (PRInt32 i = 0; i < count; ++i) {
for (PRInt32 i = count-1; i >=0; i--) {
cookie_RemoveAllPermissions() {  cookie_PermissionStruct * victim;   /* check for NULL or empty list */  cookie_LockPermissionList();  if (cookie_permissionList == nsnull) {    cookie_UnlockPermissionListst();    return;  }  PRInt32 count = cookie_permissionList->Count();  for (PRInt32 i = 0; i < count; ++i) {    victim = NS_STATIC_CAST(cookie_PermissionStruct*, cookie_permissionList->ElementAt(i));    if (victim) {      cookie_FreePermission(victim, PR_FALSE);	  i = -1;    }  }  delete cookie_permissionList;  cookie_permissionList = NULL;  cookie_UnlockPermissionListst();}