Index: chrome/browser/importer/external_process_importer_client.cc |
diff --git a/chrome/browser/importer/external_process_importer_client.cc b/chrome/browser/importer/external_process_importer_client.cc |
index 40dc35f02390280c32cd9ee3095a01b59cdee2ac..55826e388bae9f52c631113b41498a0aa1719ce7 100644 |
--- a/chrome/browser/importer/external_process_importer_client.cc |
+++ b/chrome/browser/importer/external_process_importer_client.cc |
@@ -30,7 +30,6 @@ ExternalProcessImporterClient::ExternalProcessImporterClient( |
total_history_rows_count_(0), |
total_favicons_count_(0), |
process_importer_host_(importer_host), |
- utility_process_host_(NULL), |
source_profile_(source_profile), |
items_(items), |
bridge_(bridge), |
@@ -75,7 +74,8 @@ void ExternalProcessImporterClient::Start() { |
void ExternalProcessImporterClient::StartProcessOnIOThread( |
BrowserThread::ID thread_id) { |
- utility_process_host_ = new UtilityProcessHost(this, thread_id); |
+ utility_process_host_ = |
+ (new UtilityProcessHost(this, thread_id))->AsWeakPtr(); |
utility_process_host_->set_no_sandbox(true); |
#if defined(OS_MACOSX) |
@@ -128,7 +128,6 @@ void ExternalProcessImporterClient::Cancel() { |
} |
void ExternalProcessImporterClient::OnProcessCrashed(int exit_code) { |
- utility_process_host_ = NULL; |
if (cancelled_) |
return; |