From e93c5aae8366d430d69827d409f3b6d31eb5dfb6 Mon Sep 17 00:00:00 2001 From: jaanttil Date: Wed, 24 Aug 2011 12:49:48 +0300 Subject: Fixes to JSCore for WinCE. Moved WINCE specific code before desktop windows code. This is needed because in WinCE both OS(WINCE) and OS(WINDOWS) are true. Task-number: QTBUG-22502 Change-Id: Icf9ad1a155dc705e37e5e057bb23bc7f5c2d4931 Reviewed-by: Andreas Holzammer Reviewed-by: Kent Hansen --- .../JavaScriptCore/runtime/Collector.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp index 42e2a35..a7744dd 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp @@ -581,6 +581,15 @@ static inline void* currentThreadStackBase() #if OS(DARWIN) pthread_t thread = pthread_self(); return pthread_get_stackaddr_np(thread); +#elif OS(WINCE) + AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); + MutexLocker locker(mutex); + if (g_stackBase) + return g_stackBase; + else { + int dummy; + return getStackBase(&dummy); + } #elif OS(WINDOWS) && CPU(X86) && COMPILER(MSVC) // offset 0x18 from the FS segment register gives a pointer to // the thread information block for the current thread @@ -662,15 +671,6 @@ static inline void* currentThreadStackBase() stackThread = thread; } return static_cast(stackBase) + stackSize; -#elif OS(WINCE) - AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); - MutexLocker locker(mutex); - if (g_stackBase) - return g_stackBase; - else { - int dummy; - return getStackBase(&dummy); - } #else #error Need a way to get the stack base on this platform #endif -- cgit v0.12