Index: chrome/common/service_process_util_win.cc |
diff --git a/chrome/common/service_process_util_win.cc b/chrome/common/service_process_util_win.cc |
index 32581a1f40fe35a67d89e97940a56c80a43396d9..a6385e23a2e220386c5868ab1d25c5802c57c21c 100644 |
--- a/chrome/common/service_process_util_win.cc |
+++ b/chrome/common/service_process_util_win.cc |
@@ -128,12 +128,13 @@ bool ServiceProcessState::SignalReady( |
base::MessageLoopProxy* message_loop_proxy, Task* shutdown_task) { |
DCHECK(state_); |
DCHECK(state_->ready_event.IsValid()); |
+ scoped_ptr<Task> scoped_shutdown_task(shutdown_task); |
if (!SetEvent(state_->ready_event.Get())) { |
return false; |
} |
if (shutdown_task) { |
state_->shutdown_monitor.reset( |
- new ServiceProcessShutdownMonitor(shutdown_task)); |
+ new ServiceProcessShutdownMonitor(scoped_shutdown_task.release())); |
state_->shutdown_monitor->Start(); |
} |
return true; |