summaryrefslogtreecommitdiff
path: root/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2011-08-24 12:49:48 +0300
committerQt by Nokia <qt-info@nokia.com>2012-04-19 15:00:45 +0200
commit0c0707e79d7d937685ff004db23f8f57ed8a1a63 (patch)
treeaad94c0b88caff96c964ce40b40085e09f3f4195 /src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
parenta492094373ef5fd9ed9f2a1329248ee293ae880a (diff)
downloadqtscript-0c0707e79d7d937685ff004db23f8f57ed8a1a63.tar.gz
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 <andreas.holzammer@kdab.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com> (cherry picked from commit e93c5aae8366d430d69827d409f3b6d31eb5dfb6) Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Diffstat (limited to 'src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp')
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp18
1 files 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<char*>(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