diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-23 00:20:35 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-23 00:20:35 +0000 |
commit | a63f220009f90657fc1070d4a9bde26726deb6b4 (patch) | |
tree | acc6624e8c28c0221fb6005c0720bf1e3da5ae32 | |
parent | 2dde1b888f43edc846257a38da3eec5c3890c8c5 (diff) | |
download | chromium_src-a63f220009f90657fc1070d4a9bde26726deb6b4.zip chromium_src-a63f220009f90657fc1070d4a9bde26726deb6b4.tar.gz chromium_src-a63f220009f90657fc1070d4a9bde26726deb6b4.tar.bz2 |
Fix a leak that only happens in layout test mode.
MockWebClipboardImpl is only used in layout test mode and it
contains some member variables. Since the destructors weren't
virtual, it was leaking these member variables.
BUG=17184
Review URL: http://codereview.chromium.org/159238
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21354 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | tools/valgrind/memcheck/suppressions.txt | 10 | ||||
-rw-r--r-- | webkit/api/public/WebClipboard.h | 2 | ||||
-rw-r--r-- | webkit/glue/webclipboard_impl.h | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/mock_webclipboard_impl.h | 1 |
4 files changed, 5 insertions, 10 deletions
diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt index 4752d68..26b7fc6 100644 --- a/tools/valgrind/memcheck/suppressions.txt +++ b/tools/valgrind/memcheck/suppressions.txt @@ -904,16 +904,6 @@ fun:_ZN7WebCore5Frame4initEv } { - bug_17184 - Memcheck:Leak - fun:malloc - fun:_ZN3WTF10fastMallocEj - fun:_ZN7WebCore10StringImplnwEj - fun:_ZN7WebCore10StringImpl5adoptERN3WTF6VectorItLj0EEE - fun:_ZN7WebCore12createMarkupEPKNS_5RangeEPN3WTF6VectorIPNS_4NodeELj0EEENS_23EAnnotateForInterchangeEb - fun:_ZN7WebCore10Pasteboard14writeSelectionEPNS_5RangeEbPNS_5FrameE -} -{ bug_17185 Memcheck:Leak fun:malloc diff --git a/webkit/api/public/WebClipboard.h b/webkit/api/public/WebClipboard.h index 6a24012..8830088 100644 --- a/webkit/api/public/WebClipboard.h +++ b/webkit/api/public/WebClipboard.h @@ -46,6 +46,8 @@ namespace WebKit { FormatSmartPaste }; + virtual ~WebClipboard() {} + virtual bool isFormatAvailable(Format) = 0; virtual WebString readPlainText() = 0; diff --git a/webkit/glue/webclipboard_impl.h b/webkit/glue/webclipboard_impl.h index 0813d1d..52762da 100644 --- a/webkit/glue/webclipboard_impl.h +++ b/webkit/glue/webclipboard_impl.h @@ -18,6 +18,8 @@ class WebClipboardImpl : public WebKit::WebClipboard { static std::string URLToImageMarkup(const WebKit::WebURL& url, const WebKit::WebString& title); + virtual ~WebClipboardImpl() {} + // WebClipboard methods: virtual bool isFormatAvailable(WebKit::WebClipboard::Format); virtual WebKit::WebString readPlainText(); diff --git a/webkit/tools/test_shell/mock_webclipboard_impl.h b/webkit/tools/test_shell/mock_webclipboard_impl.h index dd47835..9df8f62 100644 --- a/webkit/tools/test_shell/mock_webclipboard_impl.h +++ b/webkit/tools/test_shell/mock_webclipboard_impl.h @@ -15,6 +15,7 @@ class MockWebClipboardImpl : public WebKit::WebClipboard { public: + virtual ~MockWebClipboardImpl() {} virtual bool isFormatAvailable(WebKit::WebClipboard::Format); virtual WebKit::WebString readPlainText(); |