diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2010-06-16 12:14:06 (GMT) |
---|---|---|
committer | Kent Hansen <kent.hansen@nokia.com> | 2010-06-16 12:20:07 (GMT) |
commit | 7e08ce215763475c5933d2f035687e5db3d5295d (patch) | |
tree | 7ffa979697b1e2195479e140db7692d63926579e /src | |
parent | 73fa311f67b21c9b897de0196d3b8227f27d828f (diff) | |
download | Qt-7e08ce215763475c5933d2f035687e5db3d5295d.zip Qt-7e08ce215763475c5933d2f035687e5db3d5295d.tar.gz Qt-7e08ce215763475c5933d2f035687e5db3d5295d.tar.bz2 |
Updated JavaScriptCore from /home/khansen/dev/qtwebkit-qtscript-integration to javascriptcore-snapshot-16062010 ( 8b2d3443afca194f8ac50a63151dc9d19a150582 )
Integrated changes:
|| <https://webkit.org/b/37195> || JSC's currentThreadStackBase is not reentrant on some platforms
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog | 17 | ||||
-rw-r--r-- | src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp | 18 | ||||
-rw-r--r-- | src/3rdparty/javascriptcore/VERSION | 4 |
3 files changed, 29 insertions, 10 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog index fd6125f..b0873ab 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog +++ b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog @@ -12,6 +12,23 @@ * wtf/Platform.h: +2010-04-28 Simon Hausmann <simon.hausmann@nokia.com>, Kent Hansen <kent.hansen@nokia.com> + + Reviewed by Darin Adler. + + JSC's currentThreadStackBase is not reentrant on some platforms + https://bugs.webkit.org/show_bug.cgi?id=37195 + + This function needs to be reentrant to avoid memory corruption on platforms where + the implementation uses global variables. + + This patch adds a mutex lock where necessary and makes the Symbian implementation + reentrant. + + * runtime/Collector.cpp: + (JSC::currentThreadStackBaseMutex): + (JSC::currentThreadStackBase): + 2010-04-14 Kent Hansen <kent.hansen@nokia.com> Reviewed by Maciej Stachowiak. diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp index 57f2a92..eafcc23 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp @@ -637,6 +637,8 @@ static inline void* currentThreadStackBase() #elif OS(HPUX) return hpux_get_stack_base(); #elif OS(QNX) + AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); + MutexLocker locker(mutex); return currentThreadStackBaseQNX(); #elif OS(SOLARIS) stack_t s; @@ -660,19 +662,17 @@ static inline void* currentThreadStackBase() pthread_stackseg_np(thread, &stack); return stack.ss_sp; #elif OS(SYMBIAN) - static void* stackBase = 0; - if (stackBase == 0) { - TThreadStackInfo info; - RThread thread; - thread.StackInfo(info); - stackBase = (void*)info.iBase; - } - return (void*)stackBase; + TThreadStackInfo info; + RThread thread; + thread.StackInfo(info); + return (void*)info.iBase; #elif OS(HAIKU) thread_info threadInfo; get_thread_info(find_thread(NULL), &threadInfo); return threadInfo.stack_end; #elif OS(UNIX) + AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); + MutexLocker locker(mutex); static void* stackBase = 0; static size_t stackSize = 0; static pthread_t stackThread; @@ -695,6 +695,8 @@ static inline void* currentThreadStackBase() } return static_cast<char*>(stackBase) + stackSize; #elif OS(WINCE) + AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); + MutexLocker locker(mutex); if (g_stackBase) return g_stackBase; else { diff --git a/src/3rdparty/javascriptcore/VERSION b/src/3rdparty/javascriptcore/VERSION index 1b5109a..daecc37 100644 --- a/src/3rdparty/javascriptcore/VERSION +++ b/src/3rdparty/javascriptcore/VERSION @@ -4,8 +4,8 @@ This is a snapshot of JavaScriptCore from The commit imported was from the - javascriptcore-snapshot-19052010 branch/tag + javascriptcore-snapshot-16062010 branch/tag and has the sha1 checksum - 8039ba79702d6516cf6841c9f15b324ec499bbf3 + 8b2d3443afca194f8ac50a63151dc9d19a150582 |