Title: [88925] trunk/Source/WebCore
- Revision
- 88925
- Author
- [email protected]
- Date
- 2011-06-15 06:57:09 -0700 (Wed, 15 Jun 2011)
Log Message
2011-06-14 Hans Wennborg <[email protected]>
Reviewed by Tony Gentilcore.
IndexedDB: Use fileExists() first when checking if SQLite db exists
https://bugs.webkit.org/show_bug.cgi?id=62638
In IDBSQLiteBackingStore::backingStoreExists(), which is used to check
if a SQLite database exists and should be considered for migration,
check if the file exists first.
Trying to open a SQLite database for a non-existing file prints a
noisy error message in debug builds.
No new functionality, no new tests.
* storage/IDBSQLiteBackingStore.cpp:
(WebCore::IDBSQLiteBackingStore::backingStoreExists):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (88924 => 88925)
--- trunk/Source/WebCore/ChangeLog 2011-06-15 13:53:19 UTC (rev 88924)
+++ trunk/Source/WebCore/ChangeLog 2011-06-15 13:57:09 UTC (rev 88925)
@@ -1,3 +1,22 @@
+2011-06-14 Hans Wennborg <[email protected]>
+
+ Reviewed by Tony Gentilcore.
+
+ IndexedDB: Use fileExists() first when checking if SQLite db exists
+ https://bugs.webkit.org/show_bug.cgi?id=62638
+
+ In IDBSQLiteBackingStore::backingStoreExists(), which is used to check
+ if a SQLite database exists and should be considered for migration,
+ check if the file exists first.
+
+ Trying to open a SQLite database for a non-existing file prints a
+ noisy error message in debug builds.
+
+ No new functionality, no new tests.
+
+ * storage/IDBSQLiteBackingStore.cpp:
+ (WebCore::IDBSQLiteBackingStore::backingStoreExists):
+
2011-06-14 Alexander Pavlov <[email protected]>
Reviewed by Yury Semikhatsky.
Modified: trunk/Source/WebCore/storage/IDBSQLiteBackingStore.cpp (88924 => 88925)
--- trunk/Source/WebCore/storage/IDBSQLiteBackingStore.cpp 2011-06-15 13:53:19 UTC (rev 88924)
+++ trunk/Source/WebCore/storage/IDBSQLiteBackingStore.cpp 2011-06-15 13:57:09 UTC (rev 88925)
@@ -994,6 +994,8 @@
bool IDBSQLiteBackingStore::backingStoreExists(SecurityOrigin* securityOrigin, const String& pathBase)
{
String path = pathByAppendingComponent(pathBase, securityOrigin->databaseIdentifier() + ".indexeddb");
+ if (!fileExists(path))
+ return false;
SQLiteDatabase db;
if (!db.open(path))
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes