[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
dimich at chromium.org
dimich at chromium.org
Thu Feb 4 21:27:33 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 6b66c959d33de6cdf0b3f5c9cad77c388bcb37b7
Author: dimich at chromium.org <dimich at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 25 23:12:45 2010 +0000
Fix Chromium Linux tests: the pthread functions on Linux produce segfault if they receive 0 thread handle.
After r53714, we can have 0 thread handles passed to pthread_join and pthread_detach if corresponding threads
were already terminated and their threadMap entries cleared.
Add a 0 check.
Reviewed by David Levin.
* wtf/ThreadingPthreads.cpp:
(WTF::waitForThreadCompletion):
(WTF::detachThread):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53815 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index c420614..9f43d7e 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-01-25 Dmitry Titov <dimich at chromium.org>
+
+ Reviewed by David Levin.
+
+ Fix Chromium Linux tests: the pthread functions on Linux produce segfault if they receive 0 thread handle.
+ After r53714, we can have 0 thread handles passed to pthread_join and pthread_detach if corresponding threads
+ were already terminated and their threadMap entries cleared.
+ Add a 0 check.
+
+ * wtf/ThreadingPthreads.cpp:
+ (WTF::waitForThreadCompletion):
+ (WTF::detachThread):
+
2010-01-24 Laszlo Gombos <laszlo.1.gombos at nokia.com>
Reviewed by Maciej Stachowiak.
diff --git a/JavaScriptCore/wtf/ThreadingPthreads.cpp b/JavaScriptCore/wtf/ThreadingPthreads.cpp
index 04b1a26..2feb808 100644
--- a/JavaScriptCore/wtf/ThreadingPthreads.cpp
+++ b/JavaScriptCore/wtf/ThreadingPthreads.cpp
@@ -207,6 +207,8 @@ int waitForThreadCompletion(ThreadIdentifier threadID, void** result)
ASSERT(threadID);
pthread_t pthreadHandle = pthreadHandleForIdentifier(threadID);
+ if (!pthreadHandle)
+ return 0;
int joinResult = pthread_join(pthreadHandle, result);
if (joinResult == EDEADLK)
@@ -220,6 +222,8 @@ void detachThread(ThreadIdentifier threadID)
ASSERT(threadID);
pthread_t pthreadHandle = pthreadHandleForIdentifier(threadID);
+ if (!pthreadHandle)
+ return;
pthread_detach(pthreadHandle);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list