Chromium Code Reviews| Index: chrome/browser/nacl_host/nacl_process_host.cc |
| diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/chrome/browser/nacl_host/nacl_process_host.cc |
| index ba2fa93178102683f26eee6a3db1bf02a84619b0..243ef351f0775190b8733f8f7ec98cc214914bd0 100644 |
| --- a/chrome/browser/nacl_host/nacl_process_host.cc |
| +++ b/chrome/browser/nacl_host/nacl_process_host.cc |
| @@ -227,9 +227,11 @@ bool NaClProcessHost::Launch( |
| if (!LaunchSelLdr()) { |
| return false; |
| } |
| + |
| chrome_render_message_filter_ = chrome_render_message_filter; |
| - reply_msg_ = reply_msg; |
| + // On success, we take responsibility for sending the reply. |
| + reply_msg_ = reply_msg; |
| return true; |
| } |
| @@ -383,8 +385,10 @@ void NaClProcessHost::OnProcessLaunched() { |
| SendStart(nacl_browser->IrtFile()); |
| } else { |
| // We're waiting for the IRT to be open. |
| - nacl_browser->MakeIrtAvailable(base::Bind(&NaClProcessHost::IrtReady, |
| - weak_factory_.GetWeakPtr())); |
| + if (!nacl_browser->MakeIrtAvailable( |
| + base::Bind(&NaClProcessHost::IrtReady, |
| + weak_factory_.GetWeakPtr()))) |
| + delete this; |
|
dmichael (off chromium)
2011/12/20 19:01:34
I'm a little uneasy about "delete this" here, espe
brettw
2011/12/21 22:06:54
Sorry this shouldn't have been in this CL (got two
|
| } |
| } |