Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Unified Diff: chrome/browser/browser_child_process_host.h

Issue 3386014: This adds some plumbing for propagating the status and error code of a (Closed)
Patch Set: Fixed Mac code to handle both SEGV and BUS Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/process_util_win.cc ('k') | chrome/browser/browser_child_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_child_process_host.h
diff --git a/chrome/browser/browser_child_process_host.h b/chrome/browser/browser_child_process_host.h
index cf30973fb2855d1c18c55cf863163bd5a672fb41..9d343d0936399bfe45f5e0d1a581f3713ab2397b 100644
--- a/chrome/browser/browser_child_process_host.h
+++ b/chrome/browser/browser_child_process_host.h
@@ -74,12 +74,25 @@ class BrowserChildProcessHost : public ResourceDispatcherHost::Receiver,
CommandLine* cmd_line);
// ChildProcessLauncher::Client implementation.
- virtual void OnProcessLaunched() { }
+ virtual void OnProcessLaunched() {}
// Derived classes can override this to know if the process crashed.
- virtual void OnProcessCrashed() {}
-
- virtual bool DidChildCrash();
+ // |exit_code| is the status returned when the process crashed (for
+ // posix, as returned from waitpid(), for Windows, as returned from
+ // GetExitCodeProcess()).
+ virtual void OnProcessCrashed(int exit_code) {}
+
+ // Derived classes can override this to know if the process was
+ // killed. |exit_code| is the status returned when the process
+ // was killed (for posix, as returned from waitpid(), for Windows,
+ // as returned from GetExitCodeProcess()).
+ virtual void OnProcessWasKilled(int exit_code) {}
+
+ // Returns the termination status of a child. |exit_code| is the
+ // status returned when the process exited (for posix, as returned
+ // from waitpid(), for Windows, as returned from
+ // GetExitCodeProcess()). |exit_code| may be NULL.
+ virtual base::TerminationStatus GetChildTerminationStatus(int* exit_code);
// Overrides from ChildProcessHost
virtual void OnChildDied();
@@ -107,4 +120,3 @@ class BrowserChildProcessHost : public ResourceDispatcherHost::Receiver,
};
#endif // CHROME_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_
-
« no previous file with comments | « base/process_util_win.cc ('k') | chrome/browser/browser_child_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698