Index: shell/desktop/main.cc |
diff --git a/shell/desktop/main.cc b/shell/desktop/main.cc |
index 801574d0b9e99c876ff8fb70e9563c9e0b2142df..6139245aa70c35847f95b86bf2d10b37aa905203 100644 |
--- a/shell/desktop/main.cc |
+++ b/shell/desktop/main.cc |
@@ -91,14 +91,9 @@ int main(int argc, char** argv) { |
// We want the shell::Context to outlive the MessageLoop so that pipes are all |
// gracefully closed / error-out before we try to shut the Context down. |
- shell::Context shell_context; |
+ shell::Context shell_context(&tracer); |
{ |
base::MessageLoop message_loop; |
- if (!shell_context.Init()) { |
- Usage(); |
- return 1; |
- } |
- |
if (trace_startup) { |
message_loop.PostDelayedTask( |
FROM_HERE, base::Bind(&shell::Tracer::StopAndFlushToFile, |
@@ -106,6 +101,11 @@ int main(int argc, char** argv) { |
base::TimeDelta::FromSeconds(5)); |
} |
+ if (!shell_context.Init()) { |
viettrungluu
2015/04/27 17:04:11
I don't know if the sketchy failure case is compat
jamesr
2015/04/27 23:46:57
I think it's OK - even here the message_loop goes
|
+ Usage(); |
+ return 1; |
+ } |
+ |
// The mojo_shell --args-for command-line switch is handled specially |
// because it can appear more than once. The base::CommandLine class |
// collapses multiple occurrences of the same switch. |