| 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
|
|
|