Index: content/browser/indexed_db/idbbindingutilities_browsertest.cc |
diff --git a/content/browser/indexed_db/idbbindingutilities_browsertest.cc b/content/browser/indexed_db/idbbindingutilities_browsertest.cc |
index 0793e0bd94a184864441d9534a09b8f235674d7b..3bcc69d64f7448659fd1ac09deda10f182467781 100644 |
--- a/content/browser/indexed_db/idbbindingutilities_browsertest.cc |
+++ b/content/browser/indexed_db/idbbindingutilities_browsertest.cc |
@@ -86,7 +86,6 @@ class IDBKeyPathHelper : public UtilityProcessHost::Client { |
public: |
IDBKeyPathHelper() |
: expected_id_(0), |
- utility_process_host_(NULL), |
value_for_key_path_failed_(false) { |
} |
@@ -99,7 +98,7 @@ class IDBKeyPathHelper : public UtilityProcessHost::Client { |
} |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
utility_process_host_ = |
- new UtilityProcessHost(this, BrowserThread::IO); |
+ (new UtilityProcessHost(this, BrowserThread::IO))->AsWeakPtr(); |
utility_process_host_->set_use_linux_zygote(true); |
utility_process_host_->StartBatchMode(); |
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
@@ -115,7 +114,7 @@ class IDBKeyPathHelper : public UtilityProcessHost::Client { |
} |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
utility_process_host_->EndBatchMode(); |
- utility_process_host_ = NULL; |
+ utility_process_host_.reset(); |
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
MessageLoop::QuitClosure()); |
} |
@@ -217,7 +216,7 @@ class IDBKeyPathHelper : public UtilityProcessHost::Client { |
private: |
int expected_id_; |
std::vector<IndexedDBKey> expected_keys_; |
- UtilityProcessHost* utility_process_host_; |
+ base::WeakPtr<UtilityProcessHost> utility_process_host_; |
bool value_for_key_path_failed_; |
content::SerializedScriptValue expected_value_; |
}; |