Title: [183063] trunk/Source
Revision
183063
Author
da...@apple.com
Date
2015-04-21 08:51:05 -0700 (Tue, 21 Apr 2015)

Log Message

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.

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.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (183062 => 183063)


--- trunk/Source/WTF/ChangeLog	2015-04-21 13:01:18 UTC (rev 183062)
+++ trunk/Source/WTF/ChangeLog	2015-04-21 15:51:05 UTC (rev 183063)
@@ -1,3 +1,19 @@
+2015-04-21  Darin Adler  <da...@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  <da...@apple.com>
 
         Update RefPtr documentation and deprecation

Modified: trunk/Source/WTF/wtf/FilePrintStream.h (183062 => 183063)


--- trunk/Source/WTF/wtf/FilePrintStream.h	2015-04-21 13:01:18 UTC (rev 183062)
+++ trunk/Source/WTF/wtf/FilePrintStream.h	2015-04-21 15:51:05 UTC (rev 183063)
@@ -28,7 +28,6 @@
 
 #include <stdio.h>
 #include <wtf/PrintStream.h>
-#include <wtf/OwnPtr.h>
 
 namespace WTF {
 

Modified: trunk/Source/WTF/wtf/HashTable.h (183062 => 183063)


--- trunk/Source/WTF/wtf/HashTable.h	2015-04-21 13:01:18 UTC (rev 183062)
+++ trunk/Source/WTF/wtf/HashTable.h	2015-04-21 15:51:05 UTC (rev 183063)
@@ -482,7 +482,7 @@
     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
 

Modified: trunk/Source/WTF/wtf/HashTraits.h (183062 => 183063)


--- trunk/Source/WTF/wtf/HashTraits.h	2015-04-21 13:01:18 UTC (rev 183062)
+++ trunk/Source/WTF/wtf/HashTraits.h	2015-04-21 15:51:05 UTC (rev 183063)
@@ -31,7 +31,6 @@
 class String;
 
 template<typename T> class OwnPtr;
-template<typename T> class PassOwnPtr;
 
 template<typename T> struct HashTraits;
 

Modified: trunk/Source/WTF/wtf/ListHashSet.h (183062 => 183063)


--- trunk/Source/WTF/wtf/ListHashSet.h	2015-04-21 13:01:18 UTC (rev 183062)
+++ trunk/Source/WTF/wtf/ListHashSet.h	2015-04-21 15:51:05 UTC (rev 183063)
@@ -23,8 +23,6 @@
 #define WTF_ListHashSet_h
 
 #include <wtf/HashSet.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
 
 namespace WTF {
 

Modified: trunk/Source/WTF/wtf/ThreadingWin.cpp (183062 => 183063)


--- trunk/Source/WTF/wtf/ThreadingWin.cpp	2015-04-21 13:01:18 UTC (rev 183062)
+++ trunk/Source/WTF/wtf/ThreadingWin.cpp	2015-04-21 15:51:05 UTC (rev 183063)
@@ -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 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 @@
 {
     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 @@
     }
 
     // The thread will take ownership of invocation.
-    ThreadFunctionInvocation* leakedInvocation = invocation.leakPtr();
+    ThreadFunctionInvocation* leakedInvocation = invocation.release();
     UNUSED_PARAM(leakedInvocation);
 
     threadID = static_cast<ThreadIdentifier>(threadIdentifier);

Modified: trunk/Source/WTF/wtf/efl/RunLoopEfl.cpp (183062 => 183063)


--- trunk/Source/WTF/wtf/efl/RunLoopEfl.cpp	2015-04-21 13:01:18 UTC (rev 183062)
+++ trunk/Source/WTF/wtf/efl/RunLoopEfl.cpp	2015-04-21 15:51:05 UTC (rev 183063)
@@ -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";

Modified: trunk/Source/WebCore/ChangeLog (183062 => 183063)


--- trunk/Source/WebCore/ChangeLog	2015-04-21 13:01:18 UTC (rev 183062)
+++ trunk/Source/WebCore/ChangeLog	2015-04-21 15:51:05 UTC (rev 183063)
@@ -1,3 +1,12 @@
+2015-04-21  Darin Adler  <da...@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.fra...@apple.com>
 
         REGRESSION (r177494): -webkit-mask-image: with data URI fails on non-local files

Modified: trunk/Source/WebCore/editing/ios/DictationCommandIOS.h (183062 => 183063)


--- trunk/Source/WebCore/editing/ios/DictationCommandIOS.h	2015-04-21 13:01:18 UTC (rev 183062)
+++ trunk/Source/WebCore/editing/ios/DictationCommandIOS.h	2015-04-21 15:51:05 UTC (rev 183063)
@@ -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;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to