Commit d0e4d419 authored by thakis@chromium.org's avatar thakis@chromium.org

2011-06-07 Nico Weber <thakis@chromium.org>

        Reviewed by Dimitri Glazkov.

        [chromium] -Wdelete-non-virtual-dtor pass for DumpRenderTree
        https://bugs.webkit.org/show_bug.cgi?id=62210

        The change to TestEventPrinter fixes a latent bug, because
        objects are deleted through the TestEventPrinter type, but none
        of the subclasses have destructors or non-POD members.

        The changes to NotificationPresenter and WebViewHost do _not_ to fix a
        real bug, they just make clang's -Wdelete-non-virtual-dtor happy. As
        discussed at http://codereview.chromium.org/7094005/, we prefer making
        leaf class destructors virtual over making the leaf classes final.

        * DumpRenderTree/chromium/NotificationPresenter.cpp:
        (NotificationPresenter::~NotificationPresenter):
        * DumpRenderTree/chromium/NotificationPresenter.h:
        * DumpRenderTree/chromium/TestEventPrinter.cpp:
        (TestEventPrinter::~TestEventPrinter):
        * DumpRenderTree/chromium/TestEventPrinter.h:
        * DumpRenderTree/chromium/WebViewHost.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@88246 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 82075114
2011-06-07 Nico Weber <thakis@chromium.org>
Reviewed by Dimitri Glazkov.
[chromium] -Wdelete-non-virtual-dtor pass for DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=62210
The change to TestEventPrinter fixes a latent bug, because
objects are deleted through the TestEventPrinter type, but none
of the subclasses have destructors or non-POD members.
The changes to NotificationPresenter and WebViewHost do _not_ to fix a
real bug, they just make clang's -Wdelete-non-virtual-dtor happy. As
discussed at http://codereview.chromium.org/7094005/, we prefer making
leaf class destructors virtual over making the leaf classes final.
* DumpRenderTree/chromium/NotificationPresenter.cpp:
(NotificationPresenter::~NotificationPresenter):
* DumpRenderTree/chromium/NotificationPresenter.h:
* DumpRenderTree/chromium/TestEventPrinter.cpp:
(TestEventPrinter::~TestEventPrinter):
* DumpRenderTree/chromium/TestEventPrinter.h:
* DumpRenderTree/chromium/WebViewHost.h:
2011-06-06 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Dirk Pranke.
......
......@@ -58,6 +58,10 @@ static void deferredDisplayDispatch(void* context)
delete notification;
}
NotificationPresenter::~NotificationPresenter()
{
}
void NotificationPresenter::grantPermission(const WebString& origin)
{
// Make sure it's in the form of an origin.
......
......@@ -44,6 +44,7 @@ class TestShell;
class NotificationPresenter : public WebKit::WebNotificationPresenter {
public:
explicit NotificationPresenter(TestShell* shell) : m_shell(shell) { }
virtual ~NotificationPresenter();
// Called by the LayoutTestController to simulate a user granting permission.
void grantPermission(const WebKit::WebString& origin);
......
......@@ -59,6 +59,10 @@ public:
void handleTestFooter(bool dumpedAnything) const;
};
TestEventPrinter::~TestEventPrinter()
{
}
PassOwnPtr<TestEventPrinter> TestEventPrinter::createDRTPrinter()
{
return adoptPtr(new DRTPrinter);
......
......@@ -38,6 +38,7 @@ public:
static PassOwnPtr<TestEventPrinter> createDRTPrinter();
static PassOwnPtr<TestEventPrinter> createTestShellPrinter();
virtual ~TestEventPrinter();
virtual void handleTestHeader(const char* url) const = 0;
virtual void handleTimedOut() const = 0;
virtual void handleTextHeader() const = 0;
......
......@@ -67,7 +67,7 @@ struct WebWindowFeatures;
class WebViewHost : public WebKit::WebSpellCheckClient, public WebKit::WebViewClient, public WebKit::WebFrameClient, public NavigationHost {
public:
WebViewHost(TestShell*);
~WebViewHost();
virtual ~WebViewHost();
void setWebWidget(WebKit::WebWidget*);
WebKit::WebView* webView() const;
WebKit::WebWidget* webWidget() const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment