Index: shell/context.cc |
diff --git a/shell/context.cc b/shell/context.cc |
index c10841c221271419f0fe99dec0dfe86eaaee3606..f04289ce297569aa30ba4ad006b06b11a48b3d5f 100644 |
--- a/shell/context.cc |
+++ b/shell/context.cc |
@@ -6,6 +6,7 @@ |
#include <vector> |
+#include "base/base_switches.h" |
#include "base/bind.h" |
#include "base/command_line.h" |
#include "base/files/file_path.h" |
@@ -142,6 +143,11 @@ void Context::EnsureEmbedderIsInitialized() { |
} |
bool Context::Init() { |
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
+ |
+ if (command_line->HasSwitch(switches::kWaitForDebugger)) |
+ base::debug::WaitForDebugger(60, true); |
+ |
EnsureEmbedderIsInitialized(); |
task_runners_.reset( |
new TaskRunners(base::MessageLoop::current()->message_loop_proxy())); |
@@ -149,8 +155,6 @@ bool Context::Init() { |
for (size_t i = 0; i < arraysize(kLocalMojoURLs); ++i) |
mojo_url_resolver_.AddLocalFileMapping(GURL(kLocalMojoURLs[i])); |
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
- |
if (command_line->HasSwitch(switches::kEnableExternalApplications)) { |
listener_ = ExternalApplicationListener::Create( |
task_runners_->shell_runner(), task_runners_->io_runner()); |