| 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 365c91c2ff83d9cabe35f97452bb4a9da015281a..df541e8289e73b1164b9919ed423906f112c06ae 100644
|
| --- a/chrome/browser/in_process_webkit/browser_webkitclient_impl.cc
|
| +++ b/chrome/browser/in_process_webkit/browser_webkitclient_impl.cc
|
| @@ -20,6 +20,9 @@ BrowserWebKitClientImpl::BrowserWebKitClientImpl() {
|
| file_utilities_.set_sandbox_enabled(false);
|
| }
|
|
|
| +BrowserWebKitClientImpl::~BrowserWebKitClientImpl() {
|
| +}
|
| +
|
| WebKit::WebClipboard* BrowserWebKitClientImpl::clipboard() {
|
| NOTREACHED();
|
| return NULL;
|
| @@ -144,15 +147,19 @@ 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();
|
| +}
|
| +
|
| void BrowserWebKitClientImpl::createIDBKeysFromSerializedValuesAndKeyPath(
|
| const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values,
|
| const WebKit::WebString& keyPath,
|
| WebKit::WebVector<WebKit::WebIDBKey>& keys) {
|
| - // TODO(bulach): we need to figure out a way to keep the utility process
|
| - // running for longer, and shut it down when no longer used.
|
| - scoped_refptr<IndexedDBKeyUtilityClient> indexed_db_key_utility_client(
|
| - new IndexedDBKeyUtilityClient());
|
| - indexed_db_key_utility_client->StartUtilityProcess();
|
| + 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();
|
| @@ -161,10 +168,8 @@ void BrowserWebKitClientImpl::createIDBKeysFromSerializedValuesAndKeyPath(
|
| std_values.push_back(SerializedScriptValue(values[i]));
|
|
|
| std::vector<IndexedDBKey> std_keys;
|
| - indexed_db_key_utility_client->CreateIDBKeysFromSerializedValuesAndKeyPath(
|
| + indexed_db_key_utility_client_->CreateIDBKeysFromSerializedValuesAndKeyPath(
|
| std_values, keyPath, &std_keys);
|
|
|
| - indexed_db_key_utility_client->EndUtilityProcess();
|
| -
|
| keys = std_keys;
|
| }
|
|
|