From 16d5c7b1ccb4470664234c829b4fe25b088ed077 Mon Sep 17 00:00:00 2001 From: "hbono@chromium.org" Date: Thu, 21 Oct 2010 03:07:09 +0000 Subject: Cleans up the cached resources on valgrind. The valgrind bots sometimes report the leaks of our cached resources. To fix these occasional leaks, this change cleans up all the cached resources of both our test shell and DumpRenderTree when they run on valgrind. BUG=31800 TEST=make the "WebKit Linux (valgrind layout)" bot greener. Review URL: http://codereview.chromium.org/3861002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63319 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/support/test_webkit_client.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'webkit/support') diff --git a/webkit/support/test_webkit_client.cc b/webkit/support/test_webkit_client.cc index 65897f4..5c46cf8 100644 --- a/webkit/support/test_webkit_client.cc +++ b/webkit/support/test_webkit_client.cc @@ -14,6 +14,7 @@ #include "net/http/http_cache.h" #include "net/test/test_server.h" #include "media/base/media.h" +#include "third_party/WebKit/WebKit/chromium/public/WebCache.h" #include "third_party/WebKit/WebKit/chromium/public/WebData.h" #include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h" #include "third_party/WebKit/WebKit/chromium/public/WebFileSystem.h" @@ -142,6 +143,8 @@ TestWebKitClient::TestWebKitClient(bool unit_test_mode) } TestWebKitClient::~TestWebKitClient() { + if (RunningOnValgrind()) + WebKit::WebCache::clear(); WebKit::shutdown(); } -- cgit v1.1