Closed Bug 152695 Opened 23 years ago Closed 22 years ago

cookie leak could lead to a cookie loss

Categories

(Core :: Networking: Cookies, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.3beta

People

(Reporter: dougt, Assigned: morse)

Details

The cookie service to be a xpcom shutdown observer. In this way, if the cookie service is leaked there is no chance to lose a cookie.
Doug, could you please try to rephrase that. I don't understand what you are trying to say.
Target Milestone: --- → Future
Cookies now listens to profile-before-change (And writes when that occurs). Is that enough?
hmm, we don't listen to xpcom-shutdown anymore, and nsCookieService's dtor does _not_ write the cookiefile. we're relying on the timer to write cookies after every pageload. dougt: is it possible now, to lose a cookie if the user starts loading a page and quits the browser immediately? do we care about this edge case?
i do not know if it is a problem any more. If a user decides to quit in the middle of a page load, i believe that page load does complete, with an error code. If your flushing on these events, any cookies would be flushed. feel free to close this as invalid.
oh, I meant to cc danm to ask him about this. he's the one who wrote the timer code. danm: what do you think about comment #3? from what dougt says, it sounds like we should be ok.
nsCookieService once explicitly listened to the xpcom-shutdown topic but actually only during rev 1.71. Regardless, cookies are flushed at application shutdown because nsCookieService flushes when it sees the profile-before-change topic, broadcast as the profile is shut down. The additional flushing that happens on a timer after pageload is only to reduce the damage should some odd crash take Mozilla down unexpectedly.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Target Milestone: Future → mozilla1.3beta
You need to log in before you can comment on or make changes to this bug.