[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

andreas.kling at nokia.com andreas.kling at nokia.com
Wed Dec 22 15:17:55 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 01cb7f7c264d364d21637e9bf5248f36d25c6a62
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 29 23:19:42 2010 +0000

    2010-10-29  Andreas Kling  <kling at webkit.org>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt] QtTestBrowser: Fix uninitialized read in FpsTimer
            https://bugs.webkit.org/show_bug.cgi?id=48675
    
            FpsTimer::m_timer was never initialized and passed to QObject::killTimer()
            on startup with in -graphicsbased mode.
    
            * QtTestBrowser/fpstimer.cpp:
            (FpsTimer::FpsTimer):
            (FpsTimer::numFrames):
            (FpsTimer::stop):
            (FpsTimer::timerEvent):
            * QtTestBrowser/fpstimer.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70946 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index f32dcdf..6ec2ad5 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,20 @@
+2010-10-29  Andreas Kling  <kling at webkit.org>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] QtTestBrowser: Fix uninitialized read in FpsTimer
+        https://bugs.webkit.org/show_bug.cgi?id=48675
+
+        FpsTimer::m_timer was never initialized and passed to QObject::killTimer()
+        on startup with in -graphicsbased mode.
+
+        * QtTestBrowser/fpstimer.cpp:
+        (FpsTimer::FpsTimer):
+        (FpsTimer::numFrames):
+        (FpsTimer::stop):
+        (FpsTimer::timerEvent):
+        * QtTestBrowser/fpstimer.h:
+
 2010-10-29  Dirk Pranke  <dpranke at chromium.org>
 
         Reviewed by Tony Chang.
diff --git a/WebKitTools/QtTestBrowser/fpstimer.cpp b/WebKitTools/QtTestBrowser/fpstimer.cpp
index 3b72cef..eae3d9c 100644
--- a/WebKitTools/QtTestBrowser/fpstimer.cpp
+++ b/WebKitTools/QtTestBrowser/fpstimer.cpp
@@ -37,11 +37,12 @@
 #define FPS_MEASURE_INTERVAL 1000 / 60
 
 FpsTimer::FpsTimer(QObject* parent)
-        : QObject(parent)
+    : QObject(parent)
+    , m_timer(0)
 {
 }
 
-int FpsTimer::numFrames(int spanMillis)
+int FpsTimer::numFrames(int spanMillis) const
 {
     const QTime now = QTime::currentTime();
 
@@ -63,13 +64,15 @@ void FpsTimer::start()
 
 void FpsTimer::stop()
 {
+    if (!m_timer)
+        return;
     killTimer(m_timer);
     m_frames.clear();
 }
 
 void FpsTimer::timerEvent(QTimerEvent* event)
 {
-    if (event->timerId() !=  m_timer)
+    if (event->timerId() != m_timer)
         return;
     m_frames.append(QTime::currentTime());
     if (m_frames.length() > MAX_FRAMES_SAVED)
diff --git a/WebKitTools/QtTestBrowser/fpstimer.h b/WebKitTools/QtTestBrowser/fpstimer.h
index accecd2..eed1198 100644
--- a/WebKitTools/QtTestBrowser/fpstimer.h
+++ b/WebKitTools/QtTestBrowser/fpstimer.h
@@ -37,7 +37,7 @@ class FpsTimer : public QObject {
 
 public:
     FpsTimer(QObject* parent = 0);
-    int numFrames(int spanMillis = 1000);
+    int numFrames(int spanMillis = 1000) const;
 
 public Q_SLOTS:
     void start();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list