diff options
-rw-r--r-- | src/3rdparty/webkit/VERSION | 2 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebCore/ChangeLog | 20 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebCore/platform/qt/SharedTimerQt.cpp | 24 |
3 files changed, 40 insertions, 6 deletions
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index b57b607..51d663b 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - b9dcd9c168d9b25deb020837a67f30c2d72c9afb + d6d6c3821ed111b214a753f1ce8fa969c1a94dc3 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 2d905b0..c3df1bf 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,23 @@ +2010-04-19 Balazs Kelemen <kb@inf.u-szeged.hu> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Destroy SharedTimerQt before destruction of QCoreApplication. + + To avoid unsafe situations caused by running WebCore code (through firing timers) when destruction of QCoreApplication + has been started, we should explicitly destroy the SharedTimerQt instance on application exit. + We can achieve that through installing a self-destroying slot for the QCoreApplication::aboutToQuit() signal + into the SharedTimerQt instance. + + https://bugs.webkit.org/show_bug.cgi?id=36832 + + No functional change so no new tests. + + * platform/qt/SharedTimerQt.cpp: + (WebCore::SharedTimerQt::SharedTimerQt): + (WebCore::SharedTimerQt::destroy): + (WebCore::SharedTimerQt::inst): + 2010-05-04 Tucker Jay <jay.tucker@nokia.com> Reviewed by Holger Freyther. diff --git a/src/3rdparty/webkit/WebCore/platform/qt/SharedTimerQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/SharedTimerQt.cpp index e9bcaee..7c0fd05 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/SharedTimerQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/SharedTimerQt.cpp @@ -40,6 +40,8 @@ namespace WebCore { class SharedTimerQt : public QObject { + Q_OBJECT + friend void setSharedTimerFiredFunction(void (*f)()); public: static SharedTimerQt* inst(); @@ -50,15 +52,18 @@ public: protected: void timerEvent(QTimerEvent* ev); +private slots: + void destroy(); + private: - SharedTimerQt(QObject* parent); + SharedTimerQt(); ~SharedTimerQt(); QBasicTimer m_timer; void (*m_timerFunction)(); }; -SharedTimerQt::SharedTimerQt(QObject* parent) - : QObject(parent) +SharedTimerQt::SharedTimerQt() + : QObject() , m_timerFunction(0) {} @@ -68,11 +73,18 @@ SharedTimerQt::~SharedTimerQt() (m_timerFunction)(); } +void SharedTimerQt::destroy() +{ + delete this; +} + SharedTimerQt* SharedTimerQt::inst() { static QPointer<SharedTimerQt> timer; - if (!timer) - timer = new SharedTimerQt(QCoreApplication::instance()); + if (!timer) { + timer = new SharedTimerQt(); + timer->connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()), SLOT(destroy())); + } return timer; } @@ -129,6 +141,8 @@ void stopSharedTimer() SharedTimerQt::inst()->stop(); } +#include "SharedTimerQt.moc" + } // vim: ts=4 sw=4 et |