summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extensions_service_unittest.cc
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-09 20:08:34 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-09 20:08:34 +0000
commit0e7a02bf814bf5a548e1d846f58fc614c449e31a (patch)
treeae1bd8ba85a3df6d50503f9708e036fe82e1491a /chrome/browser/extensions/extensions_service_unittest.cc
parent643f72d697f41ce192c17efcec403ec12b827b8f (diff)
downloadchromium_src-0e7a02bf814bf5a548e1d846f58fc614c449e31a.zip
chromium_src-0e7a02bf814bf5a548e1d846f58fc614c449e31a.tar.gz
chromium_src-0e7a02bf814bf5a548e1d846f58fc614c449e31a.tar.bz2
Fix a memory leak in ExtensionsServiceTest by ensuring that the message loop
runs after destroying the ExtensionsService. TEST=none BUG=none Review URL: http://codereview.chromium.org/381006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31464 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extensions_service_unittest.cc')
-rw-r--r--chrome/browser/extensions/extensions_service_unittest.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extensions_service_unittest.cc b/chrome/browser/extensions/extensions_service_unittest.cc
index aa38fe6..63a12a2 100644
--- a/chrome/browser/extensions/extensions_service_unittest.cc
+++ b/chrome/browser/extensions/extensions_service_unittest.cc
@@ -209,6 +209,13 @@ class ExtensionsServiceTest
NotificationService::AllSources());
}
+ ~ExtensionsServiceTest() {
+ // Drop our reference to ExtensionsService now, so that it can be destroyed
+ // while ChromeThreads and MessageLoop are still around (they are used
+ // in the ExtensionsService destruction process).
+ service_ = NULL;
+ }
+
virtual void InitializeExtensionsService(const FilePath& pref_file,
const FilePath& extensions_install_dir) {
prefs_.reset(new PrefService(pref_file));