Title: [160140] trunk/Source/_javascript_Core
Revision
160140
Author
[email protected]
Date
2013-12-04 16:06:13 -0800 (Wed, 04 Dec 2013)

Log Message

Unreviewed, rolling out r160116.
http://trac.webkit.org/changeset/160116
https://bugs.webkit.org/show_bug.cgi?id=125264

Change doesn't work as intended. See bug comments for details.
(Requested by bfulgham on #webkit).

* runtime/InitializeThreading.cpp:
(JSC::initializeThreading):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (160139 => 160140)


--- trunk/Source/_javascript_Core/ChangeLog	2013-12-05 00:06:09 UTC (rev 160139)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-12-05 00:06:13 UTC (rev 160140)
@@ -1,3 +1,15 @@
+2013-12-04  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r160116.
+        http://trac.webkit.org/changeset/160116
+        https://bugs.webkit.org/show_bug.cgi?id=125264
+
+        Change doesn't work as intended. See bug comments for details.
+        (Requested by bfulgham on #webkit).
+
+        * runtime/InitializeThreading.cpp:
+        (JSC::initializeThreading):
+
 2013-12-04  Oliver Hunt  <[email protected]>
 
         Refactor static getter function prototype to include thisValue in addition to the base object

Modified: trunk/Source/_javascript_Core/runtime/InitializeThreading.cpp (160139 => 160140)


--- trunk/Source/_javascript_Core/runtime/InitializeThreading.cpp	2013-12-05 00:06:09 UTC (rev 160139)
+++ trunk/Source/_javascript_Core/runtime/InitializeThreading.cpp	2013-12-05 00:06:13 UTC (rev 160140)
@@ -41,13 +41,16 @@
 #include "WriteBarrier.h"
 #include <wtf/dtoa.h>
 #include <wtf/Threading.h>
-#include <wtf/ThreadingOnce.h>
 #include <wtf/dtoa/cached-powers.h>
 
 using namespace WTF;
 
 namespace JSC {
 
+#if OS(DARWIN)
+static pthread_once_t initializeThreadingKeyOnce = PTHREAD_ONCE_INIT;
+#endif
+
 static void initializeThreadingOnce()
 {
     WTF::double_conversion::initialize();
@@ -73,8 +76,15 @@
 
 void initializeThreading()
 {
-    static WTF::ThreadingOnce initializeThreadingKeyOnce;
-    initializeThreadingKeyOnce.callOnce(initializeThreadingOnce);
+#if OS(DARWIN)
+    pthread_once(&initializeThreadingKeyOnce, initializeThreadingOnce);
+#else
+    static bool initializedThreading = false;
+    if (!initializedThreading) {
+        initializeThreadingOnce();
+        initializedThreading = true;
+    }
+#endif
 }
 
 } // namespace JSC
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to