summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_thread_unittest.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-02 21:39:30 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-02 21:39:30 +0000
commita63424d0df79fc6d6742b1670b15985a0acc2efe (patch)
treecda8b79e8a8de8d6aea817cfb3f3f0d60d935af5 /chrome/renderer/render_thread_unittest.cc
parent904998f9e92fddea3bb8acf7580524b5aa4bf04d (diff)
downloadchromium_src-a63424d0df79fc6d6742b1670b15985a0acc2efe.zip
chromium_src-a63424d0df79fc6d6742b1670b15985a0acc2efe.tar.gz
chromium_src-a63424d0df79fc6d6742b1670b15985a0acc2efe.tar.bz2
Fix the IPC::SyncChannel leaks with RenderThread in the callstack. This works by emptying the IPC message loop of its tasks, which frees the SyncContext object. After this is checked in, I'll keep an eye to see if the same thing needs to be done for the SyncChannel tests (they seem to not be generating errors, from looking at the last dozen runs).
Review URL: http://codereview.chromium.org/28307 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10727 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_thread_unittest.cc')
-rw-r--r--chrome/renderer/render_thread_unittest.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/renderer/render_thread_unittest.cc b/chrome/renderer/render_thread_unittest.cc
index 3d09c51..808bedf 100644
--- a/chrome/renderer/render_thread_unittest.cc
+++ b/chrome/renderer/render_thread_unittest.cc
@@ -24,13 +24,13 @@ class RenderThreadTest : public testing::Test {
virtual void TearDown() {
message_loop_.RunAllPending();
mock_process_.reset();
+ // Need to fully destruct IPC::SyncChannel before the message loop goes
+ // away.
+ message_loop_.RunAllPending();
// Delete the server channel after the RenderThread so that
// IPC::SyncChannel's OnChannelError doesn't fire on the context and attempt
// to use the listener thread which is now gone.
delete channel_;
- // Need to fully destruct IPC::SyncChannel before the message loop goes
- // away.
- message_loop_.RunAllPending();
}
protected: