Remove some stray uses of OwnPtr and PassOwnPtr in WTF (outside of the template defin...
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Apr 2015 15:51:05 +0000 (15:51 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Apr 2015 15:51:05 +0000 (15:51 +0000)
https://bugs.webkit.org/show_bug.cgi?id=143944

Reviewed by Andreas Kling.

Source/WebCore:

* editing/ios/DictationCommandIOS.h: Added now-needed include of PassOwnPtr.h.

Source/WTF:

* wtf/FilePrintStream.h: Removed unneeded include.
* wtf/HashTable.h: Fixed class template name in comment.
* wtf/HashTraits.h: Removed unneeded forward declaration.
* wtf/ListHashSet.h: Removed unneeded includes.
* wtf/ThreadingWin.cpp: Removed unneeded includes.
(WTF::wtfThreadEntryPoint): Changed code to use unique_ptr.
(WTF::createThreadInternal): Changed code to use make_unique and release.
* wtf/efl/RunLoopEfl.cpp: Removed unneeded includes.

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

Source/WTF/ChangeLog
Source/WTF/wtf/FilePrintStream.h
Source/WTF/wtf/HashTable.h
Source/WTF/wtf/HashTraits.h
Source/WTF/wtf/ListHashSet.h
Source/WTF/wtf/ThreadingWin.cpp
Source/WTF/wtf/efl/RunLoopEfl.cpp
Source/WebCore/ChangeLog
Source/WebCore/editing/ios/DictationCommandIOS.h

index 185166156b11334a9c641a98ebd1f2cf0a243f77..623002fd9a2a505714daca637028cf63621eead5 100644 (file)
@@ -1,3 +1,19 @@
+2015-04-21  Darin Adler  <darin@apple.com>
+
+        Remove some stray uses of OwnPtr and PassOwnPtr in WTF (outside of the template definitions and traits)
+        https://bugs.webkit.org/show_bug.cgi?id=143944
+
+        Reviewed by Andreas Kling.
+
+        * wtf/FilePrintStream.h: Removed unneeded include.
+        * wtf/HashTable.h: Fixed class template name in comment.
+        * wtf/HashTraits.h: Removed unneeded forward declaration.
+        * wtf/ListHashSet.h: Removed unneeded includes.
+        * wtf/ThreadingWin.cpp: Removed unneeded includes.
+        (WTF::wtfThreadEntryPoint): Changed code to use unique_ptr.
+        (WTF::createThreadInternal): Changed code to use make_unique and release.
+        * wtf/efl/RunLoopEfl.cpp: Removed unneeded includes.
+
 2015-04-19  Darin Adler  <darin@apple.com>
 
         Update RefPtr documentation and deprecation
index f698a027083ae5092c6b07bd4af898e78d1d3cbe..0dce33f4e6821a6305c1c18a2a4976501c5e921d 100644 (file)
@@ -28,7 +28,6 @@
 
 #include <stdio.h>
 #include <wtf/PrintStream.h>
-#include <wtf/OwnPtr.h>
 
 namespace WTF {
 
index 8e28b24197075c3a8acbe98d1e31f3ca9499358d..4dc0b0ab8bc8983d685f523662c4c11af4be2b67 100644 (file)
@@ -482,7 +482,7 @@ namespace WTF {
     public:
         // All access to m_iterators should be guarded with m_mutex.
         mutable const_iterator* m_iterators;
-        // Use OwnPtr so HashTable can still be memmove'd or memcpy'ed.
+        // Use std::unique_ptr so HashTable can still be memmove'd or memcpy'ed.
         mutable std::unique_ptr<std::mutex> m_mutex;
 #endif
 
index c9321ebd5666bb187cb83cf8bc12628ec98b2641..e47aa8b5f86b4bfdee9e9232cc20df5a9e81f3cd 100644 (file)
@@ -31,7 +31,6 @@ namespace WTF {
 class String;
 
 template<typename T> class OwnPtr;
-template<typename T> class PassOwnPtr;
 
 template<typename T> struct HashTraits;
 
index 82364fd202b0fd007489710315c87362e5a59309..4110b3e0ea78a8fe3ac5af1ec163aeb8e30d6052 100644 (file)
@@ -23,8 +23,6 @@
 #define WTF_ListHashSet_h
 
 #include <wtf/HashSet.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
 
 namespace WTF {
 
index d44f8b5d2e37b4f657617c40a3c1f871914560ae..ea4bd43ae1387e4431642d2a240a6679cc1b91ab 100644 (file)
@@ -99,8 +99,6 @@
 #include <wtf/CurrentTime.h>
 #include <wtf/HashMap.h>
 #include <wtf/MathExtras.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
 #include <wtf/RandomNumberSeed.h>
 #include <wtf/WTFThreadData.h>
 
@@ -199,7 +197,7 @@ static void clearThreadHandleForIdentifier(ThreadIdentifier id)
 
 static unsigned __stdcall wtfThreadEntryPoint(void* param)
 {
-    OwnPtr<ThreadFunctionInvocation> invocation = adoptPtr(static_cast<ThreadFunctionInvocation*>(param));
+    std::unique_ptr<ThreadFunctionInvocation> invocation(static_cast<ThreadFunctionInvocation*>(param));
     invocation->function(invocation->data);
 
 #if !USE(PTHREADS) && OS(WINDOWS)
@@ -214,7 +212,7 @@ ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, con
 {
     unsigned threadIdentifier = 0;
     ThreadIdentifier threadID = 0;
-    OwnPtr<ThreadFunctionInvocation> invocation = adoptPtr(new ThreadFunctionInvocation(entryPoint, data));
+    auto invocation = std::make_unique<ThreadFunctionInvocation>(entryPoint, data);
     HANDLE threadHandle = reinterpret_cast<HANDLE>(_beginthreadex(0, 0, wtfThreadEntryPoint, invocation.get(), 0, &threadIdentifier));
     if (!threadHandle) {
 #if !HAVE(ERRNO_H)
@@ -226,7 +224,7 @@ ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, con
     }
 
     // The thread will take ownership of invocation.
-    ThreadFunctionInvocation* leakedInvocation = invocation.leakPtr();
+    ThreadFunctionInvocation* leakedInvocation = invocation.release();
     UNUSED_PARAM(leakedInvocation);
 
     threadID = static_cast<ThreadIdentifier>(threadIdentifier);
index e7a00ef66244d7c933dc3840f7921a556e5d8072..5dfc2903e8b4d10743b529f4c0c74c6750dae596 100644 (file)
@@ -28,8 +28,6 @@
 #include "RunLoop.h"
 
 #include <Ecore.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
 
 static const int ecorePipeMessageSize = 1;
 static const char wakupEcorePipeMessage[] = "W";
index af6487149f90934dbab7e278f6dc15dcd95b654e..befb59e67a270680af6973fcc63e88bb68702824 100644 (file)
@@ -1,3 +1,12 @@
+2015-04-21  Darin Adler  <darin@apple.com>
+
+        Remove some stray uses of OwnPtr and PassOwnPtr in WTF (outside of the template definitions and traits)
+        https://bugs.webkit.org/show_bug.cgi?id=143944
+
+        Reviewed by Andreas Kling.
+
+        * editing/ios/DictationCommandIOS.h: Added now-needed include of PassOwnPtr.h.
+
 2015-04-20  Simon Fraser  <simon.fraser@apple.com>
 
         REGRESSION (r177494): -webkit-mask-image: with data URI fails on non-local files
index 561198c8428eb45240ddd90dc8633e3735fb0a00..631bfb3d42f6efd121758c0662910d8e8f0f8935 100644 (file)
@@ -26,8 +26,9 @@
 #ifndef DictationCommandIOS_h
 #define DictationCommandIOS_h
 
-#include "CompositeEditCommand.h"
-
+#import "CompositeEditCommand.h"
+#import <wtf/OwnPtr.h>
+#import <wtf/PassOwnPtr.h>
 #import <wtf/RetainPtr.h>
 
 typedef struct objc_object *id;