Closed
Bug 919535
Opened 11 years ago
Closed 11 years ago
Closing Sqlite.jsm databases should block profileBeforeChange
Categories
(Toolkit :: Storage, defect)
Toolkit
Storage
Tracking
()
RESOLVED
FIXED
mozilla27
People
(Reporter: Yoric, Assigned: gps)
References
Details
(Whiteboard: [Async][Async Shutdown])
Attachments
(1 file)
(deleted),
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•11 years ago
|
Whiteboard: [Async][Async Shutdown]
Assignee | ||
Comment 2•11 years ago
|
||
I think this will do it! Not sure how to test this explicitly...
Attachment #813076 -
Flags: review?(dteller)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → gps
Reporter | ||
Comment 3•11 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•11 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•11 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•11 years ago
|
Flags: needinfo?(gps)
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 6•11 years ago
|
||
Keywords: checkin-needed
Whiteboard: [Async][Async Shutdown] → [Async][Async Shutdown][fixed-in-fx-team]
Comment 7•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [Async][Async Shutdown][fixed-in-fx-team] → [Async][Async Shutdown]
Target Milestone: --- → mozilla27
You need to log in
before you can comment on or make changes to this bug.
Description
•