summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/test_shell_webkit_init.cc
diff options
context:
space:
mode:
authorhbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-21 03:07:09 +0000
committerhbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-21 03:07:09 +0000
commit16d5c7b1ccb4470664234c829b4fe25b088ed077 (patch)
tree309efd6e4497f0b51bbcdbf62ea6dff66e20f93d /webkit/tools/test_shell/test_shell_webkit_init.cc
parent3119c54b4adbdf49882058d57720507a23f0cd1d (diff)
downloadchromium_src-16d5c7b1ccb4470664234c829b4fe25b088ed077.zip
chromium_src-16d5c7b1ccb4470664234c829b4fe25b088ed077.tar.gz
chromium_src-16d5c7b1ccb4470664234c829b4fe25b088ed077.tar.bz2
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
Diffstat (limited to 'webkit/tools/test_shell/test_shell_webkit_init.cc')
-rw-r--r--webkit/tools/test_shell/test_shell_webkit_init.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/test_shell_webkit_init.cc b/webkit/tools/test_shell/test_shell_webkit_init.cc
index afae8f2..1d93416 100644
--- a/webkit/tools/test_shell/test_shell_webkit_init.cc
+++ b/webkit/tools/test_shell/test_shell_webkit_init.cc
@@ -7,6 +7,7 @@
#include "base/metrics/stats_counters.h"
#include "base/path_service.h"
#include "media/base/media.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebCache.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRuntimeFeatures.h"
@@ -78,6 +79,8 @@ TestShellWebKitInit::TestShellWebKitInit(bool layout_test_mode) {
}
TestShellWebKitInit::~TestShellWebKitInit() {
+ if (RunningOnValgrind())
+ WebKit::WebCache::clear();
WebKit::shutdown();
}