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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 9936002: Added code so renderer would cleanly exit. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased again. Created 8 years, 8 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
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 9acb852dff0cea06f7e4d1860194f8ab719217bf..65ec07603e3ca00915006719136a1eab7ba1d1e5 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -196,8 +196,15 @@ class SuicideOnChannelErrorFilter : public IPC::ChannelProxy::MessageFilter {
//
// So, we install a filter on the channel so that we can process this event
// here and kill the process.
-
- _exit(0);
+ //
+ // We want to kill this process after giving it 30 seconds to run the exit
+ // handlers. SIGALRM has a default disposition of terminating the
+ // application.
+ if (CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kRendererCleanExit))
Markus (顧孟勤) 2012/04/09 23:45:46 I am sure, I am just confused here. Shouldn't we b
asharif1 2012/04/10 03:08:00 As far as I understand, that variable is set in th
+ alarm(30);
+ else
+ _exit(0);
}
};
#endif // OS_POSIX
« content/public/common/content_switches.cc ('K') | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698