From 597984021ca00fd98a0dfe2effd742c6e7bd4190 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 14 Mar 2013 14:10:22 +0100 Subject: [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 --- Source/JavaScriptCore/heap/HeapTimer.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'Source/JavaScriptCore/heap/HeapTimer.h') 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 #elif PLATFORM(BLACKBERRY) #include +#elif PLATFORM(QT) +#include +#include +#include +#include #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 m_timer; +#elif PLATFORM(QT) + void timerEvent(QTimerEvent*); + void customEvent(QEvent*); + QBasicTimer m_timer; + QThread* m_newThread; + QMutex m_mutex; #endif private: -- cgit v1.2.1