Add async shutdown blocker to CookiePersistentStorage
Categories
(Core :: Networking: Cookies, enhancement, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox150 | --- | fixed |
People
(Reporter: jstutte, Assigned: jstutte)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
If we hang when the DB is closed we currently lump this into bug 1679425. CookiePersistentStorage should have its own shutdown handling.
| Assignee | ||
Comment 1•3 months ago
|
||
CookiePersistentStorage had no async shutdown blocker. During shutdown,
Close() synchronously joined the Cookie thread and then fired AsyncClose,
but nothing held the shutdown barrier while sqlite3_close completed on
the async thread. This caused the main thread to block in
Connection::shutdownAsyncThread waiting for slow WAL truncation I/O.
Add an nsIAsyncShutdownBlocker on profile-before-change that initiates
the close in BlockShutdown and is removed when HandleDBClosed fires
after AsyncClose completes. Remove the now-redundant profile-before-change
and profile-do-change observers from CookieService, as runtime profile
switching no longer exists. Add testCloseCookieDB/testOpenCookieDB IDL
methods to replace the tests' direct observe() calls for simulating
profile changes.
Note that this will not fix the shutdown hang as such, it will just make it
attributable to the CookieService more easily.
Updated•3 months ago
|
Comment 4•2 months ago
|
||
| bugherder | ||
Updated•1 month ago
|
Description
•