diff options
author | jam <jam@chromium.org> | 2015-11-11 13:18:12 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-11 21:19:02 +0000 |
commit | f891c96222c67b799dbf8e797aee9ec82d3a2ff7 (patch) | |
tree | a5373d49cc40616a52fa2b35295fd99deed33fa4 /mandoline | |
parent | 4744642adb27d4c27a8a0cd0e55e1fbeffc9803b (diff) | |
download | chromium_src-f891c96222c67b799dbf8e797aee9ec82d3a2ff7.zip chromium_src-f891c96222c67b799dbf8e797aee9ec82d3a2ff7.tar.gz chromium_src-f891c96222c67b799dbf8e797aee9ec82d3a2ff7.tar.bz2 |
Fix tracing message pipe outliving the IO thread.
MessagePipeDispatcher's close methods posts a task to the IO thread to destruct the RawChannel (with the new EDK). This means that we need to ensure that Tracer is destructed before the IO thread.
I've moved the initialization of tracing to inside Context to reduce code duplication.
BUG=478251
Review URL: https://codereview.chromium.org/1437963002
Cr-Commit-Position: refs/heads/master@{#359156}
Diffstat (limited to 'mandoline')
-rw-r--r-- | mandoline/app/desktop/launcher_process.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mandoline/app/desktop/launcher_process.cc b/mandoline/app/desktop/launcher_process.cc index 6cec880..5a94a32 100644 --- a/mandoline/app/desktop/launcher_process.cc +++ b/mandoline/app/desktop/launcher_process.cc @@ -21,7 +21,6 @@ #include "mandoline/app/desktop/launcher_process.h" #include "mojo/runner/context.h" #include "mojo/runner/switches.h" -#include "mojo/runner/tracer.h" #include "mojo/shell/switches.h" namespace mandoline { @@ -46,13 +45,12 @@ int LauncherProcessMain(int argc, char** argv) { // We want the runner::Context to outlive the MessageLoop so that pipes are // all gracefully closed / error-out before we try to shut the Context down. - base::FilePath shell_dir; - PathService::Get(base::DIR_MODULE, &shell_dir); - mojo::runner::Context shell_context(shell_dir, &tracer); + mojo::runner::Context shell_context; { base::MessageLoop message_loop; - tracer.DidCreateMessageLoop(); - if (!shell_context.Init()) { + base::FilePath shell_dir; + PathService::Get(base::DIR_MODULE, &shell_dir); + if (!shell_context.Init(shell_dir)) { return 0; } |