Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2366)

Unified Diff: chrome/browser/sync/profile_sync_service_unittest.cc

Issue 353011: Fix mem leak in sync tests by ensuring that the destruction tasks get to run.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_service_unittest.cc
===================================================================
--- chrome/browser/sync/profile_sync_service_unittest.cc (revision 30691)
+++ chrome/browser/sync/profile_sync_service_unittest.cc (working copy)
@@ -8,6 +8,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "base/command_line.h"
+#include "base/message_loop.h"
#include "base/string_util.h"
#include "base/string16.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
@@ -279,6 +280,9 @@
// Kill the service before the profile.
service_.reset();
profile_.reset();
+
+ // Ensure that the sync objects destruct to avoid memory leaks.
+ MessageLoop::current()->RunAllPending();
tim (not reviewing) 2009/11/03 00:12:11 I'm just a little confused if this works, because
jam 2009/11/03 00:16:13 That's not the task in question. That task alread
}
ModelAssociator* associator() {
« no previous file with comments | « no previous file | tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698