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

Unified Diff: content/browser/browser_child_process_host.cc

Issue 8776041: Fix use-after-free. OnChildDied deletes the current object, so we shouldn't call member functions... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_child_process_host.cc
===================================================================
--- content/browser/browser_child_process_host.cc (revision 112509)
+++ content/browser/browser_child_process_host.cc (working copy)
@@ -228,9 +228,11 @@
unsigned long exit_code = 0;
GetExitCodeProcess(waitable_event->Release(), &exit_code);
delete waitable_event;
- if (exit_code == STILL_ACTIVE)
+ if (exit_code == STILL_ACTIVE) {
OnChildDied();
- BrowserChildProcessHost::OnChildDisconnected();
+ } else {
+ BrowserChildProcessHost::OnChildDisconnected();
+ }
#endif
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698