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

Unified Diff: remoting/host/desktop_process.cc

Issue 12545006: The worker process launcher can now ask the worker to crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 9 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 | « remoting/host/desktop_process.h ('k') | remoting/host/desktop_process_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_process.cc
diff --git a/remoting/host/desktop_process.cc b/remoting/host/desktop_process.cc
index f740a2bf909dc893357cd7ed1c58234711638f5b..9e2fc751e723f3af05a657860a0bef1f555f0ef2 100644
--- a/remoting/host/desktop_process.cc
+++ b/remoting/host/desktop_process.cc
@@ -9,9 +9,11 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/debug/alias.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop.h"
+#include "base/string_util.h"
#include "ipc/ipc_channel_proxy.h"
#include "remoting/base/auto_thread.h"
#include "remoting/base/auto_thread_task_runner.h"
@@ -58,7 +60,7 @@ bool DesktopProcess::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(DesktopProcess, message)
- IPC_MESSAGE_HANDLER(ChromotingDaemonDesktopMsg_Crash, OnCrash)
+ IPC_MESSAGE_HANDLER(ChromotingDaemonMsg_Crash, OnCrash)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -149,8 +151,14 @@ bool DesktopProcess::Start(
void DesktopProcess::OnCrash(const std::string& function_name,
const std::string& file_name,
const int& line_number) {
+ char message[1024];
+ base::snprintf(message, sizeof(message),
+ "Requested by %s at %s, line %d.",
+ function_name.c_str(), file_name.c_str(), line_number);
+ base::debug::Alias(message);
+
// The daemon requested us to crash the process.
- CHECK(false);
+ CHECK(false) << message;
}
} // namespace remoting
« no previous file with comments | « remoting/host/desktop_process.h ('k') | remoting/host/desktop_process_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698