Closed Bug 461263 Opened 16 years ago Closed 16 years ago

Race condition exists with mozStorageTransaction

Categories

(Toolkit :: Storage, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1b2

People

(Reporter: sdwilsh, Assigned: sdwilsh)

Details

Attachments

(1 file)

mozStorageTransaction checks to see if we have a transaction in progress, which holds a mutex during the call, and then if one isn't in progress, it starts a transaction, which holds a mutex.  The problem is that other code could come in during that time and grab a transaction, and this could end up leading to dataloss.
Neat - we actually do a bunch of work that isn't even needed...

Easy patch coming.
Attached patch v1.0Splinter Review
Attachment #344398 - Flags: review?(bent.mozilla)
Whiteboard: [has patch][needs review bent]
Comment on attachment 344398 [details] [diff] [review]
v1.0

Looks ok to me.
Attachment #344398 - Flags: review?(bent.mozilla) → review+
Whiteboard: [has patch][needs review bent] → [has patch][has review][can land]
http://hg.mozilla.org/mozilla-central/rev/4ab369d23d95
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Whiteboard: [has patch][has review][can land]
Target Milestone: --- → mozilla1.9.1b2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: