Title: [88246] trunk/Tools
Revision
88246
Author
[email protected]
Date
2011-06-07 09:48:20 -0700 (Tue, 07 Jun 2011)

Log Message

2011-06-07  Nico Weber  <[email protected]>

        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:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (88245 => 88246)


--- trunk/Tools/ChangeLog	2011-06-07 16:40:17 UTC (rev 88245)
+++ trunk/Tools/ChangeLog	2011-06-07 16:48:20 UTC (rev 88246)
@@ -1,3 +1,27 @@
+2011-06-07  Nico Weber  <[email protected]>
+
+        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  <[email protected]>
 
         Reviewed by Dirk Pranke.

Modified: trunk/Tools/DumpRenderTree/chromium/NotificationPresenter.cpp (88245 => 88246)


--- trunk/Tools/DumpRenderTree/chromium/NotificationPresenter.cpp	2011-06-07 16:40:17 UTC (rev 88245)
+++ trunk/Tools/DumpRenderTree/chromium/NotificationPresenter.cpp	2011-06-07 16:48:20 UTC (rev 88246)
@@ -58,6 +58,10 @@
     delete notification;
 }
 
+NotificationPresenter::~NotificationPresenter()
+{
+}
+
 void NotificationPresenter::grantPermission(const WebString& origin)
 {
     // Make sure it's in the form of an origin.

Modified: trunk/Tools/DumpRenderTree/chromium/NotificationPresenter.h (88245 => 88246)


--- trunk/Tools/DumpRenderTree/chromium/NotificationPresenter.h	2011-06-07 16:40:17 UTC (rev 88245)
+++ trunk/Tools/DumpRenderTree/chromium/NotificationPresenter.h	2011-06-07 16:48:20 UTC (rev 88246)
@@ -44,6 +44,7 @@
 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);

Modified: trunk/Tools/DumpRenderTree/chromium/TestEventPrinter.cpp (88245 => 88246)


--- trunk/Tools/DumpRenderTree/chromium/TestEventPrinter.cpp	2011-06-07 16:40:17 UTC (rev 88245)
+++ trunk/Tools/DumpRenderTree/chromium/TestEventPrinter.cpp	2011-06-07 16:48:20 UTC (rev 88246)
@@ -59,6 +59,10 @@
     void handleTestFooter(bool dumpedAnything) const;
 };
 
+TestEventPrinter::~TestEventPrinter()
+{
+}
+
 PassOwnPtr<TestEventPrinter> TestEventPrinter::createDRTPrinter()
 {
     return adoptPtr(new DRTPrinter);

Modified: trunk/Tools/DumpRenderTree/chromium/TestEventPrinter.h (88245 => 88246)


--- trunk/Tools/DumpRenderTree/chromium/TestEventPrinter.h	2011-06-07 16:40:17 UTC (rev 88245)
+++ trunk/Tools/DumpRenderTree/chromium/TestEventPrinter.h	2011-06-07 16:48:20 UTC (rev 88246)
@@ -38,6 +38,7 @@
     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;

Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.h (88245 => 88246)


--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.h	2011-06-07 16:40:17 UTC (rev 88245)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.h	2011-06-07 16:48:20 UTC (rev 88246)
@@ -67,7 +67,7 @@
 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;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to