Title: [95663] trunk/Source/_javascript_Core
Revision
95663
Author
[email protected]
Date
2011-09-21 12:34:39 -0700 (Wed, 21 Sep 2011)

Log Message

Removed WTFTHREADDATA_MULTITHREADED, making it always true
https://bugs.webkit.org/show_bug.cgi?id=68549

Reviewed by Darin Adler.
        
Another part of making threads exist in WebKit.

* wtf/WTFThreadData.cpp:
* wtf/WTFThreadData.h:
(WTF::wtfThreadData):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (95662 => 95663)


--- trunk/Source/_javascript_Core/ChangeLog	2011-09-21 19:33:10 UTC (rev 95662)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-09-21 19:34:39 UTC (rev 95663)
@@ -1,3 +1,16 @@
+2011-09-21  Geoffrey Garen  <[email protected]>
+
+        Removed WTFTHREADDATA_MULTITHREADED, making it always true
+        https://bugs.webkit.org/show_bug.cgi?id=68549
+
+        Reviewed by Darin Adler.
+        
+        Another part of making threads exist in WebKit.
+
+        * wtf/WTFThreadData.cpp:
+        * wtf/WTFThreadData.h:
+        (WTF::wtfThreadData):
+
 2011-09-21  Dan Bernstein  <[email protected]>
 
         _javascript_Core Part of: Prevent the WebKit frameworks from defining inappropriately-named Objective-C classes

Modified: trunk/Source/_javascript_Core/wtf/WTFThreadData.cpp (95662 => 95663)


--- trunk/Source/_javascript_Core/wtf/WTFThreadData.cpp	2011-09-21 19:33:10 UTC (rev 95662)
+++ trunk/Source/_javascript_Core/wtf/WTFThreadData.cpp	2011-09-21 19:34:39 UTC (rev 95663)
@@ -29,11 +29,7 @@
 
 namespace WTF {
 
-#if WTFTHREADDATA_MULTITHREADED
 ThreadSpecific<WTFThreadData>* WTFThreadData::staticData;
-#else
-WTFThreadData* WTFThreadData::staticData;
-#endif
 
 WTFThreadData::WTFThreadData()
     : m_atomicStringTable(0)

Modified: trunk/Source/_javascript_Core/wtf/WTFThreadData.h (95662 => 95663)


--- trunk/Source/_javascript_Core/wtf/WTFThreadData.h	2011-09-21 19:33:10 UTC (rev 95662)
+++ trunk/Source/_javascript_Core/wtf/WTFThreadData.h	2011-09-21 19:34:39 UTC (rev 95663)
@@ -32,19 +32,8 @@
 #include <wtf/Noncopyable.h>
 #include <wtf/StackBounds.h>
 #include <wtf/text/StringHash.h>
-
-// This was ENABLE(WORKERS) in WebCore, but this is not defined when compiling JSC.
-// However this check was not correct anyway, re this comment:
-//    // FIXME: Workers are not necessarily the only feature that make per-thread global data necessary.
-//    // We need to check for e.g. database objects manipulating strings on secondary threads.
-// Always enabling this is safe, and should be a better option until we can come up
-// with a better define.
-#define WTFTHREADDATA_MULTITHREADED 1
-
-#if WTFTHREADDATA_MULTITHREADED
 #include <wtf/ThreadSpecific.h>
 #include <wtf/Threading.h>
-#endif
 
 #if USE(JSC)
 // FIXME: This is a temporary layering violation while we move more string code to WTF.
@@ -131,18 +120,13 @@
     StackBounds m_stackBounds;
 #endif
 
-#if WTFTHREADDATA_MULTITHREADED
     static JS_EXPORTDATA ThreadSpecific<WTFThreadData>* staticData;
-#else
-    static JS_EXPORTDATA WTFThreadData* staticData;
-#endif
     friend WTFThreadData& wtfThreadData();
     friend class AtomicStringTable;
 };
 
 inline WTFThreadData& wtfThreadData()
 {
-#if WTFTHREADDATA_MULTITHREADED
     // WRT WebCore:
     //    WTFThreadData is used on main thread before it could possibly be used
     //    on secondary ones, so there is no need for synchronization here.
@@ -152,14 +136,6 @@
     if (!WTFThreadData::staticData)
         WTFThreadData::staticData = new ThreadSpecific<WTFThreadData>;
     return **WTFThreadData::staticData;
-#else
-    if (!WTFThreadData::staticData) {
-        WTFThreadData::staticData = static_cast<WTFThreadData*>(fastMalloc(sizeof(WTFThreadData)));
-        // WTFThreadData constructor indirectly uses staticData, so we need to set up the memory before invoking it.
-        new (WTFThreadData::staticData) WTFThreadData;
-    }
-    return *WTFThreadData::staticData;
-#endif
 }
 
 } // namespace WTF
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to