diff options
Diffstat (limited to 'chrome/browser/nacl_host/nacl_process_host.cc')
-rw-r--r-- | chrome/browser/nacl_host/nacl_process_host.cc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/chrome/browser/nacl_host/nacl_process_host.cc index 2648b3e..0310e39 100644 --- a/chrome/browser/nacl_host/nacl_process_host.cc +++ b/chrome/browser/nacl_host/nacl_process_host.cc @@ -117,10 +117,19 @@ void NaClProcessHost::OnProcessLaunchedByBroker(base::ProcessHandle handle) { OnProcessLaunched(); } -bool NaClProcessHost::DidChildCrash() { - if (running_on_wow64_) - return base::DidProcessCrash(NULL, handle()); - return ChildProcessHost::DidChildCrash(); +void NaClProcessHost::DetermineDidChildCrash() { + // Either of these paths will lead to deleting this object in + // OnDidProcessCrashDetermined in ChildProcessHost, so they should be the + // last calls in this method. + if (running_on_wow64_) { + bool did_crash = base::DidProcessCrash(NULL, handle()); + OnDidProcessCrashDetermined(did_crash); + } else { + // Determine whether the process crashed or not. This method will invoke + // OnDidProcessCrashDetermined with the result. This may occur + // asynchronously. + ChildProcessHost::DetermineDidChildCrash(); + } } void NaClProcessHost::OnChildDied() { |