2011-03-20 Bill Budge <bbudge@chromium.org>
authorlevin@chromium.org <levin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 20 Mar 2011 23:30:26 +0000 (23:30 +0000)
committerlevin@chromium.org <levin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 20 Mar 2011 23:30:26 +0000 (23:30 +0000)
        Reviewed by Adam Barth.

        Rename ThreadSafeShared to ThreadSafeRefCounted
        https://bugs.webkit.org/show_bug.cgi?id=56714

        No new tests. Exposes no new functionality.

        * API/JSClassRef.h:
        * API/OpaqueJSString.h:
        * GNUmakefile.am:
        * JavaScriptCore.gypi:
        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * wtf/Atomics.h:
        * wtf/CMakeLists.txt:
        * wtf/CrossThreadRefCounted.h:
        (WTF::CrossThreadRefCounted::CrossThreadRefCounted):
        (WTF::::crossThreadCopy):
        * wtf/ThreadSafeRefCounted.h: Copied from wtf/ThreadSafeShared.h.
        (WTF::ThreadSafeRefCountedBase::ThreadSafeRefCountedBase):
        (WTF::ThreadSafeRefCountedBase::ref):
        (WTF::ThreadSafeRefCountedBase::refCount):
        (WTF::ThreadSafeRefCountedBase::derefBase):
        (WTF::ThreadSafeRefCounted::ThreadSafeRefCounted):
        * wtf/ThreadSafeShared.h: Removed.
        * wtf/Threading.h:

2011-03-20  Bill Budge  <bbudge@chromium.org>

        Reviewed by Adam Barth.

        Rename ThreadSafeShared to ThreadSafeRefCounted
        https://bugs.webkit.org/show_bug.cgi?id=56714

        No new tests. Exposes no new functionality.

        * ForwardingHeaders/wtf/ThreadSafeRefCounted.h: Copied from ForwardingHeaders/wtf/ThreadSafeShared.h.
        * ForwardingHeaders/wtf/ThreadSafeShared.h: Removed.
        * gyp/JavaScriptGlue.gypi:

2011-03-20  Bill Budge  <bbudge@chromium.org>

        Reviewed by Adam Barth.

        Rename ThreadSafeShared to ThreadSafeRefCounted
        https://bugs.webkit.org/show_bug.cgi?id=56714

        No new tests. Exposes no new functionality.

        * ForwardingHeaders/wtf/ThreadSafeRefCounted.h: Copied from ForwardingHeaders/wtf/ThreadSafeShared.h.
        * ForwardingHeaders/wtf/ThreadSafeShared.h: Removed.
        * bindings/v8/SerializedScriptValue.h:
        * dom/Document.cpp:
        * dom/default/PlatformMessagePortChannel.h:
        * fileapi/FileThread.h:
        * loader/ThreadableLoaderClientWrapper.h:
        (WebCore::ThreadableLoaderClientWrapper::create):
        (WebCore::ThreadableLoaderClientWrapper::clearClient):
        (WebCore::ThreadableLoaderClientWrapper::done):
        (WebCore::ThreadableLoaderClientWrapper::didSendData):
        (WebCore::ThreadableLoaderClientWrapper::didReceiveResponse):
        (WebCore::ThreadableLoaderClientWrapper::didReceiveData):
        (WebCore::ThreadableLoaderClientWrapper::didReceiveCachedMetadata):
        (WebCore::ThreadableLoaderClientWrapper::didFinishLoading):
        (WebCore::ThreadableLoaderClientWrapper::didFail):
        (WebCore::ThreadableLoaderClientWrapper::didFailRedirectCheck):
        (WebCore::ThreadableLoaderClientWrapper::didReceiveAuthenticationCancellation):
        (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper):
        * page/SecurityOrigin.h:
        * platform/CrossThreadCopier.h:
        * platform/network/BlobData.h:
        * platform/network/cf/SocketStreamHandle.h:
        * storage/AbstractDatabase.h:
        * storage/DatabaseAuthorizer.h:
        * storage/DatabaseCallback.h:
        * storage/DatabaseThread.h:
        * storage/IDBCallbacks.h:
        * storage/IDBCursorBackendInterface.h:
        * storage/IDBDatabaseBackendInterface.h:
        * storage/IDBFactoryBackendInterface.h:
        * storage/IDBIndexBackendInterface.h:
        * storage/IDBKey.h:
        * storage/IDBKeyRange.h:
        * storage/IDBObjectStoreBackendInterface.h:
        * storage/IDBRequest.h:
        * storage/IDBTransactionBackendInterface.h:
        * storage/SQLError.h:
        * storage/SQLResultSet.h:
        * storage/SQLStatement.h:
        * storage/SQLStatementCallback.h:
        * storage/SQLStatementErrorCallback.h:
        * storage/SQLTransaction.h:
        * storage/SQLTransactionCallback.h:
        * storage/SQLTransactionErrorCallback.h:
        * websockets/ThreadableWebSocketChannelClientWrapper.h:
        * workers/DefaultSharedWorkerRepository.cpp:

2011-03-20  Bill Budge  <bbudge@chromium.org>

        Reviewed by Adam Barth.

        Rename ThreadSafeShared to ThreadSafeRefCounted
        https://bugs.webkit.org/show_bug.cgi?id=56714

        No new tests. Exposes no new functionality.

        * Platform/CoreIPC/Connection.h:
        * Platform/WorkQueue.h:
        * Platform/win/WorkQueueWin.cpp:
        * UIProcess/Launcher/ProcessLauncher.h:
        * UIProcess/Launcher/ThreadLauncher.h:

2011-03-20  Bill Budge  <bbudge@chromium.org>

        Reviewed by Adam Barth.

        Rename ThreadSafeShared to ThreadSafeRefCounted
        https://bugs.webkit.org/show_bug.cgi?id=56714

        No new tests. Exposes no new functionality.

        * src/PlatformMessagePortChannel.h:
        * src/WebWorkerBase.cpp:
        * src/WorkerFileSystemCallbacksBridge.h:
        * src/WorkerFileWriterCallbacksBridge.h:

2011-03-20  Bill Budge  <bbudge@chromium.org>

        Reviewed by Adam Barth.

        Rename ThreadSafeShared to ThreadSafeRefCounted
        https://bugs.webkit.org/show_bug.cgi?id=56714

        No new tests. Exposes no new functionality.

        * DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeRefCounted.h: Copied from DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeShared.h.
        * DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeShared.h: Removed.
        * Scripts/do-webcore-rename:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81567 268f45cc-cd09-0410-ab3c-d52691b4dbfc

