From a80c7628325cf2759d12abd5bff11b23c803f5f4 Mon Sep 17 00:00:00 2001 From: "zimmermann@webkit.org" Date: Thu, 26 Jan 2012 11:58:40 +0000 Subject: [PATCH] Unreviewed, rolling out r105982. http://trac.webkit.org/changeset/105982 https://bugs.webkit.org/show_bug.cgi?id=77090 breaks the world (Requested by WildFox on #webkit). Patch by Sheriff Bot on 2012-01-26 * wtf/MainThread.cpp: (WTF): * wtf/Platform.h: * wtf/mac/MainThreadMac.mm: (WTF): (WTF::registerGCThread): (WTF::isMainThreadOrGCThread): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105987 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/JavaScriptCore/ChangeLog | 16 ++++++++++++++ Source/JavaScriptCore/wtf/MainThread.cpp | 30 -------------------------- Source/JavaScriptCore/wtf/Platform.h | 2 +- Source/JavaScriptCore/wtf/mac/MainThreadMac.mm | 27 +++++++++++++++++++++++ 4 files changed, 44 insertions(+), 31 deletions(-) diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog index 7624e27..79a0db5 100644 --- a/Source/JavaScriptCore/ChangeLog +++ b/Source/JavaScriptCore/ChangeLog @@ -1,3 +1,19 @@ +2012-01-26 Sheriff Bot + + Unreviewed, rolling out r105982. + http://trac.webkit.org/changeset/105982 + https://bugs.webkit.org/show_bug.cgi?id=77090 + + breaks the world (Requested by WildFox on #webkit). + + * wtf/MainThread.cpp: + (WTF): + * wtf/Platform.h: + * wtf/mac/MainThreadMac.mm: + (WTF): + (WTF::registerGCThread): + (WTF::isMainThreadOrGCThread): + 2012-01-26 Roland Takacs [Qt] GC should be parallel on Qt platform diff --git a/Source/JavaScriptCore/wtf/MainThread.cpp b/Source/JavaScriptCore/wtf/MainThread.cpp index cc8c634..9151265 100644 --- a/Source/JavaScriptCore/wtf/MainThread.cpp +++ b/Source/JavaScriptCore/wtf/MainThread.cpp @@ -34,7 +34,6 @@ #include "Functional.h" #include "StdLibExtras.h" #include "Threading.h" -#include #if PLATFORM(CHROMIUM) #error Chromium uses a different main thread implementation @@ -250,33 +249,4 @@ bool isMainThread() } #endif -#if ENABLE(PARALLEL_GC) -static ThreadSpecific* isGCThread; - -void registerGCThread() -{ - if (!isGCThread) { - // This happens if we're running in a process that doesn't care about - // MainThread. - return; - } - - **isGCThread = true; -} - -bool isMainThreadOrGCThread() -{ - if (isGCThread->isSet() && **isGCThread) - return true; - - return isMainThread(); -} -#elif PLATFORM(MAC) -// This is necessary because JavaScriptCore.exp doesn't support preprocessor macros. -bool isMainThreadOrGCThread() -{ - return isMainThread(); -} -#endif - } // namespace WTF diff --git a/Source/JavaScriptCore/wtf/Platform.h b/Source/JavaScriptCore/wtf/Platform.h index 26e3b75..90debd9 100644 --- a/Source/JavaScriptCore/wtf/Platform.h +++ b/Source/JavaScriptCore/wtf/Platform.h @@ -1120,7 +1120,7 @@ #define ENABLE_COMPARE_AND_SWAP 1 #endif -#if !defined(ENABLE_PARALLEL_GC) && (PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(QT)) && ENABLE(COMPARE_AND_SWAP) +#if !defined(ENABLE_PARALLEL_GC) && (PLATFORM(MAC) || PLATFORM(IOS)) && ENABLE(COMPARE_AND_SWAP) #define ENABLE_PARALLEL_GC 1 #endif diff --git a/Source/JavaScriptCore/wtf/mac/MainThreadMac.mm b/Source/JavaScriptCore/wtf/mac/MainThreadMac.mm index ee57fed..fbc6250 100644 --- a/Source/JavaScriptCore/wtf/mac/MainThreadMac.mm +++ b/Source/JavaScriptCore/wtf/mac/MainThreadMac.mm @@ -145,4 +145,31 @@ bool isMainThread() return pthread_equal(pthread_self(), mainThreadPthread); } +#if ENABLE(PARALLEL_GC) +void registerGCThread() +{ + if (!isGCThread) { + // This happens if we're running in a process that doesn't care about + // MainThread. + return; + } + + **isGCThread = true; +} + +bool isMainThreadOrGCThread() +{ + if (isGCThread->isSet() && **isGCThread) + return true; + + return isMainThread(); +} +#else +// This is necessary because JavaScriptCore.exp doesn't support preprocessor macros. +bool isMainThreadOrGCThread() +{ + return isMainThread(); +} +#endif + } // namespace WTF -- 2.7.4