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

Unified Diff: mojo/public/cpp/environment/lib/environment.cc

Issue 694923002: Update mojo sdk to rev 91d94d6993c9b0c4135a95687a7d541ce90629b (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « mojo/public/cpp/environment/environment.h ('k') | mojo/public/js/bindings/connection.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/environment/lib/environment.cc
diff --git a/mojo/public/cpp/environment/lib/environment.cc b/mojo/public/cpp/environment/lib/environment.cc
index 92f31ed345ee628222d280634d88f49eacb8d655..6fb7e22a2204ef57185897050d743391b5a1684a 100644
--- a/mojo/public/cpp/environment/lib/environment.cc
+++ b/mojo/public/cpp/environment/lib/environment.cc
@@ -61,4 +61,20 @@ const MojoLogger* Environment::GetDefaultLogger() {
return g_default_logger;
}
+// static
+void Environment::InstantiateDefaultRunLoop() {
+ assert(!RunLoop::current());
+ // Not leaked: accessible from |RunLoop::current()|.
+ RunLoop* run_loop = new RunLoop();
+ MOJO_ALLOW_UNUSED_LOCAL(run_loop);
+ assert(run_loop == RunLoop::current());
+}
+
+// static
+void Environment::DestroyDefaultRunLoop() {
+ assert(RunLoop::current());
+ delete RunLoop::current();
+ assert(!RunLoop::current());
+}
+
} // namespace mojo
« no previous file with comments | « mojo/public/cpp/environment/environment.h ('k') | mojo/public/js/bindings/connection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698