summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/heap/HeapTimer.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2013-03-14 14:10:22 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-18 17:25:46 +0100
commit597984021ca00fd98a0dfe2effd742c6e7bd4190 (patch)
treeb18e79f91719f072f339b7b5b068b9004aa7d3d7 /Source/JavaScriptCore/heap/HeapTimer.h
parent3774b52275c59d74571b0e1f87950dcfc257d408 (diff)
downloadqtwebkit-597984021ca00fd98a0dfe2effd742c6e7bd4190.tar.gz
[Qt] Implement IncrementalSweeper and HeapTimer
https://bugs.webkit.org/show_bug.cgi?id=103996 Reviewed by Simon Hausmann. Implements the incremental sweeping garbage collection for the Qt platform. * heap/HeapTimer.cpp: (JSC::HeapTimer::HeapTimer): (JSC::HeapTimer::~HeapTimer): (JSC::HeapTimer::timerEvent): (JSC::HeapTimer::synchronize): (JSC::HeapTimer::invalidate): (JSC::HeapTimer::didStartVMShutdown): * heap/HeapTimer.h: (HeapTimer): * heap/IncrementalSweeper.cpp: (JSC::IncrementalSweeper::IncrementalSweeper): (JSC::IncrementalSweeper::scheduleTimer): * heap/IncrementalSweeper.h: (IncrementalSweeper): Change-Id: I47b874c050e08519cf5e3ed5a98a98ac8785971f git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141089 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'Source/JavaScriptCore/heap/HeapTimer.h')
-rw-r--r--Source/JavaScriptCore/heap/HeapTimer.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/Source/JavaScriptCore/heap/HeapTimer.h b/Source/JavaScriptCore/heap/HeapTimer.h
index 88715098a..e0fcda672 100644
--- a/Source/JavaScriptCore/heap/HeapTimer.h
+++ b/Source/JavaScriptCore/heap/HeapTimer.h
@@ -33,13 +33,22 @@
#include <CoreFoundation/CoreFoundation.h>
#elif PLATFORM(BLACKBERRY)
#include <BlackBerryPlatformTimer.h>
+#elif PLATFORM(QT)
+#include <QBasicTimer>
+#include <QMutex>
+#include <QObject>
+#include <QThread>
#endif
namespace JSC {
class JSGlobalData;
-
+
+#if PLATFORM(QT)
+class HeapTimer : public QObject {
+#else
class HeapTimer {
+#endif
public:
#if USE(CF)
HeapTimer(JSGlobalData*, CFRunLoopRef);
@@ -69,6 +78,12 @@ protected:
void timerDidFire();
BlackBerry::Platform::Timer<HeapTimer> m_timer;
+#elif PLATFORM(QT)
+ void timerEvent(QTimerEvent*);
+ void customEvent(QEvent*);
+ QBasicTimer m_timer;
+ QThread* m_newThread;
+ QMutex m_mutex;
#endif
private: