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

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: Singleton wrapper approach 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..48ff0060f2ad0073a77ae1d5f7e7f6ce6a0ff9dc 100644
--- a/chrome/browser/in_process_webkit/browser_webkitclient_impl.cc
+++ b/chrome/browser/in_process_webkit/browser_webkitclient_impl.cc
@@ -147,21 +147,12 @@ 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();
- }
+ IndexedDBKeyUtilityClient* key_utility_client =
+ IndexedDBKeyUtilityClient::GetInstance();
bulach 2011/01/20 16:49:15 no need for this local, just call directly Indexed
hans 2011/01/20 17:24:59 Done.
std::vector<SerializedScriptValue> std_values;
size_t size = values.size();
@@ -170,7 +161,7 @@ void BrowserWebKitClientImpl::createIDBKeysFromSerializedValuesAndKeyPath(
std_values.push_back(SerializedScriptValue(values[i]));
std::vector<IndexedDBKey> std_keys;
- indexed_db_key_utility_client_->CreateIDBKeysFromSerializedValuesAndKeyPath(
+ key_utility_client->CreateIDBKeysFromSerializedValuesAndKeyPath(
std_values, keyPath, &std_keys);
keys = std_keys;

Powered by Google App Engine
This is Rietveld 408576698