RESOLVED FIXED Bug 65436
Use threadsafeCopy() API when using Database Directory path variable
https://bugs.webkit.org/show_bug.cgi?id=65436
Summary Use threadsafeCopy() API when using Database Directory path variable
Srikumar B
Reported 2011-07-31 14:58:28 PDT
Use threadsafeCopy() while using m_databaseDirectoryPath in DatabaseTracker class
Attachments
patch file (1.99 KB, patch)
2011-07-31 15:31 PDT, Srikumar B
levin: review-
revised patch with the comments from David Levin (1.62 KB, patch)
2011-08-01 17:36 PDT, Srikumar B
no flags
Srikumar B
Comment 1 2011-07-31 15:31:05 PDT
Created attachment 102468 [details] patch file Attaching the patch file with the changes to use threadsafeCopy() API
Srikumar B
Comment 2 2011-08-01 13:05:54 PDT
tracker database path(m_databaseDirectoryPath) is being used in multiple places. trackerDatabasePath() and deleteOrigin() APIs currently use the DB path without using threadsafeCopy() but these APIs can be called from multiple threads as this tracker DB path is common for all threads which use Database
Srikumar B
Comment 3 2011-08-01 16:08:55 PDT
Kindly assign the bug to me if there are any comments in the review
David Levin
Comment 4 2011-08-01 16:54:20 PDT
Comment on attachment 102468 [details] patch file View in context: https://bugs.webkit.org/attachment.cgi?id=102468&action=review > Source/WebCore/ChangeLog:8 > + Use threadsafeCopy() API when using m_databaseDirectoryPath string variable when the databaseGuard lock hasn't been taken > Source/WebCore/storage/DatabaseTracker.cpp:105 > + return SQLiteFileSystem::appendDatabaseFileNameToPath(m_databaseDirectoryPath.threadsafeCopy(), "Databases.db"); This one seems good. > Source/WebCore/storage/DatabaseTracker.cpp:820 > + SQLiteFileSystem::deleteEmptyDatabaseDirectory(m_databaseDirectoryPath.threadsafeCopy()); This seems unnecessary since the lock m_databaseGuard has been taken.
Srikumar B
Comment 5 2011-08-01 17:36:35 PDT
Created attachment 102598 [details] revised patch with the comments from David Levin David, Thanks for the comments. I updated the patch with reference to your comments.
WebKit Review Bot
Comment 6 2011-08-01 17:50:07 PDT
Comment on attachment 102598 [details] revised patch with the comments from David Levin Clearing flags on attachment: 102598 Committed r92157: <http://trac.webkit.org/changeset/92157>
WebKit Review Bot
Comment 7 2011-08-01 17:50:11 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.