[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 13:43:01 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit dc0b57991911d5b46831a8a9299195b189f69d9b
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 23 22:46:09 2010 +0000

    2010-09-23  Lucas De Marchi  <lucas.demarchi at profusion.mobi>
    
            Reviewed by Darin Adler.
    
            Fix usage of enum as if it was a define
            https://bugs.webkit.org/show_bug.cgi?id=46355
    
            pthread.h defines PTHREAD_MUTEX_DEFAULT and PTHREAD_MUTEX_NORMAL as an
            enum.  Hence, it cannot be used by the preprocessor which always
            evaluates that condition as true. This was giving a warning when
            compiling with gcc and "-Wundef" flag.
    
            The second path, when PTHREAD_MUTEX_DEFAULT is not the same of
            PTHREAD_MUTEX_NORMAL, is not slow. So, let's eliminate the first path
            and get rid of that #if.
    
            * wtf/ThreadingPthreads.cpp: Always call pthread_mutexattr_init() to
            set mutex type to PTHREAD_MUTEX_NORMAL.
            (WTF::Mutex::Mutex):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68209 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 8c729c8..3c52759 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,23 @@
+2010-09-23  Lucas De Marchi  <lucas.demarchi at profusion.mobi>
+
+        Reviewed by Darin Adler.
+
+        Fix usage of enum as if it was a define
+        https://bugs.webkit.org/show_bug.cgi?id=46355
+
+        pthread.h defines PTHREAD_MUTEX_DEFAULT and PTHREAD_MUTEX_NORMAL as an
+        enum.  Hence, it cannot be used by the preprocessor which always
+        evaluates that condition as true. This was giving a warning when
+        compiling with gcc and "-Wundef" flag.
+
+        The second path, when PTHREAD_MUTEX_DEFAULT is not the same of
+        PTHREAD_MUTEX_NORMAL, is not slow. So, let's eliminate the first path
+        and get rid of that #if.
+
+        * wtf/ThreadingPthreads.cpp: Always call pthread_mutexattr_init() to
+        set mutex type to PTHREAD_MUTEX_NORMAL.
+        (WTF::Mutex::Mutex):
+
 2010-09-23  Michael Saboff  <msaboff at apple.com>
 
         Reviewed by Geoffrey Garen.
diff --git a/JavaScriptCore/wtf/ThreadingPthreads.cpp b/JavaScriptCore/wtf/ThreadingPthreads.cpp
index 98286d3..0017a6f 100644
--- a/JavaScriptCore/wtf/ThreadingPthreads.cpp
+++ b/JavaScriptCore/wtf/ThreadingPthreads.cpp
@@ -241,12 +241,6 @@ ThreadIdentifier currentThread()
 
 Mutex::Mutex()
 {
-#if PTHREAD_MUTEX_NORMAL == PTHREAD_MUTEX_DEFAULT
-
-    pthread_mutex_init(&m_mutex, 0);
-
-#else
-
     pthread_mutexattr_t attr;
     pthread_mutexattr_init(&attr);
     pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL);
@@ -254,8 +248,6 @@ Mutex::Mutex()
     pthread_mutex_init(&m_mutex, &attr);
 
     pthread_mutexattr_destroy(&attr);
-
-#endif
 }
 
 Mutex::~Mutex()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list