Remove deprecated DeferrableOneShotTimer constructor.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jan 2014 16:29:51 +0000 (16:29 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jan 2014 16:29:51 +0000 (16:29 +0000)
<https://webkit.org/b/126984>

Source/WebCore:

Remove the deprecated constructor for callback functions that take
the timer by pointer instead of by reference.

This shrinks DeferrableOneShotTimer by 8 bytes.

Reviewed by Anders Carlsson.

* platform/Timer.h:
(WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer):

Source/WebKit2:

Reviewed by Anders Carlsson.

* WebProcess/Plugins/PluginView.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginSnapshotTimerFired):

    Take the timer by reference so we can use the new constructor.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@161971 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/Timer.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Plugins/PluginView.cpp
Source/WebKit2/WebProcess/Plugins/PluginView.h

index f5b6d28653fe095008763336145f8b9aa4039119..e713930d4d6ee836c34d9fa697915332f5a0c6d2 100644 (file)
@@ -1,3 +1,18 @@
+2014-01-14  Andreas Kling  <akling@apple.com>
+
+        Remove deprecated DeferrableOneShotTimer constructor.
+        <https://webkit.org/b/126984>
+
+        Remove the deprecated constructor for callback functions that take
+        the timer by pointer instead of by reference.
+
+        This shrinks DeferrableOneShotTimer by 8 bytes.
+
+        Reviewed by Anders Carlsson.
+
+        * platform/Timer.h:
+        (WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer):
+
 2014-01-14  Dirk Schulze  <krit@webkit.org>
 
         Make CachedSVGDocument independent of CSS Filters
index 7b7df5ac57c242bc3090cb703f2e4d7d92901fe2..141892618916d62abe6eb7177493505487d6b9f2 100644 (file)
@@ -153,21 +153,10 @@ inline bool TimerBase::isActive() const
 template <typename TimerFiredClass> class DeferrableOneShotTimer : protected TimerBase {
 public:
     typedef void (TimerFiredClass::*TimerFiredFunction)(DeferrableOneShotTimer&);
-    typedef void (TimerFiredClass::*DeprecatedTimerFiredFunction)(DeferrableOneShotTimer*);
 
     DeferrableOneShotTimer(TimerFiredClass* object, TimerFiredFunction function, double delay)
         : m_object(object)
         , m_function(function)
-        , m_deprecatedFunction(nullptr)
-        , m_delay(delay)
-        , m_shouldRestartWhenTimerFires(false)
-    {
-    }
-
-    DeferrableOneShotTimer(TimerFiredClass* object, DeprecatedTimerFiredFunction function, double delay)
-        : m_object(object)
-        , m_function(nullptr)
-        , m_deprecatedFunction(function)
         , m_delay(delay)
         , m_shouldRestartWhenTimerFires(false)
     {
@@ -203,17 +192,11 @@ private:
             return;
         }
 
-        if (m_deprecatedFunction) {
-            (m_object->*m_deprecatedFunction)(this);
-            return;
-        }
-
         (m_object->*m_function)(*this);
     }
 
     TimerFiredClass* m_object;
     TimerFiredFunction m_function;
-    DeprecatedTimerFiredFunction m_deprecatedFunction;
 
     double m_delay;
     bool m_shouldRestartWhenTimerFires;
index 78808252356b9a5245a8af23e8dfbf79b97fbb15..b86139e255203452cdb133aa8e208cac887fd654 100644 (file)
@@ -1,3 +1,16 @@
+2014-01-14  Andreas Kling  <akling@apple.com>
+
+        Remove deprecated DeferrableOneShotTimer constructor.
+        <https://webkit.org/b/126984>
+
+        Reviewed by Anders Carlsson.
+
+        * WebProcess/Plugins/PluginView.h:
+        * WebProcess/Plugins/PluginView.cpp:
+        (WebKit::PluginView::pluginSnapshotTimerFired):
+
+            Take the timer by reference so we can use the new constructor.
+
 2014-01-13  Tim Horton  <timothy_horton@apple.com>
 
         iOS WebKit2 build fixes, part 1
index 720595d28402f61a64d5f4be18334ec2e12e18cb..936365abf73bc8ac1dfcfe198f2108980f9128b9 100644 (file)
@@ -1673,7 +1673,7 @@ static bool isAlmostSolidColor(BitmapImage* bitmap)
 }
 #endif
 
-void PluginView::pluginSnapshotTimerFired(DeferrableOneShotTimer<PluginView>*)
+void PluginView::pluginSnapshotTimerFired(DeferrableOneShotTimer<PluginView>&)
 {
     ASSERT(m_plugin);
 
index aa38452eb9658bf239d1abfe077b519e199b823a..6bbffd642df137517e5fefacf4c0b618e2a25b04 100644 (file)
@@ -136,7 +136,7 @@ private:
 
     void redeliverManualStream();
 
-    void pluginSnapshotTimerFired(WebCore::DeferrableOneShotTimer<PluginView>*);
+    void pluginSnapshotTimerFired(WebCore::DeferrableOneShotTimer<PluginView>&);
     void pluginDidReceiveUserInteraction();
 
     bool shouldCreateTransientPaintingSnapshot() const;