DatabaseProcess: Implement version changing This includes some WebCore tweaks, moving responsibilities currently in the LevelDB implementation that belong in the cross platform backend.
Created attachment 219818 [details] Patch v1
Attachment 219818 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp', u'Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp', u'Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.h', u'Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp', u'Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h', u'Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in', u'Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp', u'Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h', u'Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h', u'Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp', u'Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h', u'Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp', u'Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h', u'Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp', u'Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.h', u'Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in', '--commit-queue']" exit_code: 1 ERROR: Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:303: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:33: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp:180: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 3 in 18 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 219818 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=219818&action=review > Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:307 > + completionCallback(IDBDatabaseError::create(IDBDatabaseException::UnknownError, "Unknown error occured changing database version")); When there is a "literal string" that turns into a WTF::String you can use ASCIILiteral("literal") for more efficient construction: <http://trac.webkit.org/wiki/EfficientStrings> You could do that here with error strings and SQLStatements, since that constructor also takes WTF::String and not a char*.
(In reply to comment #3) > (From update of attachment 219818 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=219818&action=review > > > Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:307 > > + completionCallback(IDBDatabaseError::create(IDBDatabaseException::UnknownError, "Unknown error occured changing database version")); > > When there is a "literal string" that turns into a WTF::String you can use ASCIILiteral("literal") for more efficient construction: > <http://trac.webkit.org/wiki/EfficientStrings> > > You could do that here with error strings and SQLStatements, since that constructor also takes WTF::String and not a char*. Sure, sometimes I remember this and sometimes I forget. Easy to forget when nobody else using a coding pattern (SQLite code) has done it before. Last time this came up in a review I lamented that style bot doesn't capture it. I know it's just a python script and doesn't understand the underlying C++... but anything that *CAN* be statically caught in a review *SHOULD* be automatically caught. So I filed https://bugs.webkit.org/show_bug.cgi?id=126112
http://trac.webkit.org/changeset/161076