Title: [106598] trunk/Source/_javascript_Core
- Revision
- 106598
- Author
- [email protected]
- Date
- 2012-02-02 15:36:40 -0800 (Thu, 02 Feb 2012)
Log Message
[GTK] Use win32 native threading
https://bugs.webkit.org/show_bug.cgi?id=77676
Patch by Kalev Lember <[email protected]> on 2012-02-02
Reviewed by Martin Robinson.
r97269 switched from glib threading to pthreads, breaking win32 GTK+.
This is a follow up, removing some leftovers in ThreadSpecific.h and
switching win32 to use the native threading in ThreadingWin.cpp.
* GNUmakefile.list.am: Compile in win32 native threading support
* wtf/ThreadSpecific.h: Remove GTK+-specific definitions
(ThreadSpecific):
(WTF::::destroy):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (106597 => 106598)
--- trunk/Source/_javascript_Core/ChangeLog 2012-02-02 23:34:15 UTC (rev 106597)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-02-02 23:36:40 UTC (rev 106598)
@@ -1,3 +1,19 @@
+2012-02-02 Kalev Lember <[email protected]>
+
+ [GTK] Use win32 native threading
+ https://bugs.webkit.org/show_bug.cgi?id=77676
+
+ Reviewed by Martin Robinson.
+
+ r97269 switched from glib threading to pthreads, breaking win32 GTK+.
+ This is a follow up, removing some leftovers in ThreadSpecific.h and
+ switching win32 to use the native threading in ThreadingWin.cpp.
+
+ * GNUmakefile.list.am: Compile in win32 native threading support
+ * wtf/ThreadSpecific.h: Remove GTK+-specific definitions
+ (ThreadSpecific):
+ (WTF::::destroy):
+
2012-02-02 Filip Pizlo <[email protected]>
retrieveCallerFromVMCode should call trueCallerFrame
Modified: trunk/Source/_javascript_Core/GNUmakefile.list.am (106597 => 106598)
--- trunk/Source/_javascript_Core/GNUmakefile.list.am 2012-02-02 23:34:15 UTC (rev 106597)
+++ trunk/Source/_javascript_Core/GNUmakefile.list.am 2012-02-02 23:36:40 UTC (rev 106598)
@@ -756,7 +756,10 @@
if TARGET_WIN32
_javascript_core_sources += \
- Source/_javascript_Core/wtf/OSAllocatorWin.cpp
+ Source/_javascript_Core/wtf/OSAllocatorWin.cpp \
+ Source/_javascript_Core/wtf/ThreadFunctionInvocation.h \
+ Source/_javascript_Core/wtf/ThreadingWin.cpp \
+ Source/_javascript_Core/wtf/ThreadSpecificWin.cpp
else
_javascript_core_sources += \
Source/_javascript_Core/jit/ExecutableAllocatorFixedVMPool.cpp \
Modified: trunk/Source/_javascript_Core/wtf/ThreadSpecific.h (106597 => 106598)
--- trunk/Source/_javascript_Core/wtf/ThreadSpecific.h 2012-02-02 23:34:15 UTC (rev 106597)
+++ trunk/Source/_javascript_Core/wtf/ThreadSpecific.h 2012-02-02 23:36:40 UTC (rev 106598)
@@ -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 @@
#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 @@
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 = ""
- return data ? data->value : 0;
-}
-
-template<typename T>
-inline void ThreadSpecific<T>::set(T* ptr)
-{
- ASSERT(!get());
- Data* data = "" 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 @@
// 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 @@
#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
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes