diff options
author | sadrul <sadrul@chromium.org> | 2015-08-06 22:25:10 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-07 05:25:58 +0000 |
commit | 679eb98faedae0b02df52e287e8180728f0b0fbd (patch) | |
tree | 338ee8c4ef6d7eb4434717ae9243a664d95fa615 /content/browser/browser_main_loop.cc | |
parent | d9c347b62ded29ffb33cc864dc44fc60a0708539 (diff) | |
download | chromium_src-679eb98faedae0b02df52e287e8180728f0b0fbd.zip chromium_src-679eb98faedae0b02df52e287e8180728f0b0fbd.tar.gz chromium_src-679eb98faedae0b02df52e287e8180728f0b0fbd.tar.bz2 |
aura: Sanitize the lifetime of aura::Env instance.
Currently, the aura::Env instance is created and/or destroyed from unexpected
places (e.g. WebContentsViewAura), and that makes it difficult to reason about
its lifetime. This patch tries to make this better. Notable changes:
. Instead of having the ash::Shell instance be responsible for creating the
aura::Env instance, make the creator of the Shell instance be responsible for
also creating the aura::Env instance.
. Individual TestSuite instances are responsible for managing the aura::Env
instance for the tests (content::UnitTestTestSuite, ash::AuraShellTestSuite)
. For chrome and browser-tests, the browser main-loop is responsible for
managing the aura::Env instance.
. For interactive-ui-tests that do not use the browser main-loop, each test
explicitly manages its aura::Env instance.
BUG=515031, 516898
TBR=avi@ for trivial change in content/browser/
Review URL: https://codereview.chromium.org/1270173004
Cr-Commit-Position: refs/heads/master@{#342300}
Diffstat (limited to 'content/browser/browser_main_loop.cc')
-rw-r--r-- | content/browser/browser_main_loop.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc index 70f474c..a8ec5ae 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc @@ -923,6 +923,10 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() { parts_->PostMainMessageLoopRun(); } +#if defined(USE_AURA) + aura::Env::DeleteInstance(); +#endif + trace_memory_controller_.reset(); system_stats_monitor_.reset(); |