67 files changed:
Source/JavaScriptCore/API/JSClassRef.h
Source/JavaScriptCore/API/OpaqueJSString.h
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/GNUmakefile.am
Source/JavaScriptCore/JavaScriptCore.gypi
Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/wtf/Atomics.h
Source/JavaScriptCore/wtf/CMakeLists.txt
Source/JavaScriptCore/wtf/CrossThreadRefCounted.h
Source/JavaScriptCore/wtf/ThreadSafeRefCounted.h [moved from Source/JavaScriptCore/wtf/ThreadSafeShared.h with 88% similarity]
Source/JavaScriptCore/wtf/Threading.h
Source/JavaScriptGlue/ChangeLog
Source/JavaScriptGlue/ForwardingHeaders/wtf/ThreadSafeRefCounted.h [new file with mode: 0644]
Source/JavaScriptGlue/ForwardingHeaders/wtf/ThreadSafeShared.h [deleted file]
Source/JavaScriptGlue/gyp/JavaScriptGlue.gypi
Source/WebCore/ChangeLog
Source/WebCore/ForwardingHeaders/wtf/ThreadSafeRefCounted.h [new file with mode: 0644]
Source/WebCore/ForwardingHeaders/wtf/ThreadSafeShared.h [deleted file]
Source/WebCore/bindings/v8/SerializedScriptValue.h
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/default/PlatformMessagePortChannel.h
Source/WebCore/fileapi/FileThread.h
Source/WebCore/loader/ThreadableLoaderClientWrapper.h
Source/WebCore/page/SecurityOrigin.h
Source/WebCore/platform/CrossThreadCopier.h
Source/WebCore/platform/network/BlobData.h
Source/WebCore/platform/network/cf/SocketStreamHandle.h
Source/WebCore/storage/AbstractDatabase.h
Source/WebCore/storage/DatabaseAuthorizer.h
Source/WebCore/storage/DatabaseCallback.h
Source/WebCore/storage/DatabaseThread.h
Source/WebCore/storage/IDBCallbacks.h
Source/WebCore/storage/IDBCursorBackendInterface.h
Source/WebCore/storage/IDBDatabaseBackendInterface.h
Source/WebCore/storage/IDBFactoryBackendInterface.h
Source/WebCore/storage/IDBIndexBackendInterface.h
Source/WebCore/storage/IDBKey.h
Source/WebCore/storage/IDBKeyRange.h
Source/WebCore/storage/IDBObjectStoreBackendInterface.h
Source/WebCore/storage/IDBRequest.h
Source/WebCore/storage/IDBTransactionBackendInterface.h
Source/WebCore/storage/SQLError.h
Source/WebCore/storage/SQLResultSet.h
Source/WebCore/storage/SQLStatement.h
Source/WebCore/storage/SQLStatementCallback.h
Source/WebCore/storage/SQLStatementErrorCallback.h
Source/WebCore/storage/SQLTransaction.h
Source/WebCore/storage/SQLTransactionCallback.h
Source/WebCore/storage/SQLTransactionErrorCallback.h
Source/WebCore/websockets/ThreadableWebSocketChannelClientWrapper.h
Source/WebCore/workers/DefaultSharedWorkerRepository.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/PlatformMessagePortChannel.h
Source/WebKit/chromium/src/WebWorkerBase.cpp
Source/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.h
Source/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.h
Source/WebKit2/ChangeLog
Source/WebKit2/Platform/CoreIPC/Connection.h
Source/WebKit2/Platform/WorkQueue.h
Source/WebKit2/Platform/win/WorkQueueWin.cpp
Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h
Source/WebKit2/UIProcess/Launcher/ThreadLauncher.h
Tools/ChangeLog
Tools/DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeRefCounted.h [new file with mode: 0644]
Tools/DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeShared.h [deleted file]
Tools/Scripts/do-webcore-rename

index 0f4119a..239c5a4 100644 (file)
@@ -85,7 +85,7 @@ public:
     JSC::WeakGCPtr<JSC::JSObject> cachedPrototype;
 };
 
