Closed
Bug 919535
Opened 12 years ago
Closed 12 years ago
Closing Sqlite.jsm databases should block profileBeforeChange
Categories
(Core :: SQLite and Embedded Database Bindings, defect)
Core
SQLite and Embedded Database Bindings
Tracking
()
RESOLVED
FIXED
mozilla27
People
(Reporter: Yoric, Assigned: gps)
References
Details
(Whiteboard: [Async][Async Shutdown])
Attachments
(1 file)
|
2.46 KB,
patch
|
Yoric
:
review+
|
Details | Diff | Splinter Review |
Since Sqlite.jsm calls asyncClose, the actual closing could theoretically take place after profile-before-change, which is bad. We need to plug these calls to asyncClose to AsyncShutdown.profileBeforeChange.
This will cause shutdown freezes (or 100% reproducible shutdown crashes once bug 917764 has landed) if the owner of the database calls asyncClose too late, which is certainly better than silent data loss/corruption.
| Reporter | ||
Updated•12 years ago
|
Whiteboard: [Async][Async Shutdown]
| Assignee | ||
Comment 2•12 years ago
|
||
I think this will do it! Not sure how to test this explicitly...
Attachment #813076 -
Flags: review?(dteller)
| Assignee | ||
Updated•12 years ago
|
Assignee: nobody → gps
| Reporter | ||
Comment 3•12 years ago
|
||
Comment on attachment 813076 [details] [diff] [review]
Use AsyncShutdown in Sqlite.jsm
Review of attachment 813076 [details] [diff] [review]:
-----------------------------------------------------------------
That looks good to me.
I would be slightly more comfortable if that part of the code were written with Task.jsm and we had a try/finally to ensure that we always resolve/reject the promise.
What do you think?
Attachment #813076 -
Flags: review?(dteller)
| Assignee | ||
Comment 4•12 years ago
|
||
Comment on attachment 813076 [details] [diff] [review]
Use AsyncShutdown in Sqlite.jsm
(In reply to David Rajchenbach Teller [:Yoric] from comment #3)
> That looks good to me.
> I would be slightly more comfortable if that part of the code were written
> with Task.jsm and we had a try/finally to ensure that we always
> resolve/reject the promise.
> What do you think?
I think the current patch accomplishes what we set out to accomplish in a very simple way and any extra code cleanup should be deferred to a followup bug.
Attachment #813076 -
Flags: review?(dteller)
| Reporter | ||
Comment 5•12 years ago
|
||
Comment on attachment 813076 [details] [diff] [review]
Use AsyncShutdown in Sqlite.jsm
Review of attachment 813076 [details] [diff] [review]:
-----------------------------------------------------------------
Ok, I won't insist.
Attachment #813076 -
Flags: review?(dteller) → review+
| Reporter | ||
Updated•12 years ago
|
Flags: needinfo?(gps)
| Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 6•12 years ago
|
||
Keywords: checkin-needed
Whiteboard: [Async][Async Shutdown] → [Async][Async Shutdown][fixed-in-fx-team]
Comment 7•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [Async][Async Shutdown][fixed-in-fx-team] → [Async][Async Shutdown]
Target Milestone: --- → mozilla27
Updated•1 year ago
|
Product: Toolkit → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•