diff options
author | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-08 21:46:07 +0000 |
---|---|---|
committer | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-08 21:46:07 +0000 |
commit | 110d17e4177fa9cfd15c70f6f21ee9fcb2b9c12c (patch) | |
tree | 68516502ae3f804dfb34923e33779779e3b6c562 /chrome/browser/browser_main.cc | |
parent | 9b407925feb1e05b4e276af32b95bef4abef3a6b (diff) | |
download | chromium_src-110d17e4177fa9cfd15c70f6f21ee9fcb2b9c12c.zip chromium_src-110d17e4177fa9cfd15c70f6f21ee9fcb2b9c12c.tar.gz chromium_src-110d17e4177fa9cfd15c70f6f21ee9fcb2b9c12c.tar.bz2 |
Revert 100254 - CrOS - Fix use-after-free in OomPriorityManager on shutdown
OomPriorityManager was being deleted during shutdown while a task was pending on the IO thread. Convert it to a singleton and explicitly start and stop it in the main loop.
BUG=chromium-os:18375
TEST=Open 3 tabs and navigate to web pages, wait 10 seconds, then open a tab to "about:discards". It should list 3 tabs and itself. Order is unimportant for now. Also, valgrind less red.
Review URL: http://codereview.chromium.org/7859006
TBR=jamescook@chromium.org
Review URL: http://codereview.chromium.org/7861011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100259 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r-- | chrome/browser/browser_main.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index a8762b0..c199682 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -1713,7 +1713,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunInternal() { // until here to start so that we give the most amount of time for // the other services to start up before we start adjusting the oom // priority. - browser::OomPriorityManager::GetInstance()->Start(); + browser::OomPriorityManager::Create(); #endif // Create the instance of the cloud print proxy service so that it can launch @@ -1871,7 +1871,7 @@ void ChromeBrowserMainParts::PostMainMessageLoopRun() { #endif #if defined(OS_CHROMEOS) - browser::OomPriorityManager::GetInstance()->Stop(); + browser::OomPriorityManager::Destroy(); #endif // Some tests don't set parameters.ui_task, so they started translate |