diff options
author | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-30 21:47:05 +0000 |
---|---|---|
committer | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-30 21:47:05 +0000 |
commit | 1302dcf94a00aef4dad3c8bc91b8e808ec7d1c6f (patch) | |
tree | e46e85833f6a6936f697b93d218a092c3edc8115 | |
parent | faaa5a2ac9fbbfd4093bf3d238d59619f8792481 (diff) | |
download | chromium_src-1302dcf94a00aef4dad3c8bc91b8e808ec7d1c6f.zip chromium_src-1302dcf94a00aef4dad3c8bc91b8e808ec7d1c6f.tar.gz chromium_src-1302dcf94a00aef4dad3c8bc91b8e808ec7d1c6f.tar.bz2 |
Fix leak in ProfileInfoCache::SetGAIAPictureOfProfileAtIndex
The problem was that some memory allocated by the file thread wasn't being cleaned up. Fix was to stop the file thread and then process all the pending messages on the UI thread.
BUG=105864
TEST=
Review URL: http://codereview.chromium.org/8745010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112297 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/profiles/profile_info_cache_unittest.cc | 6 | ||||
-rw-r--r-- | chrome/browser/profiles/profile_info_cache_unittest.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/profiles/profile_info_cache_unittest.cc b/chrome/browser/profiles/profile_info_cache_unittest.cc index 7969012..a3009c4 100644 --- a/chrome/browser/profiles/profile_info_cache_unittest.cc +++ b/chrome/browser/profiles/profile_info_cache_unittest.cc @@ -36,6 +36,12 @@ void ProfileInfoCacheTest::SetUp() { ASSERT_TRUE(testing_profile_manager_.SetUp()); } +void ProfileInfoCacheTest::TearDown() { + // Drain the UI thread to make sure all tasks are completed. This prevents + // memory leaks. + ui_loop_.RunAllPending(); +} + ProfileInfoCache* ProfileInfoCacheTest::GetCache() { return testing_profile_manager_.profile_info_cache(); } diff --git a/chrome/browser/profiles/profile_info_cache_unittest.h b/chrome/browser/profiles/profile_info_cache_unittest.h index a1d4485..5c9d354 100644 --- a/chrome/browser/profiles/profile_info_cache_unittest.h +++ b/chrome/browser/profiles/profile_info_cache_unittest.h @@ -19,6 +19,7 @@ class ProfileInfoCacheTest : public testing::Test { virtual ~ProfileInfoCacheTest(); virtual void SetUp() OVERRIDE; + virtual void TearDown() OVERRIDE; ProfileInfoCache* GetCache(); FilePath GetProfilePath(const std::string& base_name); |