-struct OpaqueJSClass : public ThreadSafeShared<OpaqueJSClass> {
+struct OpaqueJSClass : public ThreadSafeRefCounted<OpaqueJSClass> {
     static PassRefPtr<OpaqueJSClass> create(const JSClassDefinition*);
     static PassRefPtr<OpaqueJSClass> createNoAutomaticPrototype(const JSClassDefinition*);
     ~OpaqueJSClass();
index 473c815..69c0962 100644 (file)
@@ -33,7 +33,7 @@ namespace JSC {
     class JSGlobalData;
 }
 
-struct OpaqueJSString : public ThreadSafeShared<OpaqueJSString> {
+struct OpaqueJSString : public ThreadSafeRefCounted<OpaqueJSString> {
 
     static PassRefPtr<OpaqueJSString> create() // null
     {
@@ -54,7 +54,7 @@ struct OpaqueJSString : public ThreadSafeShared<OpaqueJSString> {
     JSC::Identifier identifier(JSC::JSGlobalData*) const;
 
 private:
-    friend class WTF::ThreadSafeShared<OpaqueJSString>;
+    friend class WTF::ThreadSafeRefCounted<OpaqueJSString>;
 
     OpaqueJSString()
         : m_characters(0)
index 9522071..5277ae3 100644 (file)
@@ -1,3 +1,32 @@
+2011-03-20  Bill Budge  <bbudge@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Rename ThreadSafeShared to ThreadSafeRefCounted
+        https://bugs.webkit.org/show_bug.cgi?id=56714
+
+        No new tests. Exposes no new functionality.
+
+        * API/JSClassRef.h:
+        * API/OpaqueJSString.h:
+        * GNUmakefile.am:
+        * JavaScriptCore.gypi:
+        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * wtf/Atomics.h:
+        * wtf/CMakeLists.txt:
+        * wtf/CrossThreadRefCounted.h:
+        (WTF::CrossThreadRefCounted::CrossThreadRefCounted):
+        (WTF::::crossThreadCopy):
+        * wtf/ThreadSafeRefCounted.h: Copied from wtf/ThreadSafeShared.h.
+        (WTF::ThreadSafeRefCountedBase::ThreadSafeRefCountedBase):
+        (WTF::ThreadSafeRefCountedBase::ref):
+        (WTF::ThreadSafeRefCountedBase::refCount):
+        (WTF::ThreadSafeRefCountedBase::derefBase):
+        (WTF::ThreadSafeRefCounted::ThreadSafeRefCounted):
+        * wtf/ThreadSafeShared.h: Removed.
+        * wtf/Threading.h:
+
 2011-03-19  Patrick Gansterer  <paroga@webkit.org>
 
         Reviewed by Darin Adler.
index 186a791..122b5a5 100644 (file)
@@ -551,7 +551,7 @@ javascriptcore_sources += \
        Source/JavaScriptCore/wtf/Threading.h \
        Source/JavaScriptCore/wtf/ThreadingPrimitives.h \
        Source/JavaScriptCore/wtf/ThreadingPthreads.cpp \
-       Source/JavaScriptCore/wtf/ThreadSafeShared.h \
+       Source/JavaScriptCore/wtf/ThreadSafeRefCounted.h \
        Source/JavaScriptCore/wtf/ThreadSpecific.h \
        Source/JavaScriptCore/wtf/TypeTraits.cpp \
        Source/JavaScriptCore/wtf/TypeTraits.h \
index 48f4dff..c7cdfea 100644 (file)
             'wtf/StdLibExtras.h',
             'wtf/StringExtras.h',
             'wtf/StringHasher.h',
-            'wtf/ThreadSafeShared.h',
+            'wtf/ThreadSafeRefCounted.h',
             'wtf/ThreadSpecific.h',
             'wtf/Threading.h',
             'wtf/ThreadingPrimitives.h',
index 8f0cfcb..39a1dc3 100644 (file)
                        >
                </File>
                <File
-                       RelativePath="..\..\wtf\ThreadSafeShared.h"
+                       RelativePath="..\..\wtf\ThreadSafeRefCounted.h"
                        >
                </File>
                <File
index 121adb9..d4a2843 100644 (file)
                BC3135650F302FA3003DFD3A /* DebuggerActivation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC3135630F302FA3003DFD3A /* DebuggerActivation.cpp */; };
                BC5F7BBE11823B590052C02C /* Atomics.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5F7BBB11823B590052C02C /* Atomics.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BC5F7BBF11823B590052C02C /* ThreadingPrimitives.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5F7BBC11823B590052C02C /* ThreadingPrimitives.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               BC5F7BC011823B590052C02C /* ThreadSafeShared.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5F7BBD11823B590052C02C /* ThreadSafeShared.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               BC5F7BC011823B590052C02C /* ThreadSafeRefCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5F7BBD11823B590052C02C /* ThreadSafeRefCounted.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BC6AAAE50E1F426500AD87D8 /* ClassInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = BC6AAAE40E1F426500AD87D8 /* ClassInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BC756FC90E2031B200DE7D12 /* JSGlobalObjectFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = BC756FC70E2031B200DE7D12 /* JSGlobalObjectFunctions.h */; };
                BC7F8FB90E19D1C3008632C0 /* JSNumberCell.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7F8FB80E19D1C3008632C0 /* JSNumberCell.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BC337BEA0E1B00CB0076918A /* Error.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Error.cpp; sourceTree = "<group>"; };
                BC5F7BBB11823B590052C02C /* Atomics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Atomics.h; sourceTree = "<group>"; };
                BC5F7BBC11823B590052C02C /* ThreadingPrimitives.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadingPrimitives.h; sourceTree = "<group>"; };
-               BC5F7BBD11823B590052C02C /* ThreadSafeShared.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadSafeShared.h; sourceTree = "<group>"; };
+               BC5F7BBD11823B590052C02C /* ThreadSafeRefCounted.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadSafeRefCounted.h; sourceTree = "<group>"; };
                BC6AAAE40E1F426500AD87D8 /* ClassInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClassInfo.h; sourceTree = "<group>"; };
                BC756FC60E2031B200DE7D12 /* JSGlobalObjectFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGlobalObjectFunctions.cpp; sourceTree = "<group>"; };
                BC756FC70E2031B200DE7D12 /* JSGlobalObjectFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalObjectFunctions.h; sourceTree = "<group>"; };
                                E1EE79220D6C95CD00FEA3BA /* Threading.h */,
                                BC5F7BBC11823B590052C02C /* ThreadingPrimitives.h */,
                                E1EE793C0D6C9B9200FEA3BA /* ThreadingPthreads.cpp */,
-                               BC5F7BBD11823B590052C02C /* ThreadSafeShared.h */,
+                               BC5F7BBD11823B590052C02C /* ThreadSafeRefCounted.h */,
                                E1B7C8BD0DA3A3360074B0DC /* ThreadSpecific.h */,
                                0B330C260F38C62300692DE3 /* TypeTraits.cpp */,
                                0B4D7E620F319AC800AD7E58 /* TypeTraits.h */,
                                18BAB55410DAE066000D945B /* ThreadIdentifierDataPthreads.h in Headers */,
                                BC18C4700E16F5CD00B34460 /* Threading.h in Headers */,
                                BC5F7BBF11823B590052C02C /* ThreadingPrimitives.h in Headers */,
-                               BC5F7BC011823B590052C02C /* ThreadSafeShared.h in Headers */,
+                               BC5F7BC011823B590052C02C /* ThreadSafeRefCounted.h in Headers */,
                                BC18C4710E16F5CD00B34460 /* ThreadSpecific.h in Headers */,
                                A7386556118697B400540279 /* ThunkGenerators.h in Headers */,
                                14A42E400F4F60EE00599099 /* TimeoutChecker.h in Headers */,
index 1d190a3..1ebd487 100644 (file)
@@ -78,7 +78,7 @@
 namespace WTF {
 
 #if OS(WINDOWS)
-#define WTF_USE_LOCKFREE_THREADSAFESHARED 1
+#define WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED 1
 
 #if COMPILER(MINGW) || COMPILER(MSVC7_OR_LOWER) || OS(WINCE)
 inline int atomicIncrement(int* addend) { return InterlockedIncrement(reinterpret_cast<long*>(addend)); }
@@ -89,7 +89,7 @@ inline int atomicDecrement(int volatile* addend) { return InterlockedDecrement(r
 #endif
 
 #elif OS(DARWIN)
-#define WTF_USE_LOCKFREE_THREADSAFESHARED 1
+#define WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED 1
 
 inline int atomicIncrement(int volatile* addend) { return OSAtomicIncrement32Barrier(const_cast<int*>(addend)); }
 inline int atomicDecrement(int volatile* addend) { return OSAtomicDecrement32Barrier(const_cast<int*>(addend)); }
@@ -100,7 +100,7 @@ inline int atomicIncrement(int volatile* addend) { return android_atomic_inc(add
 inline int atomicDecrement(int volatile* addend) { return android_atomic_dec(addend); }
 
 #elif COMPILER(GCC) && !CPU(SPARC64) && !OS(SYMBIAN) // sizeof(_Atomic_word) != sizeof(int) on sparc64 gcc
-#define WTF_USE_LOCKFREE_THREADSAFESHARED 1
+#define WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED 1
 
 inline int atomicIncrement(int volatile* addend) { return __gnu_cxx::__exchange_and_add(addend, 1) + 1; }
 inline int atomicDecrement(int volatile* addend) { return __gnu_cxx::__exchange_and_add(addend, -1) - 1; }
@@ -109,7 +109,7 @@ inline int atomicDecrement(int volatile* addend) { return __gnu_cxx::__exchange_
 
 } // namespace WTF
 
-#if USE(LOCKFREE_THREADSAFESHARED)
+#if USE(LOCKFREE_THREADSAFEREFCOUNTED)
 using WTF::atomicDecrement;
 using WTF::atomicIncrement;
 #endif
index c27b2e5..5c5aca6 100644 (file)
@@ -76,7 +76,7 @@ SET(WTF_HEADERS
     TCSpinLock.h
     TCSystemAlloc.h
     ThreadIdentifierDataPthreads.h
-    ThreadSafeShared.h
+    ThreadSafeRefCounted.h
     ThreadSpecific.h
     Threading.h
     ThreadingPrimitives.h
index 8b65977..9d093ee 100644 (file)
 
 namespace WTF {
 
-    // Used to allowing sharing data across classes and threads (like ThreadedSafeShared).
+    // Used to allowing sharing data across classes and threads (like ThreadSafeRefCounted).
     //
-    // Why not just use ThreadSafeShared?
-    // ThreadSafeShared can have a significant perf impact when used in low level classes
+    // Why not just use ThreadSafeRefCounted?
+    // ThreadSafeRefCounted can have a significant perf impact when used in low level classes
     // (like UString) that get ref/deref'ed a lot. This class has the benefit of doing fast ref
     // counts like RefPtr whenever possible, but it has the downside that you need to copy it
     // to use it on another thread.
@@ -72,7 +72,7 @@ namespace WTF {
         }
 
     private:
-        CrossThreadRefCounted(T* data, ThreadSafeSharedBase* threadedCounter)
+        CrossThreadRefCounted(T* data, ThreadSafeRefCountedBase* threadedCounter)
             : m_threadSafeRefCounter(threadedCounter)
             , m_data(data)
 #ifndef NDEBUG
@@ -97,7 +97,7 @@ namespace WTF {
 #endif
 
         RefCountedBase m_refCounter;
-        ThreadSafeSharedBase* m_threadSafeRefCounter;
+        ThreadSafeRefCountedBase* m_threadSafeRefCounter;
         T* m_data;
 #ifndef NDEBUG
         ThreadIdentifier m_threadId;
@@ -154,7 +154,7 @@ namespace WTF {
         if (m_threadSafeRefCounter)
             m_threadSafeRefCounter->ref();
         else
-            m_threadSafeRefCounter = new ThreadSafeSharedBase(2);
+            m_threadSafeRefCounter = new ThreadSafeRefCountedBase(2);
 
         return adoptRef(new CrossThreadRefCounted<T>(m_data, m_threadSafeRefCounter));
     }
@@ -56,8 +56,8 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-#ifndef ThreadSafeShared_h
-#define ThreadSafeShared_h
+#ifndef ThreadSafeRefCounted_h
+#define ThreadSafeRefCounted_h
 
 #include "Platform.h"
 
 
 namespace WTF {
 
-class ThreadSafeSharedBase {
-    WTF_MAKE_NONCOPYABLE(ThreadSafeSharedBase); WTF_MAKE_FAST_ALLOCATED;
+class ThreadSafeRefCountedBase {
+    WTF_MAKE_NONCOPYABLE(ThreadSafeRefCountedBase);
+    WTF_MAKE_FAST_ALLOCATED;
 public:
-    ThreadSafeSharedBase(int initialRefCount = 1)
+    ThreadSafeRefCountedBase(int initialRefCount = 1)
         : m_refCount(initialRefCount)
     {
     }
 
     void ref()
     {
-#if USE(LOCKFREE_THREADSAFESHARED)
+#if USE(LOCKFREE_THREADSAFEREFCOUNTED)
         atomicIncrement(&m_refCount);
 #else
         MutexLocker locker(m_mutex);
@@ -91,7 +92,7 @@ public:
 
     int refCount() const
     {
-#if !USE(LOCKFREE_THREADSAFESHARED)
+#if !USE(LOCKFREE_THREADSAFEREFCOUNTED)
         MutexLocker locker(m_mutex);
 #endif
         return static_cast<int const volatile &>(m_refCount);
@@ -101,7 +102,7 @@ protected:
     // Returns whether the pointer should be freed or not.
     bool derefBase()
     {
-#if USE(LOCKFREE_THREADSAFESHARED)
+#if USE(LOCKFREE_THREADSAFEREFCOUNTED)
         if (atomicDecrement(&m_refCount) <= 0)
             return true;
 #else
@@ -122,12 +123,12 @@ private:
     friend class CrossThreadRefCounted;
 
     int m_refCount;
-#if !USE(LOCKFREE_THREADSAFESHARED)
+#if !USE(LOCKFREE_THREADSAFEREFCOUNTED)
     mutable Mutex m_mutex;
 #endif
 };
 
-template<class T> class ThreadSafeShared : public ThreadSafeSharedBase {
+template<class T> class ThreadSafeRefCounted : public ThreadSafeRefCountedBase {
 public:
     void deref()
     {
@@ -136,13 +137,13 @@ public:
     }
 
 protected:
-    ThreadSafeShared()
+    ThreadSafeRefCounted()
     {
     }
 };
 
 } // namespace WTF
 
-using WTF::ThreadSafeShared;
+using WTF::ThreadSafeRefCounted;
 
-#endif // ThreadSafeShared_h
+#endif // ThreadSafeRefCounted_h
index 044365f..b6f8c24 100644 (file)
@@ -67,7 +67,7 @@
 #include <wtf/Locker.h>
 #include <wtf/MainThread.h>
 #include <wtf/Noncopyable.h>
-#include <wtf/ThreadSafeShared.h>
+#include <wtf/ThreadSafeRefCounted.h>
 #include <wtf/ThreadingPrimitives.h>
 
 // For portability, we do not use thread-safe statics natively supported by some compilers (e.g. gcc).
index c8ab32b..554ec29 100644 (file)
@@ -1,3 +1,16 @@
+2011-03-20  Bill Budge  <bbudge@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Rename ThreadSafeShared to ThreadSafeRefCounted
+        https://bugs.webkit.org/show_bug.cgi?id=56714
+
+        No new tests. Exposes no new functionality.ยง
+
+        * ForwardingHeaders/wtf/ThreadSafeRefCounted.h: Copied from ForwardingHeaders/wtf/ThreadSafeShared.h.
+        * ForwardingHeaders/wtf/ThreadSafeShared.h: Removed.
+        * gyp/JavaScriptGlue.gypi:
+
 2011-03-17  Jeff Miller  <jeffm@apple.com>
 
         Use a consistent set of file patterns in the svn:ignore property for all .xcodeproj directories, specifically:
diff --git a/Source/JavaScriptGlue/ForwardingHeaders/wtf/ThreadSafeRefCounted.h b/Source/JavaScriptGlue/ForwardingHeaders/wtf/ThreadSafeRefCounted.h
new file mode 100644 (file)
index 0000000..48a54cc
--- /dev/null
@@ -0,0 +1 @@
+#include <JavaScriptCore/ThreadSafeRefCounted.h>
diff --git a/Source/JavaScriptGlue/ForwardingHeaders/wtf/ThreadSafeShared.h b/Source/JavaScriptGlue/ForwardingHeaders/wtf/ThreadSafeShared.h
deleted file mode 100644 (file)
index 4a7a77f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <JavaScriptCore/ThreadSafeShared.h>
index abc98d0..adb35c4 100644 (file)
@@ -67,7 +67,7 @@
             '../ForwardingHeaders/wtf/text/WTFString.h',
             '../ForwardingHeaders/wtf/Threading.h',
             '../ForwardingHeaders/wtf/ThreadingPrimitives.h',
-            '../ForwardingHeaders/wtf/ThreadSafeShared.h',
+            '../ForwardingHeaders/wtf/ThreadSafeRefCounted.h',
             '../ForwardingHeaders/wtf/ThreadSpecific.h',
             '../ForwardingHeaders/wtf/unicode/icu/UnicodeIcu.h',
             '../ForwardingHeaders/wtf/unicode/Unicode.h',
index 7685d3c..a83eadf 100644 (file)
@@ -1,3 +1,60 @@
+2011-03-20  Bill Budge  <bbudge@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Rename ThreadSafeShared to ThreadSafeRefCounted
+        https://bugs.webkit.org/show_bug.cgi?id=56714
+
+        No new tests. Exposes no new functionality.
+
+        * ForwardingHeaders/wtf/ThreadSafeRefCounted.h: Copied from ForwardingHeaders/wtf/ThreadSafeShared.h.
+        * ForwardingHeaders/wtf/ThreadSafeShared.h: Removed.
+        * bindings/v8/SerializedScriptValue.h:
+        * dom/Document.cpp:
+        * dom/default/PlatformMessagePortChannel.h:
+        * fileapi/FileThread.h:
+        * loader/ThreadableLoaderClientWrapper.h:
+        (WebCore::ThreadableLoaderClientWrapper::create):
+        (WebCore::ThreadableLoaderClientWrapper::clearClient):
+        (WebCore::ThreadableLoaderClientWrapper::done):
+        (WebCore::ThreadableLoaderClientWrapper::didSendData):
+        (WebCore::ThreadableLoaderClientWrapper::didReceiveResponse):
+        (WebCore::ThreadableLoaderClientWrapper::didReceiveData):
+        (WebCore::ThreadableLoaderClientWrapper::didReceiveCachedMetadata):
+        (WebCore::ThreadableLoaderClientWrapper::didFinishLoading):
+        (WebCore::ThreadableLoaderClientWrapper::didFail):
+        (WebCore::ThreadableLoaderClientWrapper::didFailRedirectCheck):
+        (WebCore::ThreadableLoaderClientWrapper::didReceiveAuthenticationCancellation):
+        (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper):
+        * page/SecurityOrigin.h:
+        * platform/CrossThreadCopier.h:
+        * platform/network/BlobData.h:
+        * platform/network/cf/SocketStreamHandle.h:
+        * storage/AbstractDatabase.h:
+        * storage/DatabaseAuthorizer.h:
+        * storage/DatabaseCallback.h:
+        * storage/DatabaseThread.h:
+        * storage/IDBCallbacks.h:
+        * storage/IDBCursorBackendInterface.h:
+        * storage/IDBDatabaseBackendInterface.h:
+        * storage/IDBFactoryBackendInterface.h:
+        * storage/IDBIndexBackendInterface.h:
+        * storage/IDBKey.h:
+        * storage/IDBKeyRange.h:
+        * storage/IDBObjectStoreBackendInterface.h:
+        * storage/IDBRequest.h:
+        * storage/IDBTransactionBackendInterface.h:
+        * storage/SQLError.h:
+        * storage/SQLResultSet.h:
+        * storage/SQLStatement.h:
+        * storage/SQLStatementCallback.h:
+        * storage/SQLStatementErrorCallback.h:
+        * storage/SQLTransaction.h:
+        * storage/SQLTransactionCallback.h:
+        * storage/SQLTransactionErrorCallback.h:
+        * websockets/ThreadableWebSocketChannelClientWrapper.h:
+        * workers/DefaultSharedWorkerRepository.cpp:
+
 2011-03-20  Andreas Kling  <kling@webkit.org>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/Source/WebCore/ForwardingHeaders/wtf/ThreadSafeRefCounted.h b/Source/WebCore/ForwardingHeaders/wtf/ThreadSafeRefCounted.h
new file mode 100644 (file)
index 0000000..d7a35f8
--- /dev/null
@@ -0,0 +1,4 @@
+#ifndef WebCore_FWD_ThreadSafeRefCounted_h
+#define WebCore_FWD_ThreadSafeRefCounted_h
+#include <JavaScriptCore/ThreadSafeRefCounted.h>
+#endif
diff --git a/Source/WebCore/ForwardingHeaders/wtf/ThreadSafeShared.h b/Source/WebCore/ForwardingHeaders/wtf/ThreadSafeShared.h
deleted file mode 100644 (file)
index 50c2bf4..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef WebCore_FWD_ThreadSafeShared_h
-#define WebCore_FWD_ThreadSafeShared_h
-#include <JavaScriptCore/ThreadSafeShared.h>
-#endif
index c0e9109..212be66 100644 (file)
@@ -37,7 +37,7 @@
 
 namespace WebCore {
 
-class SerializedScriptValue : public ThreadSafeShared<SerializedScriptValue> {
+class SerializedScriptValue : public ThreadSafeRefCounted<SerializedScriptValue> {
 public:
     static void deserializeAndSetProperty(v8::Handle<v8::Object>, const char* propertyName,
                                           v8::PropertyAttribute, SerializedScriptValue*);
index 8bb8f52..2f8a320 100644 (file)
@@ -344,7 +344,7 @@ static bool disableRangeMutation(Page* page)
 
 static HashSet<Document*>* documentsThatNeedStyleRecalc = 0;
 
-class DocumentWeakReference : public ThreadSafeShared<DocumentWeakReference> {
+class DocumentWeakReference : public ThreadSafeRefCounted<DocumentWeakReference> {
 public:
     static PassRefPtr<DocumentWeakReference> create(Document* document)
     {
index 2aad952..651810b 100644 (file)
@@ -44,7 +44,7 @@ namespace WebCore {
     // PlatformMessagePortChannel is a platform-dependent interface to the remote side of a message channel.
     // This default implementation supports multiple threads running within a single process. Implementations for multi-process platforms should define these public APIs in their own platform-specific PlatformMessagePortChannel file.
     // The goal of this implementation is to eliminate contention except when cloning or closing the port, so each side of the channel has its own separate mutex.
-    class PlatformMessagePortChannel : public ThreadSafeShared<PlatformMessagePortChannel> {
+    class PlatformMessagePortChannel : public ThreadSafeRefCounted<PlatformMessagePortChannel> {
     public:
         static void createChannel(PassRefPtr<MessagePort>, PassRefPtr<MessagePort>);
 
@@ -59,7 +59,7 @@ namespace WebCore {
         MessagePort* locallyEntangledPort(const ScriptExecutionContext*);
 
         // Wrapper for MessageQueue that allows us to do thread safe sharing by two proxies.
-        class MessagePortQueue : public ThreadSafeShared<MessagePortQueue> {
+        class MessagePortQueue : public ThreadSafeRefCounted<MessagePortQueue> {
         public:
             static PassRefPtr<MessagePortQueue> create() { return adoptRef(new MessagePortQueue()); }
 
index 45205c4..9c1d267 100644 (file)
@@ -42,7 +42,7 @@ namespace WebCore {
 
 class FileStream;
 
-class FileThread : public ThreadSafeShared<FileThread> {
+class FileThread : public ThreadSafeRefCounted<FileThread> {
 public:
     static PassRefPtr<FileThread> create()
     {
index 664e0b3..d765fa0 100644 (file)
 
 namespace WebCore {
 
-    class ThreadableLoaderClientWrapper : public ThreadSafeShared<ThreadableLoaderClientWrapper> {
-    public:
-        static PassRefPtr<ThreadableLoaderClientWrapper> create(ThreadableLoaderClient* client)
-        {
-            return adoptRef(new ThreadableLoaderClientWrapper(client));
-        }
-
-        void clearClient()
-        {
-            m_done = true;
-            m_client = 0;
-        }
-
-        bool done() const
-        {
-            return m_done;
-        }
-
-        void didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent)
-        {
-            if (m_client)
-                m_client->didSendData(bytesSent, totalBytesToBeSent);
-        }
-
-        void didReceiveResponse(const ResourceResponse& response)
-        {
-            if (m_client)
-                m_client->didReceiveResponse(response);
-        }
-
-        void didReceiveData(const char* data, int dataLength)
-        {
-            if (m_client)
-                m_client->didReceiveData(data, dataLength);
-        }
-
-        void didReceiveCachedMetadata(const char* data, int dataLength)
-        {
-            if (m_client)
-                m_client->didReceiveCachedMetadata(data, dataLength);
-        }
-
-        void didFinishLoading(unsigned long identifier, double finishTime)
-        {
-            m_done = true;
-            if (m_client)
-                m_client->didFinishLoading(identifier, finishTime);
-        }
-
-        void didFail(const ResourceError& error)
-        {
-            m_done = true;
-            if (m_client)
-                m_client->didFail(error);
-        }
-
-        void didFailRedirectCheck()
-        {
-            m_done = true;
-            if (m_client)
-                m_client->didFailRedirectCheck();
-        }
-
-        void didReceiveAuthenticationCancellation(const ResourceResponse& response)
-        {
-            if (m_client)
-                m_client->didReceiveResponse(response);
-        }
-
-    protected:
-        ThreadableLoaderClientWrapper(ThreadableLoaderClient* client)
-            : m_client(client)
-            , m_done(false)
-        {
-        }
-
-        ThreadableLoaderClient* m_client;
-        bool m_done;
-    };
+class ThreadableLoaderClientWrapper : public ThreadSafeRefCounted<ThreadableLoaderClientWrapper> {
+public:
+    static PassRefPtr<ThreadableLoaderClientWrapper> create(ThreadableLoaderClient* client)
+    {
+        return adoptRef(new ThreadableLoaderClientWrapper(client));
+    }
+
+    void clearClient()
+    {
+        m_done = true;
+        m_client = 0;
+    }
+
+    bool done() const
+    {
+        return m_done;
+    }
+
+    void didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent)
+    {
+        if (m_client)
+            m_client->didSendData(bytesSent, totalBytesToBeSent);
+    }
+
+    void didReceiveResponse(const ResourceResponse& response)
+    {
+        if (m_client)
+            m_client->didReceiveResponse(response);
+    }
+
+    void didReceiveData(const char* data, int dataLength)
+    {
+        if (m_client)
+            m_client->didReceiveData(data, dataLength);
+    }
+
+    void didReceiveCachedMetadata(const char* data, int dataLength)
+    {
+        if (m_client)
+            m_client->didReceiveCachedMetadata(data, dataLength);
+    }
+
+    void didFinishLoading(unsigned long identifier, double finishTime)
+    {
+        m_done = true;
+        if (m_client)
+            m_client->didFinishLoading(identifier, finishTime);
+    }
+
+    void didFail(const ResourceError& error)
+    {
+        m_done = true;
+        if (m_client)
+            m_client->didFail(error);
+    }
+
+    void didFailRedirectCheck()
+    {
+        m_done = true;
+        if (m_client)
+            m_client->didFailRedirectCheck();
+    }
+
+    void didReceiveAuthenticationCancellation(const ResourceResponse& response)
+    {
+        if (m_client)
+            m_client->didReceiveResponse(response);
+    }
+
+protected:
+    ThreadableLoaderClientWrapper(ThreadableLoaderClient* client)
+        : m_client(client)
+        , m_done(false)
+    {
+    }
+
+    ThreadableLoaderClient* m_client;
+    bool m_done;
+};
 
 } // namespace WebCore
 
index f27c593..262dd8d 100644 (file)
 
 #include "FrameLoaderTypes.h"
 #include "PlatformString.h"
-#include <wtf/ThreadSafeShared.h>
+#include <wtf/ThreadSafeRefCounted.h>
 
 namespace WebCore {
 
 class Document;
 class KURL;
 
-class SecurityOrigin : public ThreadSafeShared<SecurityOrigin> {
+class SecurityOrigin : public ThreadSafeRefCounted<SecurityOrigin> {
 public:
     static PassRefPtr<SecurityOrigin> createFromDatabaseIdentifier(const String&);
     static PassRefPtr<SecurityOrigin> createFromString(const String&);
index 5eb40ee..a25d6fa 100644 (file)
@@ -56,7 +56,7 @@ namespace WebCore {
         }
     };
 
-    template<bool isConvertibleToInteger, bool isThreadsafeShared, typename T> struct CrossThreadCopierBase;
+    template<bool isConvertibleToInteger, bool isThreadSafeRefCounted, typename T> struct CrossThreadCopierBase;
 
     // Integers get passed through without any changes.
     template<typename T> struct CrossThreadCopierBase<true, false, T> : public CrossThreadCopierPassThrough<T> {
@@ -114,8 +114,8 @@ namespace WebCore {
     };
 
     template<typename T> struct CrossThreadCopier : public CrossThreadCopierBase<WTF::IsConvertibleToInteger<T>::value,
-                                                                                 WTF::IsSubclassOfTemplate<typename WTF::RemoveTemplate<T, RefPtr>::Type, ThreadSafeShared>::value
-                                                                                     || WTF::IsSubclassOfTemplate<typename WTF::RemoveTemplate<T, PassRefPtr>::Type, ThreadSafeShared>::value,
+                                                                                 WTF::IsSubclassOfTemplate<typename WTF::RemoveTemplate<T, RefPtr>::Type, ThreadSafeRefCounted>::value
+                                                                                     || WTF::IsSubclassOfTemplate<typename WTF::RemoveTemplate<T, PassRefPtr>::Type, ThreadSafeRefCounted>::value,
                                                                                  T> {
     };
 
index c1f5522..f919d64 100644 (file)
 #include "KURL.h"
 #include "PlatformString.h"
 #include <wtf/Forward.h>
-#include <wtf/ThreadSafeShared.h>
+#include <wtf/ThreadSafeRefCounted.h>
 
 namespace WebCore {
 
-class RawData : public ThreadSafeShared<RawData> {
+class RawData : public ThreadSafeRefCounted<RawData> {
 public:
     static PassRefPtr<RawData> create()
     {
index d11036f..4adee70 100644 (file)
@@ -44,14 +44,14 @@ class AuthenticationChallenge;
 class Credential;
 class SocketStreamHandleClient;
 
-class SocketStreamHandle : public ThreadSafeShared<SocketStreamHandle>, public SocketStreamHandleBase, public AuthenticationClient {
+class SocketStreamHandle : public ThreadSafeRefCounted<SocketStreamHandle>, public SocketStreamHandleBase, public AuthenticationClient {
 public:
     static PassRefPtr<SocketStreamHandle> create(const KURL& url, SocketStreamHandleClient* client) { return adoptRef(new SocketStreamHandle(url, client)); }
 
     virtual ~SocketStreamHandle();
 
-    using ThreadSafeShared<SocketStreamHandle>::ref;
-    using ThreadSafeShared<SocketStreamHandle>::deref;
+    using ThreadSafeRefCounted<SocketStreamHandle>::ref;
+    using ThreadSafeRefCounted<SocketStreamHandle>::deref;
 
 private:
     virtual int platformSend(const char* data, int length);
index bd5d0db..9279adc 100644 (file)
@@ -35,7 +35,7 @@
 #include "PlatformString.h"
 #include "SQLiteDatabase.h"
 #include <wtf/Forward.h>
-#include <wtf/ThreadSafeShared.h>
+#include <wtf/ThreadSafeRefCounted.h>
 #ifndef NDEBUG
 #include "SecurityOrigin.h"
 #endif
@@ -46,7 +46,7 @@ class DatabaseAuthorizer;
 class ScriptExecutionContext;
 class SecurityOrigin;
 
-class AbstractDatabase : public ThreadSafeShared<AbstractDatabase> {
+class AbstractDatabase : public ThreadSafeRefCounted<AbstractDatabase> {
 public:
     static bool isAvailable();
     static void setIsAvailable(bool available);
index da7761d..939b409 100644 (file)
@@ -31,7 +31,7 @@
 #include "PlatformString.h"
 #include <wtf/Forward.h>
 #include <wtf/HashSet.h>
-#include <wtf/ThreadSafeShared.h>
+#include <wtf/ThreadSafeRefCounted.h>
 #include <wtf/text/StringHash.h>
 
 namespace WebCore {
@@ -40,7 +40,7 @@ extern const int SQLAuthAllow;
 extern const int SQLAuthIgnore;
 extern const int SQLAuthDeny;
 
-class DatabaseAuthorizer : public ThreadSafeShared<DatabaseAuthorizer> {
+class DatabaseAuthorizer : public ThreadSafeRefCounted<DatabaseAuthorizer> {
 public:
 
     enum Permissions {
index 8ad56ed..586416a 100644 (file)
 
 #if ENABLE(DATABASE)
 
-#include <wtf/ThreadSafeShared.h>
+#include <wtf/ThreadSafeRefCounted.h>
 
 namespace WebCore {
 
 class Database;
 class DatabaseSync;
 
-class DatabaseCallback : public ThreadSafeShared<DatabaseCallback> {
+class DatabaseCallback : public ThreadSafeRefCounted<DatabaseCallback> {
 public:
     virtual ~DatabaseCallback() { }
     virtual bool handleEvent(Database*) = 0;
index c81e376..ee1702c 100644 (file)
@@ -48,7 +48,7 @@ class Document;
 class SQLTransactionClient;
 class SQLTransactionCoordinator;
 
-class DatabaseThread : public ThreadSafeShared<DatabaseThread> {
+class DatabaseThread : public ThreadSafeRefCounted<DatabaseThread> {
 public:
     static PassRefPtr<DatabaseThread> create() { return adoptRef(new DatabaseThread); }
     ~DatabaseThread();
index fa84fe4..ddc6e60 100644 (file)
@@ -43,7 +43,7 @@
 namespace WebCore {
 
 // FIXME: All child classes need to be made threadsafe.
-class IDBCallbacks : public ThreadSafeShared<IDBCallbacks> {
+class IDBCallbacks : public ThreadSafeRefCounted<IDBCallbacks> {
 public:
     virtual ~IDBCallbacks() { }
 
index 6cdab42..21425c9 100644 (file)
@@ -41,7 +41,7 @@ class IDBKey;
 class IDBRequest;
 class SerializedScriptValue;
 
-class IDBCursorBackendInterface : public ThreadSafeShared<IDBCursorBackendInterface> {
+class IDBCursorBackendInterface : public ThreadSafeRefCounted<IDBCursorBackendInterface> {
 public:
     virtual ~IDBCursorBackendInterface() {}
 
index ad6fdc7..2245bd7 100644 (file)
@@ -46,7 +46,7 @@ class IDBTransactionBackendInterface;
 // This is implemented by IDBDatabaseBackendImpl and optionally others (in order to proxy
 // calls across process barriers). All calls to these classes should be non-blocking and
 // trigger work on a background thread if necessary.
-class IDBDatabaseBackendInterface : public ThreadSafeShared<IDBDatabaseBackendInterface> {
+class IDBDatabaseBackendInterface : public ThreadSafeRefCounted<IDBDatabaseBackendInterface> {
 public:
     virtual ~IDBDatabaseBackendInterface() { }
 
index 7570b31..87362d4 100644 (file)
@@ -46,7 +46,7 @@ class SecurityOrigin;
 // This is implemented by IDBFactoryBackendImpl and optionally others (in order to proxy
 // calls across process barriers). All calls to these classes should be non-blocking and
 // trigger work on a background thread if necessary.
-class IDBFactoryBackendInterface : public ThreadSafeShared<IDBFactoryBackendInterface> {
+class IDBFactoryBackendInterface : public ThreadSafeRefCounted<IDBFactoryBackendInterface> {
 public:
     static PassRefPtr<IDBFactoryBackendInterface> create();
     virtual ~IDBFactoryBackendInterface() { }
index e0e578d..81ef1d5 100644 (file)
@@ -39,7 +39,7 @@ class IDBKey;
 class IDBKeyRange;
 class IDBTransactionBackendInterface;
 
-class IDBIndexBackendInterface : public ThreadSafeShared<IDBIndexBackendInterface> {
+class IDBIndexBackendInterface : public ThreadSafeRefCounted<IDBIndexBackendInterface> {
 public:
     virtual ~IDBIndexBackendInterface() { }
 
index 5816ce3..8ee9b8e 100644 (file)
@@ -34,7 +34,7 @@
 
 namespace WebCore {
 
-class IDBKey : public ThreadSafeShared<IDBKey> {
+class IDBKey : public ThreadSafeRefCounted<IDBKey> {
 public:
     static PassRefPtr<IDBKey> createNull()
     {
@@ -100,8 +100,8 @@ public:
     bool isLessThan(const IDBKey* other) const;
     bool isEqual(const IDBKey* other) const;
 
-    using ThreadSafeShared<IDBKey>::ref;
-    using ThreadSafeShared<IDBKey>::deref;
+    using ThreadSafeRefCounted<IDBKey>::ref;
+    using ThreadSafeRefCounted<IDBKey>::deref;
 
 private:
     IDBKey();
index 636a5c1..7a87088 100644 (file)
@@ -35,7 +35,7 @@
 
 namespace WebCore {
 
-class IDBKeyRange : public ThreadSafeShared<IDBKeyRange> {
+class IDBKeyRange : public ThreadSafeRefCounted<IDBKeyRange> {
 public:
     static PassRefPtr<IDBKeyRange> create(PassRefPtr<IDBKey> lower, PassRefPtr<IDBKey> upper, bool lowerOpen, bool upperOpen)
     {
index 177701c..2975ed7 100644 (file)
@@ -42,7 +42,7 @@ class IDBKeyRange;
 class IDBTransactionBackendInterface;
 class SerializedScriptValue;
 
-class IDBObjectStoreBackendInterface : public ThreadSafeShared<IDBObjectStoreBackendInterface> {
+class IDBObjectStoreBackendInterface : public ThreadSafeRefCounted<IDBObjectStoreBackendInterface> {
 public:
     virtual ~IDBObjectStoreBackendInterface() { }
 
index 2d0da08..900df01 100644 (file)
@@ -91,8 +91,8 @@ public:
     bool dispatchEvent(PassRefPtr<Event> event, ExceptionCode& ec) { return EventTarget::dispatchEvent(event, ec); }
     virtual void uncaughtExceptionInEventHandler();
 
-    using ThreadSafeShared<IDBCallbacks>::ref;
-    using ThreadSafeShared<IDBCallbacks>::deref;
+    using ThreadSafeRefCounted<IDBCallbacks>::ref;
+    using ThreadSafeRefCounted<IDBCallbacks>::deref;
 
 protected:
     IDBRequest(ScriptExecutionContext*, PassRefPtr<IDBAny> source, IDBTransaction*);
index 1b370af..3432e9a 100644 (file)
@@ -43,7 +43,7 @@ class IDBTransactionCallbacks;
 // This is implemented by IDBTransactionBackendImpl and optionally others (in order to proxy
 // calls across process barriers). All calls to these classes should be non-blocking and
 // trigger work on a background thread if necessary.
-class IDBTransactionBackendInterface : public ThreadSafeShared<IDBTransactionBackendInterface> {
+class IDBTransactionBackendInterface : public ThreadSafeRefCounted<IDBTransactionBackendInterface> {
 public:
     virtual ~IDBTransactionBackendInterface() { }
 
index 496145a..eb9005b 100644 (file)
 #if ENABLE(DATABASE)
 
 #include "PlatformString.h"
-#include <wtf/ThreadSafeShared.h>
+#include <wtf/ThreadSafeRefCounted.h>
 
 namespace WebCore {
 
-class SQLError : public ThreadSafeShared<SQLError> {
+class SQLError : public ThreadSafeRefCounted<SQLError> {
 public:
     static PassRefPtr<SQLError> create(unsigned code, const String& message) { return adoptRef(new SQLError(code, message)); }
 
index 268472f..964504c 100644 (file)
 
 #include "ExceptionCode.h"
 #include "SQLResultSetRowList.h"
-#include <wtf/ThreadSafeShared.h>
+#include <wtf/ThreadSafeRefCounted.h>
 
 namespace WebCore {
 
-class SQLResultSet : public ThreadSafeShared<SQLResultSet> {
+class SQLResultSet : public ThreadSafeRefCounted<SQLResultSet> {
 public:
     static PassRefPtr<SQLResultSet> create() { return adoptRef(new SQLResultSet); }
 
index 5d69970..1d81eb2 100644 (file)
@@ -45,7 +45,7 @@ class SQLStatementCallback;
 class SQLStatementErrorCallback;
 class SQLTransaction;
 
-class SQLStatement : public ThreadSafeShared<SQLStatement> {
+class SQLStatement : public ThreadSafeRefCounted<SQLStatement> {
 public:
     static PassRefPtr<SQLStatement> create(Database*, const String&, const Vector<SQLValue>&, PassRefPtr<SQLStatementCallback>, PassRefPtr<SQLStatementErrorCallback>, int permissions);
 
index f86e29f..cae5827 100644 (file)
 
 #if ENABLE(DATABASE)
 
-#include <wtf/ThreadSafeShared.h>
+#include <wtf/ThreadSafeRefCounted.h>
 
 namespace WebCore {
 
 class SQLTransaction;
 class SQLResultSet;
 
-class SQLStatementCallback : public ThreadSafeShared<SQLStatementCallback> {
+class SQLStatementCallback : public ThreadSafeRefCounted<SQLStatementCallback> {
 public:
     virtual ~SQLStatementCallback() { }
     virtual bool handleEvent(SQLTransaction*, SQLResultSet*) = 0;
index acb8f64..5fecec4 100644 (file)
 
 #if ENABLE(DATABASE)
 
-#include <wtf/ThreadSafeShared.h>
+#include <wtf/ThreadSafeRefCounted.h>
 
 namespace WebCore {
 
 class SQLTransaction;
 class SQLError;
 
-class SQLStatementErrorCallback : public ThreadSafeShared<SQLStatementErrorCallback> {
+class SQLStatementErrorCallback : public ThreadSafeRefCounted<SQLStatementErrorCallback> {
 public:
     virtual ~SQLStatementErrorCallback() { }
     virtual bool handleEvent(SQLTransaction*, SQLError*) = 0;
index 5df611b..4c84f91 100644 (file)
@@ -34,7 +34,7 @@
 #include "SQLStatement.h"
 #include <wtf/Deque.h>
 #include <wtf/Forward.h>
-#include <wtf/ThreadSafeShared.h>
+#include <wtf/ThreadSafeRefCounted.h>
 #include <wtf/Vector.h>
 
 namespace WebCore {
@@ -50,7 +50,7 @@ class SQLTransactionErrorCallback;
 class SQLValue;
 class VoidCallback;
 
-class SQLTransactionWrapper : public ThreadSafeShared<SQLTransactionWrapper> {
+class SQLTransactionWrapper : public ThreadSafeRefCounted<SQLTransactionWrapper> {
 public:
     virtual ~SQLTransactionWrapper() { }
     virtual bool performPreflight(SQLTransaction*) = 0;
@@ -59,7 +59,7 @@ public:
     virtual SQLError* sqlError() const = 0;
 };
 
-class SQLTransaction : public ThreadSafeShared<SQLTransaction> {
+class SQLTransaction : public ThreadSafeRefCounted<SQLTransaction> {
 public:
     static PassRefPtr<SQLTransaction> create(Database*, PassRefPtr<SQLTransactionCallback>, PassRefPtr<SQLTransactionErrorCallback>,
                                              PassRefPtr<VoidCallback>, PassRefPtr<SQLTransactionWrapper>, bool readOnly = false);
index aff6233..6904880 100644 (file)
 
 #if ENABLE(DATABASE)
 
-#include <wtf/ThreadSafeShared.h>
+#include <wtf/ThreadSafeRefCounted.h>
 
 namespace WebCore {
 
 class SQLTransaction;
 
-class SQLTransactionCallback : public ThreadSafeShared<SQLTransactionCallback> {
+class SQLTransactionCallback : public ThreadSafeRefCounted<SQLTransactionCallback> {
 public:
     virtual ~SQLTransactionCallback() { }
     virtual bool handleEvent(SQLTransaction*) = 0;
index 4095d6a..f067571 100644 (file)
 
 #if ENABLE(DATABASE)
 
-#include <wtf/ThreadSafeShared.h>
+#include <wtf/ThreadSafeRefCounted.h>
 
 namespace WebCore {
 
 class SQLError;
 
-class SQLTransactionErrorCallback : public ThreadSafeShared<SQLTransactionErrorCallback> {
+class SQLTransactionErrorCallback : public ThreadSafeRefCounted<SQLTransactionErrorCallback> {
 public:
     virtual ~SQLTransactionErrorCallback() { }
     virtual bool handleEvent(SQLError*) = 0;
index 4099615..683ee84 100644 (file)
@@ -42,7 +42,7 @@
 
 namespace WebCore {
 
-class ThreadableWebSocketChannelClientWrapper : public ThreadSafeShared<ThreadableWebSocketChannelClientWrapper> {
+class ThreadableWebSocketChannelClientWrapper : public ThreadSafeRefCounted<ThreadableWebSocketChannelClientWrapper> {
 public:
     static PassRefPtr<ThreadableWebSocketChannelClientWrapper> create(WebSocketChannelClient* client)
     {
index c20cd30..31b2d4f 100644 (file)
@@ -58,7 +58,7 @@
 
 namespace WebCore {
 
-class SharedWorkerProxy : public ThreadSafeShared<SharedWorkerProxy>, public WorkerLoaderProxy, public WorkerReportingProxy {
+class SharedWorkerProxy : public ThreadSafeRefCounted<SharedWorkerProxy>, public WorkerLoaderProxy, public WorkerReportingProxy {
 public:
     static PassRefPtr<SharedWorkerProxy> create(const String& name, const KURL& url, PassRefPtr<SecurityOrigin> origin) { return adoptRef(new SharedWorkerProxy(name, url, origin)); }
 
index 860633e..ad646ce 100644 (file)
@@ -1,3 +1,17 @@
+2011-03-20  Bill Budge  <bbudge@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Rename ThreadSafeShared to ThreadSafeRefCounted
+        https://bugs.webkit.org/show_bug.cgi?id=56714
+
+        No new tests. Exposes no new functionality.
+
+        * src/PlatformMessagePortChannel.h:
+        * src/WebWorkerBase.cpp:
+        * src/WorkerFileSystemCallbacksBridge.h:
+        * src/WorkerFileWriterCallbacksBridge.h:
+
 2011-03-18  Tony Chang  <tony@chromium.org>
 
         Reviewed by Eric Seidel.
index 5416145..9cd7001 100644 (file)
@@ -46,7 +46,7 @@ namespace WebCore {
 class MessagePort;
 
 // PlatformMessagePortChannel is a platform-dependent interface to the remote side of a message channel.
-class PlatformMessagePortChannel : public ThreadSafeShared<PlatformMessagePortChannel>,
+class PlatformMessagePortChannel : public ThreadSafeRefCounted<PlatformMessagePortChannel>,
                                    public WebKit::WebMessagePortChannelClient {
 public:
     static void createChannel(PassRefPtr<MessagePort>, PassRefPtr<MessagePort>);
index b16b6d4..0d1ce67 100644 (file)
@@ -65,7 +65,7 @@ namespace {
 
 // This class is used to route the result of the WebWorkerBase::allowDatabase
 // call back to the worker context.
-class AllowDatabaseMainThreadBridge : public ThreadSafeShared<AllowDatabaseMainThreadBridge> {
+class AllowDatabaseMainThreadBridge : public ThreadSafeRefCounted<AllowDatabaseMainThreadBridge> {
 public:
     static PassRefPtr<AllowDatabaseMainThreadBridge> create(WebWorkerBase* worker, const WTF::String& mode, WebCommonWorkerClient* commonClient, WebFrame* frame, const WTF::String& name, const WTF::String& displayName, unsigned long estimatedSize)
     {
index fa57f38..f96c900 100644 (file)
@@ -66,7 +66,7 @@ struct WebFileSystemEntry;
 //  --> Bridge::didXxxOnWorkerThread is called on WorkerThread
 //      This calls the original callbacks (m_callbacksOnWorkerThread) and
 //      releases a self-reference to the bridge.
-class WorkerFileSystemCallbacksBridge : public ThreadSafeShared<WorkerFileSystemCallbacksBridge>, public WebCore::WorkerContext::Observer {
+class WorkerFileSystemCallbacksBridge : public ThreadSafeRefCounted<WorkerFileSystemCallbacksBridge>, public WebCore::WorkerContext::Observer {
 public:
     ~WorkerFileSystemCallbacksBridge();
 
index 62e333c..7e9795e 100644 (file)
@@ -38,7 +38,7 @@
 #include "WorkerContext.h"
 #include <wtf/PassOwnPtr.h>
 #include <wtf/PassRefPtr.h>
-#include <wtf/ThreadSafeShared.h>
+#include <wtf/ThreadSafeRefCounted.h>
 
 namespace WebCore {
     class AsyncFileWriterClient;
@@ -79,7 +79,7 @@ class WebWorkerBase;
 // should call postShutdownToMainThread before dropping its reference to the
 // bridge. This ensures that the WebFileWriter will be cleared on the main
 // thread and that no further calls to the WebFileWriterClient will be made.
-class WorkerFileWriterCallbacksBridge : public ThreadSafeShared<WorkerFileWriterCallbacksBridge>, public WebCore::WorkerContext::Observer, public WebFileWriterClient {
+class WorkerFileWriterCallbacksBridge : public ThreadSafeRefCounted<WorkerFileWriterCallbacksBridge>, public WebCore::WorkerContext::Observer, public WebFileWriterClient {
 public:
     ~WorkerFileWriterCallbacksBridge();
 
index 8540ec5..b5e960d 100644 (file)
@@ -1,3 +1,18 @@
+2011-03-20  Bill Budge  <bbudge@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Rename ThreadSafeShared to ThreadSafeRefCounted
+        https://bugs.webkit.org/show_bug.cgi?id=56714
+
+        No new tests. Exposes no new functionality.
+
+        * Platform/CoreIPC/Connection.h:
+        * Platform/WorkQueue.h:
+        * Platform/win/WorkQueueWin.cpp:
+        * UIProcess/Launcher/ProcessLauncher.h:
+        * UIProcess/Launcher/ThreadLauncher.h:
+
 2011-03-19  Anton D'Auria  <adauria@apple.com>
 
         Reviewed by Alexey Proskuryakov.
index eaa2ab9..6d7562e 100644 (file)
@@ -72,7 +72,7 @@ enum MessageSendFlags {
     } \
 while (0)
 
-class Connection : public ThreadSafeShared<Connection> {
+class Connection : public ThreadSafeRefCounted<Connection> {
 public:
     class MessageReceiver {
     protected:
index 441d625..99f77ae 100644 (file)
@@ -106,7 +106,7 @@ private:
     dispatch_queue_t m_dispatchQueue;
 #endif
 #elif PLATFORM(WIN)
-    class WorkItemWin : public ThreadSafeShared<WorkItemWin> {
+    class WorkItemWin : public ThreadSafeRefCounted<WorkItemWin> {
     public:
         static PassRefPtr<WorkItemWin> create(PassOwnPtr<WorkItem>, WorkQueue*);
         virtual ~WorkItemWin();
index 0a89225..44e9885 100644 (file)
@@ -210,7 +210,7 @@ void WorkQueue::scheduleWork(PassOwnPtr<WorkItem> item)
         ::QueueUserWorkItem(workThreadCallback, this, WT_EXECUTEDEFAULT);
 }
 
-struct TimerContext : public ThreadSafeShared<TimerContext> {
+struct TimerContext : public ThreadSafeRefCounted<TimerContext> {
     static PassRefPtr<TimerContext> create() { return adoptRef(new TimerContext); }
 
     WorkQueue* queue;
index 8a1cd01..8dbfb11 100644 (file)
@@ -37,7 +37,7 @@ class QLocalSocket;
 
 namespace WebKit {
 
-class ProcessLauncher : public ThreadSafeShared<ProcessLauncher> {
+class ProcessLauncher : public ThreadSafeRefCounted<ProcessLauncher> {
 public:
     class Client {
     public:
index 9c90fbd..f3a5312 100644 (file)
@@ -37,7 +37,7 @@ class QLocalSocket;
 
 namespace WebKit {
 
-class ThreadLauncher : public ThreadSafeShared<ThreadLauncher> {
+class ThreadLauncher : public ThreadSafeRefCounted<ThreadLauncher> {
 public:
     class Client {
     public:
index 58e8816..46f7b05 100644 (file)
@@ -1,3 +1,16 @@
+2011-03-20  Bill Budge  <bbudge@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Rename ThreadSafeShared to ThreadSafeRefCounted
+        https://bugs.webkit.org/show_bug.cgi?id=56714
+
+        No new tests. Exposes no new functionality.
+
+        * DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeRefCounted.h: Copied from DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeShared.h.
+        * DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeShared.h: Removed.
+        * Scripts/do-webcore-rename:
+
 2011-03-19  Anton D'Auria  <adauria@apple.com>
 
         Reviewed by Dan Bernstein.
diff --git a/Tools/DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeRefCounted.h b/Tools/DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeRefCounted.h
new file mode 100644 (file)
index 0000000..48a54cc
--- /dev/null
@@ -0,0 +1 @@
+#include <JavaScriptCore/ThreadSafeRefCounted.h>
diff --git a/Tools/DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeShared.h b/Tools/DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeShared.h
deleted file mode 100644 (file)
index 4a7a77f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <JavaScriptCore/ThreadSafeShared.h>
index 6dbfc1f..da08cf7 100755 (executable)
@@ -125,8 +125,6 @@ my %renamesContemplatedForTheFuture = (
     "KURLMac" => "URLMac",
     "KURL_h" => "URL_h",
 
-    "ThreadSafeSharedBase" => "ThreadSafeRefCountedBase",
-    "ThreadSafeShared" => "ThreadSafeRefCounted",
     "TreeShared" => "TreeRefCounted",
 
     "StringImpl" => "SharedString",