summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/JavaScriptCore/runtime
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-07-30 07:30:09 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-07-30 07:30:09 (GMT)
commit1e6fdf225797f03990b4511cdf3655905ece2cf9 (patch)
tree57ae414f6aa4c6dc2089a478dd15c93df6982ce9 /src/3rdparty/webkit/JavaScriptCore/runtime
parent26a55136f393eed1689f3671e65187ce1523bf09 (diff)
parenta8ea6dc6357049847eab361328a611b42f681c2a (diff)
downloadQt-1e6fdf225797f03990b4511cdf3655905ece2cf9.zip
Qt-1e6fdf225797f03990b4511cdf3655905ece2cf9.tar.gz
Qt-1e6fdf225797f03990b4511cdf3655905ece2cf9.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into qtscript-jsc-backend
Conflicts: src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp src/script/qscriptbuffer_p.h src/script/qscriptclassinfo_p.h src/script/qscriptecmadate.cpp src/script/qscriptgc_p.h src/script/qscriptmemberfwd_p.h src/script/qscriptsyntaxcheckresult_p.h src/script/qscriptvalueimplfwd_p.h tests/auto/qscriptengine/tst_qscriptengine.cpp util/webkit/mkdist-webkit
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime')
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp
index e1b7bd4..dddd83d 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp
@@ -89,6 +89,13 @@ extern int *__libc_stack_end;
#include <pthread_np.h>
#endif
+#if PLATFORM(QNX)
+#include <fcntl.h>
+#include <sys/procfs.h>
+#include <stdio.h>
+#include <errno.h>
+#endif
+
#endif
#define DEBUG_COLLECTOR 0
@@ -580,6 +587,24 @@ static inline void* currentThreadStackBase()
static pthread_t stackThread;
pthread_t thread = pthread_self();
if (stackBase == 0 || thread != stackThread) {
+#if PLATFORM(QNX)
+ int fd;
+ struct _debug_thread_info tinfo;
+ memset(&tinfo, 0, sizeof(tinfo));
+ tinfo.tid = pthread_self();
+ fd = open("/proc/self", O_RDONLY);
+ if (fd == -1) {
+#ifndef NDEBUG
+ perror("Unable to open /proc/self:");
+#endif
+ return 0;
+ }
+ devctl(fd, DCMD_PROC_TIDSTATUS, &tinfo, sizeof(tinfo), NULL);
+ close(fd);
+ stackBase = (void*)tinfo.stkbase;
+ stackSize = tinfo.stksize;
+ ASSERT(stackBase);
+#else
#if defined(QT_LINUXBASE)
// LinuxBase is missing pthread_getattr_np - resolve it once at runtime instead
// see http://bugs.linuxbase.org/show_bug.cgi?id=2364
@@ -604,6 +629,7 @@ static inline void* currentThreadStackBase()
(void)rc; // FIXME: Deal with error code somehow? Seems fatal.
ASSERT(stackBase);
pthread_attr_destroy(&sattr);
+#endif
stackThread = thread;
}
return static_cast<char*>(stackBase) + stackSize;