Closed
Bug 1192194
Opened 9 years ago
Closed 9 years ago
DOMStorageDBThead::mDBReady should be atomic
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla43
People
(Reporter: mayhemer, Assigned: mayhemer)
Details
Attachments
(1 file)
1.33 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
It's read on two threads and block database update and main thread direct read concurrency.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8644916 -
Flags: review?(bugs)
Comment 2•9 years ago
|
||
Comment on attachment 8644916 [details] [diff] [review] v1 It is not clear to me whether this is enough. DOMStorageDBThread::ShutdownDatabase() sets the value back to false, but what if we have just executed if (mDBReady && mWALModeEnabled) { in DOMStorageDBThread::SyncPreload. Should we protect the stuff using a monitor? But r+ to this change.
Attachment #8644916 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 3•9 years ago
|
||
(In reply to Olli Pettay [:smaug] (reviewing overload, please consider other reviewers) from comment #2) > Comment on attachment 8644916 [details] [diff] [review] > v1 > > It is not clear to me whether this is enough. > DOMStorageDBThread::ShutdownDatabase() sets the value back to false, but what > if we have just executed > if (mDBReady && mWALModeEnabled) { in DOMStorageDBThread::SyncPreload. > Should we protect the stuff using a monitor? > > But r+ to this change. nsresult DOMStorageDBThread::ShutdownDatabase() { // Has to be called on the worker thread. MOZ_ASSERT(!NS_IsMainThread()); nsresult rv = mStatus; mDBReady = false; // Finalize the cached statements. mReaderStatements.FinalizeStatements(); mWorkerStatements.FinalizeStatements(); if (mReaderConnection) { // No need to sync access to mReaderConnection since the main thread // is right now joining this thread, unable to execute any events. ^^^^^
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 5•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f3d0fe2a731d
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•