diff options
author | sanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-08 20:43:10 +0000 |
---|---|---|
committer | sanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-08 20:43:10 +0000 |
commit | 5bba4dd3a7ad928f6c8a58aea8d716605eec285a (patch) | |
tree | d0c0d09ac2c3a7fb4e018fb7a9ec27c604368014 /chrome/browser/sync/notifier | |
parent | 3bec852e947f05de1516ef67c39e83881e3a8e2b (diff) | |
download | chromium_src-5bba4dd3a7ad928f6c8a58aea8d716605eec285a.zip chromium_src-5bba4dd3a7ad928f6c8a58aea8d716605eec285a.tar.gz chromium_src-5bba4dd3a7ad928f6c8a58aea8d716605eec285a.tar.bz2 |
Fixed memory leak in sync notifier unit tests caused by my previous CL.
BUG=78786
TEST=Valgrind bots
Review URL: http://codereview.chromium.org/6810039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80983 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/notifier')
-rw-r--r-- | chrome/browser/sync/notifier/non_blocking_invalidation_notifier_unittest.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/sync/notifier/non_blocking_invalidation_notifier_unittest.cc b/chrome/browser/sync/notifier/non_blocking_invalidation_notifier_unittest.cc index 87405d9..5fec4ee 100644 --- a/chrome/browser/sync/notifier/non_blocking_invalidation_notifier_unittest.cc +++ b/chrome/browser/sync/notifier/non_blocking_invalidation_notifier_unittest.cc @@ -41,7 +41,13 @@ class NonBlockingInvalidationNotifierTest : public testing::Test { virtual void TearDown() { invalidation_notifier_->RemoveObserver(&mock_observer_); invalidation_notifier_.reset(); - request_context_getter_ = NULL; + { + // The request context getter gets deleted on the I/O thread. To prevent a + // leak supply one here. + BrowserThread io_thread(BrowserThread::IO, MessageLoop::current()); + request_context_getter_ = NULL; + } + MessageLoop::current()->RunAllPending(); } MessageLoop message_loop_; |