Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Unified Diff: Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp

Issue 11358013: Merge 132848 - IndexedDB: Crash on checking version of corrupt backing store (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp
===================================================================
--- Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp (revision 133042)
+++ Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp (working copy)
@@ -295,13 +295,13 @@
String path = pathByAppendingComponent(pathBase, securityOrigin->databaseIdentifier() + ".indexeddb.leveldb");
db = LevelDBDatabase::open(path, comparator.get());
- bool knownSchema = isSchemaKnown(db.get());
- if (!knownSchema) {
+ if (db && !isSchemaKnown(db.get())) {
LOG_ERROR("IndexedDB backing store had unknown schema, treating it as failure to open");
HistogramSupport::histogramEnumeration("WebCore.IndexedDB.BackingStore.OpenStatus", IDBLevelDBBackingStoreOpenFailedUnknownSchema, IDBLevelDBBackingStoreOpenMax);
+ db.release();
}
- if (db && knownSchema)
+ if (db)
HistogramSupport::histogramEnumeration("WebCore.IndexedDB.BackingStore.OpenStatus", IDBLevelDBBackingStoreOpenSuccess, IDBLevelDBBackingStoreOpenMax);
else {
LOG_ERROR("IndexedDB backing store open failed, attempting cleanup");
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698