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

Unified Diff: ui/views/examples/examples_main.cc

Issue 1293013002: aura: Require explicit ownership of the Env instance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 4 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 | « ui/aura/test/run_all_unittests.cc ('k') | ui/views/run_all_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/examples_main.cc
diff --git a/ui/views/examples/examples_main.cc b/ui/views/examples/examples_main.cc
index 1802d0efee55621993dd6e606ce9298d9d4ef8aa..21508922381d3e2c849e41e4227c2a38fc22ce56 100644
--- a/ui/views/examples/examples_main.cc
+++ b/ui/views/examples/examples_main.cc
@@ -80,7 +80,7 @@ int main(int argc, char** argv) {
#endif
#if defined(USE_AURA)
- aura::Env::CreateInstance(true);
+ scoped_ptr<aura::Env> env = aura::Env::CreateInstance();
aura::Env::GetInstance()->set_context_factory(context_factory.get());
#endif
ui::InitializeInputMethodForTesting();
@@ -109,7 +109,7 @@ int main(int argc, char** argv) {
ui::ShutdownInputMethod();
#if defined(USE_AURA)
- aura::Env::DeleteInstance();
+ env.reset();
#endif
return 0;
« no previous file with comments | « ui/aura/test/run_all_unittests.cc ('k') | ui/views/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698