summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_message_service.cc
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-02 22:57:02 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-02 22:57:02 +0000
commit54260fc80a2150e95646b15d12b2a415037dd028 (patch)
tree1a183d0d0de309f29264d49368d820ba91ff0f0e /chrome/browser/extensions/extension_message_service.cc
parentbcd0234ff7b8c0e8628663b45ca98f8be306e756 (diff)
downloadchromium_src-54260fc80a2150e95646b15d12b2a415037dd028.zip
chromium_src-54260fc80a2150e95646b15d12b2a415037dd028.tar.gz
chromium_src-54260fc80a2150e95646b15d12b2a415037dd028.tar.bz2
Fix leaking ExtensionMessageService in ProfileManagerTest.
BUG=28824 TEST=tools/valgrind/chrome_tests.sh -t unit --gtest_filter=ProfileManagerTest.CreateProfile Review URL: http://codereview.chromium.org/455031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33611 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_message_service.cc')
-rw-r--r--chrome/browser/extensions/extension_message_service.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/chrome/browser/extensions/extension_message_service.cc b/chrome/browser/extensions/extension_message_service.cc
index ae43bd6..5aaeb73 100644
--- a/chrome/browser/extensions/extension_message_service.cc
+++ b/chrome/browser/extensions/extension_message_service.cc
@@ -115,11 +115,6 @@ ExtensionMessageService::ExtensionMessageService(Profile* profile)
: profile_(profile),
extension_devtools_manager_(NULL),
next_port_id_(0) {
- if (!ChromeThread::GetCurrentThreadIdentifier(&thread_id_)) {
- // If we get created in unit test, GetCurrentThreadIdentifier fails.
- // Assign thread_id_ to an ID not used.
- thread_id_ = ChromeThread::ID_COUNT;
- }
registrar_.Add(this, NotificationType::RENDERER_PROCESS_TERMINATED,
NotificationService::AllSources());
registrar_.Add(this, NotificationType::RENDERER_PROCESS_CLOSED,
@@ -138,8 +133,7 @@ ExtensionMessageService::~ExtensionMessageService() {
void ExtensionMessageService::ProfileDestroyed() {
profile_ = NULL;
if (!registrar_.IsEmpty()) {
- if (thread_id_ != ChromeThread::ID_COUNT)
- CHECK(ChromeThread::CurrentlyOn(thread_id_));
+ CHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
registrar_.RemoveAll();
}
}