Wait for the debugger as early in process initialization as possible.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1517 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2013-11-12 17:43:39 +00:00
parent 7e1fbaca6a
commit 395f443215

View File

@ -16,8 +16,10 @@
#include "libcef/common/main_delegate.h"
#include "libcef/renderer/content_renderer_client.h"
#include "base/base_switches.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/debug/debugger.h"
#include "base/file_util.h"
#include "base/synchronization/waitable_event.h"
#include "chrome/browser/printing/print_job_manager.h"
@ -66,6 +68,10 @@ int CefExecuteProcess(const CefMainArgs& args,
command_line.InitFromArgv(args.argc, args.argv);
#endif
// Wait for the debugger as early in process initialization as possible.
if (command_line.HasSwitch(switches::kWaitForDebugger))
base::debug::WaitForDebugger(60, true);
// If no process type is specified then it represents the browser process and
// we do nothing.
std::string process_type =