Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: mojo/shell/context.cc

Issue 420143003: mojo: shell::Context should outlive the shell MessageLoop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/shell/context.cc
diff --git a/mojo/shell/context.cc b/mojo/shell/context.cc
index 159e3230d5236cac5a603e8d8ead01ecc935dbf0..0810a17a6bf0787131c296fb23d43e240994311f 100644
--- a/mojo/shell/context.cc
+++ b/mojo/shell/context.cc
@@ -83,9 +83,12 @@ class Context::NativeViewportServiceLoader : public ServiceLoader {
DISALLOW_COPY_AND_ASSIGN(NativeViewportServiceLoader);
};
-Context::Context()
- : task_runners_(base::MessageLoop::current()->message_loop_proxy()) {
+Context::Context() {}
jamesr 2014/07/28 20:11:27 could you DCHECK that base::MessageLoop::current()
tim (not reviewing) 2014/07/28 22:16:37 Good idea. Done.
+
+void Context::Init() {
setup.Get();
+ task_runners_.reset(
+ new TaskRunners(base::MessageLoop::current()->message_loop_proxy()));
for (size_t i = 0; i < arraysize(kLocalMojoURLs); ++i)
mojo_url_resolver_.AddLocalFileMapping(GURL(kLocalMojoURLs[i]));

Powered by Google App Engine
This is Rietveld 408576698