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

Issue 159238: Fix a leak that only happens in layout test mode. (Closed)

Created:
11 years, 5 months ago by tony
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

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

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -10 lines) Patch
M tools/valgrind/memcheck/suppressions.txt View 1 chunk +0 lines, -10 lines 0 comments Download
M webkit/api/public/WebClipboard.h View 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/glue/webclipboard_impl.h View 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/tools/test_shell/mock_webclipboard_impl.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
tony
Question for Darin: Should all the abstract classes in webkit/api/public/*.h have virtual destructors? It doesn't ...
11 years, 5 months ago (2009-07-22 22:53:40 UTC) #1
ojan
LGTM
11 years, 5 months ago (2009-07-22 23:01:32 UTC) #2
darin (slow to review)
The expectation I had was that a WebClipboard subclass would never be deleted via a ...
11 years, 5 months ago (2009-07-22 23:11:43 UTC) #3
dank
-Wnon-virtual-dtor is a handy compiler option that warns about this situation, should we start using ...
11 years, 5 months ago (2009-07-22 23:29:53 UTC) #4
darin (slow to review)
I think the issue is that this is WebKit code (well, it will be soon), ...
11 years, 5 months ago (2009-07-22 23:50:31 UTC) #5
darin (slow to review)
11 years, 5 months ago (2009-07-22 23:51:16 UTC) #6
See for instance:  https://bugs.webkit.org/show_bug.cgi?id=27563

On Wed, Jul 22, 2009 at 4:50 PM, Darin Fisher <darin@chromium.org> wrote:

> I think the issue is that this is WebKit code (well, it will be soon), and
> I think WebKit intentionally avoids virtual destructors when they are not
> needed.-Darin
>
>
> On Wed, Jul 22, 2009 at 4:29 PM, <dank@chromium.org> wrote:
>
>> -Wnon-virtual-dtor is a handy compiler option that warns
>> about this situation, should we start using it?
>>
>>
>>
>> http://codereview.chromium.org/159238
>>
>
>

Powered by Google App Engine
This is Rietveld 408576698