Summary: | Use threadsafeCopy() API when using Database Directory path variable | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Srikumar B <srikumar.b> | ||||||
Component: | New Bugs | Assignee: | Srikumar B <srikumar.b> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | ap, levin, nagar28496, srikumar.b, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Srikumar B
2011-07-31 14:58:28 PDT
Created attachment 102468 [details]
patch file
Attaching the patch file with the changes to use threadsafeCopy() API
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 Kindly assign the bug to me if there are any comments in the review 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. 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.
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> All reviewed patches have been landed. Closing bug. |