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

Issue 7563014: Merge 92155 - [Chromium] WebSQLDatabase version handling is broken in multi-process browsers. (Closed)

Created:
9 years, 4 months ago by michaeln
Modified:
9 years, 4 months ago
Reviewers:
michaeln1
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/835/
Visibility:
Public.

Description

Merge 92155 - [Chromium] WebSQLDatabase version handling is broken in multi-process browsers. https://bugs.webkit.org/show_bug.cgi?id=65486 The WebCore::AbstractDatabase class maintains a global in-memory map of the version numbers associated with open database files, but that map is not reliable in a multi-process system like Chrome. So instead of relying on the cached values in that map, we read the value from the database (and update the cached value) where possible. There are two edge cases where that's not possible because the scriptable interface requires synchronous access to the version: the .version attribute getter and the .openDatabase() method. In those cases, we have no choice but to use the potentially stale cached value. Reviewed by Darin Fisher. No new tests. Existing layout tests cover the version handling functionality. * storage/AbstractDatabase.cpp: (WebCore::AbstractDatabase::version): (WebCore::AbstractDatabase::performOpenAndVerify): (WebCore::AbstractDatabase::getVersionFromDatabase): (WebCore::AbstractDatabase::setVersionInDatabase): (WebCore::AbstractDatabase::setExpectedVersion): (WebCore::AbstractDatabase::getCachedVersion): (WebCore::AbstractDatabase::setCachedVersion): (WebCore::AbstractDatabase::getActualVersionForTransaction): * storage/AbstractDatabase.h: (WebCore::AbstractDatabase::expectedVersion): * storage/ChangeVersionWrapper.cpp: (WebCore::ChangeVersionWrapper::handleCommitFailedAfterPostflight): * storage/ChangeVersionWrapper.h: * storage/Database.cpp: (WebCore::Database::openDatabase): * storage/DatabaseSync.cpp: (WebCore::DatabaseSync::openDatabaseSync): (WebCore::DatabaseSync::changeVersion): * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::SQLTransaction): (WebCore::SQLTransaction::executeSQL): (WebCore::SQLTransaction::openTransactionAndPreflight): (WebCore::SQLTransaction::runCurrentStatement): (WebCore::SQLTransaction::postflightAndCommit): * storage/SQLTransaction.h: * storage/SQLTransactionSync.cpp: (WebCore::SQLTransactionSync::SQLTransactionSync): (WebCore::SQLTransactionSync::executeSQL): (WebCore::SQLTransactionSync::begin): * storage/SQLTransactionSync.h: TBR=michaeln@google.com Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=92305

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -46 lines) Patch
M Source/WebCore/storage/AbstractDatabase.h View 3 chunks +12 lines, -6 lines 0 comments Download
M Source/WebCore/storage/AbstractDatabase.cpp View 9 chunks +78 lines, -27 lines 0 comments Download
M Source/WebCore/storage/ChangeVersionWrapper.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/storage/ChangeVersionWrapper.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/WebCore/storage/Database.cpp View 1 chunk +0 lines, -5 lines 0 comments Download
M Source/WebCore/storage/DatabaseSync.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M Source/WebCore/storage/SQLTransaction.h View 2 chunks +2 lines, -1 line 0 comments Download
M Source/WebCore/storage/SQLTransaction.cpp View 5 chunks +23 lines, -3 lines 0 comments Download
M Source/WebCore/storage/SQLTransactionSync.h View 2 chunks +2 lines, -0 lines 0 comments Download
M Source/WebCore/storage/SQLTransactionSync.cpp View 3 chunks +12 lines, -1 line 0 comments Download

Messages

Total messages: 1 (0 generated)
michaeln
9 years, 4 months ago (2011-08-03 19:46:21 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698