diff options
author | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-21 03:07:09 +0000 |
---|---|---|
committer | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-21 03:07:09 +0000 |
commit | 16d5c7b1ccb4470664234c829b4fe25b088ed077 (patch) | |
tree | 309efd6e4497f0b51bbcdbf62ea6dff66e20f93d /webkit/support | |
parent | 3119c54b4adbdf49882058d57720507a23f0cd1d (diff) | |
download | chromium_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/support')
-rw-r--r-- | webkit/support/test_webkit_client.cc | 3 |
1 files changed, 3 insertions, 0 deletions
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(); } |