} if (cookieToDelete) { cookie_FreeCookie(cookieToDelete); cookie_SaveCookies();
COOKIE_CookieViewerReturn(nsAutoString results) {  cookie_CookieStruct * cookie;  cookie_CookieStruct * cookieToDelete = 0;  cookie_PermissionStruct * permission;  cookie_PermissionStruct * permissionToDelete = 0;  int cookieNumber;  int permissionNumber;  PRInt32 count = 0;  /* step through all cookies and delete those that are in the sequence   * Note: we can't delete cookie while "cookie_ptr" is pointing to it because   * that would destroy "cookie_ptr". So we do a lazy deletion   */  char * gone = cookie_FindValueInArgs(results, "|goneC|");  cookieNumber = 0;  cookie_LockCookieList();  if (cookie_cookieList) {    count = cookie_cookieList->Count();    for (PRInt32 i = 0; i < count; ++i) {      cookie = NS_STATIC_CAST(cookie_CookieStruct*, cookie_cookieList->ElementAt(i));      if (cookie) {        if (cookie_InSequence(gone, cookieNumber)) {          if (cookieToDelete) {            cookie_FreeCookie(cookieToDelete);          }          cookieToDelete = cookie;        }        cookieNumber++;      }    }    if (cookieToDelete) {      cookie_FreeCookie(cookieToDelete);      cookie_SaveCookies();    }  }  cookie_UnlockCookieList();  delete[] gone;  /* step through all permissions and delete those that are in the sequence   * Note: we can't delete permission while "permission_ptr" is pointing to it because   * that would destroy "permission_ptr". So we do a lazy deletion   */  gone = cookie_FindValueInArgs(results, "|goneP|");  permissionNumber = 0;  cookie_LockPermissionList();  if (cookie_permissionList) {    count = cookie_permissionList->Count();    for (PRInt32 i = 0; i < count; ++i) {      permission = NS_STATIC_CAST(cookie_PermissionStruct*, cookie_permissionList->ElementAt(i));      if (permission) {        if (cookie_InSequence(gone, permissionNumber)) {          if (permissionToDelete) {            cookie_FreePermission(permissionToDelete, PR_FALSE);          }          permissionToDelete = permission;        }        permissionNumber++;      }    }    if (permissionToDelete) {      cookie_FreePermission(permissionToDelete, PR_TRUE);    }  }  cookie_UnlockPermissionListst();  delete[] gone;}