Closed Bug 449986 Opened 18 years ago Closed 18 years ago

profile-before-change should close cookie db connection

Categories

(Core :: Networking: Cookies, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dwitte, Assigned: bholley)

References

Details

Attachments

(1 file, 1 obsolete file)

for people that care about being able to copy/delete/manipulate the cookies.sqlite file directly, closing it after profile-before-change is a sensible thing to do... otherwise bad things may happen. i noticed this while investigating bug 439384, but i don't think it's directly related to the problem there.
I'll take this one dwitte - looks like a nice chance to do something for necko
Assignee: nobody → bholley
Status: NEW → ASSIGNED
Attached patch cookie patch (obsolete) — — Splinter Review
patch done - flagging dwitte for review
Attachment #333194 - Flags: review?
Attachment #333194 - Flags: review? → review?(dwitte)
Comment on attachment 333194 [details] [diff] [review] cookie patch >+ mDBConn = NULL; nsnull here please. r=dwitte, thanks for the patch!
Attachment #333194 - Flags: review?(dwitte) → review+
changed the patch to use nsnull
Attachment #333194 - Attachment is obsolete: true
flagging checkin-needed
Keywords: checkin-needed
pushed in 81688a46d4a1
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
hi - when running fennec (mobile firefox) with this command line, I get a crash on shutdown: mobilebase/mobile/dist/bin/fennec -tpcycles 1 -tp manifest -tpformat text (manifest is just a one line file with a url on it - firefox shutsdown after loading the page and reports how long that took) checking if (mDBConn == nsnull) before clsoing it fixes the crash for me. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7f8491c6d700 (LWP 1208)] 0x00007f84842928df in nsCookieService::Observe (this=0x7f847ad8e9d0, aSubject=0x7f84765f0200, aTopic=0x7f848adaf56b "profile-before-change", aData=0x7f848adaf980) at /home/mcmanus/src/mozilla2/local/netwerk/cookie/src/nsCookieService.cpp:629 629 mDBConn->Close(); (gdb) bt #0 0x00007f84842928df in nsCookieService::Observe (this=0x7f847ad8e9d0, aSubject=0x7f84765f0200, aTopic=0x7f848adaf56b "profile-before-change", aData=0x7f848adaf980) at /home/mcmanus/src/mozilla2/local/netwerk/cookie/src/nsCookieService.cpp:629 #1 0x00007f848fb9facc in nsObserverList::NotifyObservers (this=0x7f8480c9b300, aSubject=0x7f84765f0200, aTopic=0x7f848adaf56b "profile-before-change", someData=0x7f848adaf980) at /home/mcmanus/src/mozilla2/local/xpcom/ds/nsObserverList.cpp:128 #2 0x00007f848fba0e0d in nsObserverService::NotifyObservers (this=0x7f84905c5240, aSubject=0x7f84765f0200, aTopic=0x7f848adaf56b "profile-before-change", someData=0x7f848adaf980) at /home/mcmanus/src/mozilla2/local/xpcom/ds/nsObserverService.cpp:181 #3 0x00007f848ad9af8a in nsXREDirProvider::DoShutdown (this=0x7fff99c92a10) at /home/mcmanus/src/mozilla2/local/toolkit/xre/nsXREDirProvider.cpp:868 #4 0x00007f848ad8e0d3 in ~ScopedXPCOMStartup (this=0x7fff99c92c70) at /home/mcmanus/src/mozilla2/local/toolkit/xre/nsAppRunner.cpp:931 #5 0x00007f848ad93faa in XRE_main (argc=7, argv=0x7fff99c96398, aAppData=0x7f8490627240) at /home/mcmanus/src/mozilla2/local/toolkit/xre/nsAppRunner.cpp:3261 #6 0x000000000040244e in main (argc=7, argv=0x7fff99c96398) at /home/mcmanus/src/mozilla2/local/xulrunner/stub/nsXULStub.cpp:364 (gdb) print mDBConn $1 = { mRawPtr = 0x0 }
Patrick - can you file a new bug please?
bz filed this as bug 455035.
Depends on: 455035
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: