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

Unified Diff: chrome/browser/in_process_webkit/browser_webkitclient_impl.cc

Issue 6209005: Fix IndexedDB race condition during shutdown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing Marcus's comments Created 9 years, 11 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
Index: chrome/browser/in_process_webkit/browser_webkitclient_impl.cc
diff --git a/chrome/browser/in_process_webkit/browser_webkitclient_impl.cc b/chrome/browser/in_process_webkit/browser_webkitclient_impl.cc
index c1a34f36fc01ac8cf0117f9022c4c83a048750a7..5c75a7945c0cb3b37ee529f3b43ab090efc3ba29 100644
--- a/chrome/browser/in_process_webkit/browser_webkitclient_impl.cc
+++ b/chrome/browser/in_process_webkit/browser_webkitclient_impl.cc
@@ -147,21 +147,10 @@ int BrowserWebKitClientImpl::databaseDeleteFile(
return file_util::Delete(path, false) ? 0 : 1;
}
-void BrowserWebKitClientImpl::idbShutdown() {
- if (indexed_db_key_utility_client_.get()) {
- indexed_db_key_utility_client_->EndUtilityProcess();
- indexed_db_key_utility_client_ = NULL;
- }
-}
-
void BrowserWebKitClientImpl::createIDBKeysFromSerializedValuesAndKeyPath(
const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values,
const WebKit::WebString& keyPath,
WebKit::WebVector<WebKit::WebIDBKey>& keys) {
- if (!indexed_db_key_utility_client_.get()) {
- indexed_db_key_utility_client_ = new IndexedDBKeyUtilityClient();
- indexed_db_key_utility_client_->StartUtilityProcess();
- }
std::vector<SerializedScriptValue> std_values;
size_t size = values.size();
@@ -170,8 +159,10 @@ void BrowserWebKitClientImpl::createIDBKeysFromSerializedValuesAndKeyPath(
std_values.push_back(SerializedScriptValue(values[i]));
std::vector<IndexedDBKey> std_keys;
- indexed_db_key_utility_client_->CreateIDBKeysFromSerializedValuesAndKeyPath(
- std_values, keyPath, &std_keys);
+ IndexedDBKeyUtilityClient::
+ GetInstance()->CreateIDBKeysFromSerializedValuesAndKeyPath(std_values,
jorlow1 2011/01/21 09:33:00 Isn't this what IndexedDBKeyUtilityClient::CreateI
hans 2011/01/21 11:27:55 You're right. Removing GetInstance() and making th
+ keyPath,
+ &std_keys);
keys = std_keys;
}

Powered by Google App Engine
This is Rietveld 408576698