Changeset 223423 in webkit
- Timestamp:
- Oct 16, 2017, 12:21:07 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r223420 r223423 1 2017-10-16 Maureen Daum <mdaum@apple.com> 2 3 We should wrap the removal of information from the tracker database in a transaction in DatabaseTracker::deleteOrigin() 4 https://bugs.webkit.org/show_bug.cgi?id=178274 5 <rdar://problem/34576132> 6 7 Reviewed by Tim Horton. 8 9 * Modules/webdatabase/DatabaseTracker.cpp: 10 (WebCore::DatabaseTracker::deleteOrigin): 11 Wrap the removal of information from the tracker database in a transaction so that 12 we don't end up in a case where only one of the tables contains information about 13 an origin. 14 If anything goes wrong when we're modifying the tracker database, rollback the transaction 15 before bailing. 16 1 17 2017-10-16 Ryan Haddad <ryanhaddad@apple.com> 2 18 -
trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp
r223420 r223423 43 43 #include "SQLiteFileSystem.h" 44 44 #include "SQLiteStatement.h" 45 #include "SQLiteTransaction.h" 45 46 #include <wtf/MainThread.h> 46 47 #include <wtf/NeverDestroyed.h> … … 843 844 doneDeletingOrigin(origin); 844 845 846 SQLiteTransaction transaction(m_database); 847 transaction.begin(); 848 845 849 SQLiteStatement statement(m_database, "DELETE FROM Databases WHERE origin=?"); 846 850 if (statement.prepare() != SQLITE_OK) { … … 868 872 return false; 869 873 } 874 875 transaction.commit(); 870 876 871 877 SQLiteFileSystem::deleteEmptyDatabaseDirectory(originPath(origin));
Note:
See TracChangeset
for help on using the changeset viewer.