OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stdio.h> | 5 #include <stdio.h> |
6 #include <string.h> | 6 #include <string.h> |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <iostream> | 9 #include <iostream> |
10 | 10 |
11 #include "base/base_switches.h" | 11 #include "base/base_switches.h" |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/debug/stack_trace.h" |
14 #include "base/files/file_util.h" | 15 #include "base/files/file_util.h" |
15 #include "base/message_loop/message_loop.h" | 16 #include "base/message_loop/message_loop.h" |
16 #include "base/path_service.h" | 17 #include "base/path_service.h" |
17 #include "base/synchronization/waitable_event.h" | 18 #include "base/synchronization/waitable_event.h" |
18 #include "base/threading/platform_thread.h" | 19 #include "base/threading/platform_thread.h" |
19 #include "mojo/runner/context.h" | 20 #include "mojo/runner/context.h" |
20 #include "mojo/runner/switches.h" | 21 #include "mojo/runner/switches.h" |
21 #include "mojo/shell/switches.h" | 22 #include "mojo/shell/switches.h" |
22 | 23 |
23 namespace mojo { | 24 namespace mojo { |
24 namespace runner { | 25 namespace runner { |
25 | 26 |
26 int LauncherProcessMain(const GURL& mojo_url, const base::Closure& callback) { | 27 int LauncherProcessMain(const GURL& mojo_url, const base::Closure& callback) { |
| 28 #if !defined(OFFICIAL_BUILD) |
| 29 base::debug::EnableInProcessStackDumping(); |
| 30 #endif |
27 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 31 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
28 if (!command_line->HasSwitch(switches::kMojoSingleProcess) && | 32 if (!command_line->HasSwitch(switches::kMojoSingleProcess) && |
29 !command_line->HasSwitch("gtest_list_tests")) | 33 !command_line->HasSwitch("gtest_list_tests")) |
30 command_line->AppendSwitch(switches::kEnableMultiprocess); | 34 command_line->AppendSwitch(switches::kEnableMultiprocess); |
31 command_line->AppendSwitch("use-new-edk"); | 35 command_line->AppendSwitch("use-new-edk"); |
32 // http://crbug.com/546644 | 36 // http://crbug.com/546644 |
33 command_line->AppendSwitch(switches::kMojoNoSandbox); | 37 command_line->AppendSwitch(switches::kMojoNoSandbox); |
34 | 38 |
35 base::PlatformThread::SetName("mojo_runner"); | 39 base::PlatformThread::SetName("mojo_runner"); |
36 | 40 |
(...skipping 22 matching lines...) Expand all Loading... |
59 | 63 |
60 // Must be called before |message_loop| is destroyed. | 64 // Must be called before |message_loop| is destroyed. |
61 shell_context.Shutdown(); | 65 shell_context.Shutdown(); |
62 } | 66 } |
63 | 67 |
64 return 0; | 68 return 0; |
65 } | 69 } |
66 | 70 |
67 } // namespace runner | 71 } // namespace runner |
68 } // namespace mojo | 72 } // namespace mojo |
OLD | NEW |