summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralbertb@google.com <albertb@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-28 02:32:04 +0000
committeralbertb@google.com <albertb@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-28 02:32:04 +0000
commite84bb36276691c131ce6b549cf8092a31192b4c1 (patch)
tree13efb6427e2da757c58ff02e33d86f21f42f6625
parentdcc31cf95d07914801d5d77b7940d57517a20259 (diff)
downloadchromium_src-e84bb36276691c131ce6b549cf8092a31192b4c1.zip
chromium_src-e84bb36276691c131ce6b549cf8092a31192b4c1.tar.gz
chromium_src-e84bb36276691c131ce6b549cf8092a31192b4c1.tar.bz2
Fix leak in DatabaseWorkerModelTest.
BUG=none TEST=none TBR=tim Review URL: http://codereview.chromium.org/557029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37372 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/sync/glue/database_model_worker_unittest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/sync/glue/database_model_worker_unittest.cc b/chrome/browser/sync/glue/database_model_worker_unittest.cc
index 81c8e67..69ad5ce 100644
--- a/chrome/browser/sync/glue/database_model_worker_unittest.cc
+++ b/chrome/browser/sync/glue/database_model_worker_unittest.cc
@@ -34,10 +34,10 @@ class DatabaseModelWorkerTest : public testing::Test {
// Schedule DoWork to be executed on the DB thread and have the test fail if
// DoWork hasn't executed within 10 seconds.
void ScheduleWork() {
+ scoped_ptr<Closure> c(NewCallback(this, &DatabaseModelWorkerTest::DoWork));
timer()->Start(TimeDelta::FromSeconds(10),
this, &DatabaseModelWorkerTest::Timeout);
- worker()->DoWorkAndWaitUntilDone(
- NewCallback(this, &DatabaseModelWorkerTest::DoWork));
+ worker()->DoWorkAndWaitUntilDone(c.get());
}
// This is the work that will be scheduled to be done on the DB thread.