revert-xpcomgc-cookie-madness
author Benjamin Smedberg <benjamin@smedbergs.us>
Sat, 26 Jul 2008 22:49:39 -0400
changeset 167 a4da40849f5436e629c5732f4368c6c48189637f
parent 64 581fe3be70d52aaebfdc51f86203e7cf12576b35
permissions -rw-r--r--
State as of now

diff --git a/netwerk/cookie/src/nsCookieService.cpp b/netwerk/cookie/src/nsCookieService.cpp
--- a/netwerk/cookie/src/nsCookieService.cpp
+++ b/netwerk/cookie/src/nsCookieService.cpp
@@ -1064,7 +1064,10 @@ nsCookieService::ImportCookies(nsIFile *
     // by successively decrementing the lastAccessed time
     lastAccessedCounter--;
 
-    (void) AddCookieToList(newCookie);
+    if (originalCookieCount == 0)
+      AddCookieToList(newCookie);
+    else
+      AddInternal(newCookie, currentTime, nsnull, nsnull, PR_TRUE);
   }
 
   COOKIE_LOGSTRING(PR_LOG_DEBUG, ("ImportCookies(): %ld cookies imported", mCookieCount));