summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/wtf/ThreadSpecific.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-02-09 14:16:12 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2012-02-09 14:16:12 +0100
commit03e12282df9aa1e1fb05a8b90f1cfc2e08764cec (patch)
tree52599cd0ab782b1768e23ad176f7618f98333cb6 /Source/JavaScriptCore/wtf/ThreadSpecific.h
parentcd44dc59cdfc39534aef4d417e9f3c412e3be139 (diff)
downloadqtwebkit-03e12282df9aa1e1fb05a8b90f1cfc2e08764cec.tar.gz
Imported WebKit commit e09a82039aa4273ab318b71122e92d8e5f233525 (http://svn.webkit.org/repository/webkit/trunk@107223)
Diffstat (limited to 'Source/JavaScriptCore/wtf/ThreadSpecific.h')
-rw-r--r--Source/JavaScriptCore/wtf/ThreadSpecific.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/Source/JavaScriptCore/wtf/ThreadSpecific.h b/Source/JavaScriptCore/wtf/ThreadSpecific.h
index 7c75a83ee..242acc0d3 100644
--- a/Source/JavaScriptCore/wtf/ThreadSpecific.h
+++ b/Source/JavaScriptCore/wtf/ThreadSpecific.h
@@ -46,8 +46,6 @@
#if USE(PTHREADS)
#include <pthread.h>
-#elif PLATFORM(GTK)
-#include <glib.h>
#elif OS(WINDOWS)
#include <windows.h>
#endif
@@ -100,8 +98,6 @@ private:
#if USE(PTHREADS)
pthread_key_t m_key;
-#elif PLATFORM(GTK)
- GStaticPrivate m_key;
#elif OS(WINDOWS)
int m_index;
#endif
@@ -130,29 +126,6 @@ inline void ThreadSpecific<T>::set(T* ptr)
pthread_setspecific(m_key, new Data(ptr, this));
}
-#elif PLATFORM(GTK)
-
-template<typename T>
-inline ThreadSpecific<T>::ThreadSpecific()
-{
- g_static_private_init(&m_key);
-}
-
-template<typename T>
-inline T* ThreadSpecific<T>::get()
-{
- Data* data = static_cast<Data*>(g_static_private_get(&m_key));
- return data ? data->value : 0;
-}
-
-template<typename T>
-inline void ThreadSpecific<T>::set(T* ptr)
-{
- ASSERT(!get());
- Data* data = new Data(ptr, this);
- g_static_private_set(&m_key, data, destroy);
-}
-
#elif OS(WINDOWS)
// TLS_OUT_OF_INDEXES is not defined on WinCE.
@@ -218,9 +191,6 @@ inline void ThreadSpecific<T>::destroy(void* ptr)
// We want get() to keep working while data destructor works, because it can be called indirectly by the destructor.
// Some pthreads implementations zero out the pointer before calling destroy(), so we temporarily reset it.
pthread_setspecific(data->owner->m_key, ptr);
-#elif PLATFORM(GTK)
- // See comment as above
- g_static_private_set(&data->owner->m_key, data, 0);
#endif
data->value->~T();
@@ -228,8 +198,6 @@ inline void ThreadSpecific<T>::destroy(void* ptr)
#if USE(PTHREADS)
pthread_setspecific(data->owner->m_key, 0);
-#elif PLATFORM(GTK)
- g_static_private_set(&data->owner->m_key, 0, 0);
#elif OS(WINDOWS)
TlsSetValue(tlsKeys()[data->owner->m_index], 0);
#else