Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Apr 2015 16:38:28 +0000 (16:38 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Apr 2015 16:38:28 +0000 (16:38 +0000)
commit098c71e9bed4ab87279880234c43ba610a96acea
treef990e2e97814926219176245977daef0c390ce01
parentecaa955770f3a037a465c6b8cbc0618da92dcce2
Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=128007

Reviewed by Anders Carlsson.

Source/WebCore:

* PlatformEfl.cmake: Removed OwnPtrCairo source files.
* PlatformGTK.cmake: Ditto.
* PlatformWinCairo.cmake: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.

* platform/CrossThreadCopier.cpp: Removed OwnPtr specialization.
* platform/CrossThreadCopier.h: Ditto.

* platform/ScrollAnimatorNone.cpp: Removed unneeded include.
* platform/ThreadGlobalData.cpp: Ditto.
* platform/ThreadGlobalData.h: Ditto.
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h: Ditto.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::processNotification): Use unique_ptr.
(WebCore::AVFWrapper::notificationCallback): Use make_unique.
(WebCore::AVFWrapper::platformLayer): Ditto.

* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::appendPathToCairoContext): Use cairo_path_destroy directly
instead of a smart pointer; the code path is simple enough that it is
clear this way.

* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::ImageBuffer): Use make_unique.
* platform/graphics/cairo/ImageBufferDataCairo.h: Use unique_ptr.

* platform/graphics/cairo/OwnPtrCairo.cpp: Removed.
* platform/graphics/cairo/OwnPtrCairo.h: Removed.

* platform/graphics/cairo/PathCairo.cpp:
(WebCore::Path::Path): Use cairo_path_destroy directly instead of a
smart pointer; the code path is simple enough that it is clear this way.
(WebCore::Path::operator=): Ditto.
(WebCore::Path::addPath): Ditto.
(WebCore::Path::apply): Ditto.
* platform/graphics/cairo/PlatformContextCairo.cpp:
(WebCore::PlatformContextCairo::clipForPatternFilling): Ditto.

* platform/graphics/freetype/FontCacheFreeType.cpp: Removed unneeded include.
* platform/graphics/glx/GLContextGLX.cpp: Ditto.

* platform/graphics/surfaces/egl/EGLSurface.cpp:
(WebCore::EGLOffScreenSurface::EGLOffScreenSurface): Use make_unique.

* platform/graphics/surfaces/glx/GLXConfigSelector.h:
(WebCore::GLXConfigSelector::findMatchingConfig): Use unique_ptr with X11Deleter.
(WebCore::GLXConfigSelector::findMatchingConfigWithVisualId): Ditto.
* platform/graphics/surfaces/glx/GLXSurface.cpp:
(WebCore::GLXTransportSurface::GLXTransportSurface): Ditto.
(WebCore::GLXOffScreenSurface::initialize): Ditto.

* platform/graphics/surfaces/glx/OwnPtrX11.h: Removed.

* platform/graphics/surfaces/glx/X11Helper.cpp:
(WebCore::X11Helper::createOffScreenWindow): Use unique_ptr with X11Deleter.
(WebCore::X11Helper::createPixmap): Ditto.

* platform/graphics/surfaces/glx/X11Helper.h: Added X11Deleter,
which can be used with unique_ptr to make it call XFree instead of delete.

* platform/graphics/win/FullScreenController.cpp: Use unique_ptr.
(FullScreenController::FullScreenController): Use make_unique.
(FullScreenController::enterFullScreen): Ditto.
* platform/graphics/win/FullScreenController.h: Use unique_ptr.

* platform/graphics/win/GraphicsContext3DWin.cpp: Removed unneeded includes.

* platform/graphics/win/WKCAImageQueue.cpp:
(WebCore::WKCAImageQueue::WKCAImageQueue): Use make_unique.
* platform/graphics/win/WKCAImageQueue.h: Use unique_ptr.

* platform/network/NetworkStorageSessionStub.cpp: Removed unneeded include.

* platform/network/ResourceHandleInternal.h: Use unique_ptr.

* platform/network/curl/MultipartHandle.cpp:
(WebCore::MultipartHandle::create): Deleted.
* platform/network/curl/MultipartHandle.h: Deleted the create function.

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::headerCallback): Use make_unique.

Source/WebKit2:

* NetworkProcess/cache/NetworkCacheEncoder.h: Added an include now
needed that was inherited from OwnPtr.h before.

Source/WTF:

* WTF.vcxproj/WTF.vcxproj: Removed OwnPtr source files.
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.
* WTF.xcodeproj/project.pbxproj: Ditto.
* wtf/CMakeLists.txt: Ditto.

* wtf/Forward.h: Removed OwnPtr and PassOwnPtr.
* wtf/HashTraits.h: Ditto.

* wtf/OwnPtr.h: Removed.
* wtf/OwnPtrCommon.h: Removed.
* wtf/PassOwnPtr.h: Removed.

* wtf/SizeLimits.cpp: Removed OwnPtr.
* wtf/VectorTraits.h: Removed OwnPtr specialization.

Tools:

* DumpRenderTree/win/HistoryDelegate.h: Removed unneeded include.
* DumpRenderTree/win/UIDelegate.h: Ditto.

* TestWebKitAPI/Tests/WTF/HashMap.cpp: Removed OwnPtr-specific test cases.
* TestWebKitAPI/Tests/WTF/HashSet.cpp: Ditto.

* TestWebKitAPI/Tests/WebKit/win/WebViewDestruction.cpp: Removed unneeded include.

* TestWebKitAPI/Tests/WebKit2/UserMessage.cpp: Use unique_ptr.
(TestWebKitAPI::WebKit2UserMessageRoundTripTest::SetUp): Use make_unique.
* TestWebKitAPI/Tests/WebKit2/WillLoad.cpp: Ditto.
(TestWebKitAPI::WebKit2WillLoadTest::SetUp): Ditto.
* TestWebKitAPI/Tests/WebKit2Gtk/DOMDOMWindowTest.cpp:
(WebKitDOMDOMWindowTest::create): Ditto.
* TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:
(documentLoadedCallback): Use a queue of DelayedSignal objects instead
of smart pointers to DelayedSIgnal objects.
(uriChangedCallback): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
62 files changed:
Source/WTF/ChangeLog
Source/WTF/WTF.vcxproj/WTF.vcxproj
Source/WTF/WTF.vcxproj/WTF.vcxproj.filters
Source/WTF/WTF.xcodeproj/project.pbxproj
Source/WTF/wtf/CMakeLists.txt
Source/WTF/wtf/Forward.h
Source/WTF/wtf/HashTraits.h
Source/WTF/wtf/OwnPtr.h [deleted file]
Source/WTF/wtf/OwnPtrCommon.h [deleted file]
Source/WTF/wtf/PassOwnPtr.h [deleted file]
Source/WTF/wtf/SizeLimits.cpp
Source/WTF/wtf/VectorTraits.h
Source/WebCore/ChangeLog
Source/WebCore/PlatformEfl.cmake
Source/WebCore/PlatformGTK.cmake
Source/WebCore/PlatformWinCairo.cmake
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/platform/CrossThreadCopier.cpp
Source/WebCore/platform/CrossThreadCopier.h
Source/WebCore/platform/ScrollAnimatorNone.cpp
Source/WebCore/platform/ThreadGlobalData.cpp
Source/WebCore/platform/ThreadGlobalData.h
Source/WebCore/platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h
Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp
Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp
Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
Source/WebCore/platform/graphics/cairo/ImageBufferDataCairo.h
Source/WebCore/platform/graphics/cairo/OwnPtrCairo.cpp [deleted file]
Source/WebCore/platform/graphics/cairo/OwnPtrCairo.h [deleted file]
Source/WebCore/platform/graphics/cairo/PathCairo.cpp
Source/WebCore/platform/graphics/cairo/PlatformContextCairo.cpp
Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp
Source/WebCore/platform/graphics/glx/GLContextGLX.cpp
Source/WebCore/platform/graphics/surfaces/egl/EGLSurface.cpp
Source/WebCore/platform/graphics/surfaces/glx/GLXConfigSelector.h
Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.cpp
Source/WebCore/platform/graphics/surfaces/glx/OwnPtrX11.h [deleted file]
Source/WebCore/platform/graphics/surfaces/glx/X11Helper.cpp
Source/WebCore/platform/graphics/surfaces/glx/X11Helper.h
Source/WebCore/platform/graphics/win/FullScreenController.cpp
Source/WebCore/platform/graphics/win/FullScreenController.h
Source/WebCore/platform/graphics/win/GraphicsContext3DWin.cpp
Source/WebCore/platform/graphics/win/WKCAImageQueue.cpp
Source/WebCore/platform/graphics/win/WKCAImageQueue.h
Source/WebCore/platform/network/NetworkStorageSessionStub.cpp
Source/WebCore/platform/network/ResourceHandleInternal.h
Source/WebCore/platform/network/curl/MultipartHandle.cpp
Source/WebCore/platform/network/curl/MultipartHandle.h
Source/WebCore/platform/network/curl/ResourceHandleManager.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/cache/NetworkCacheEncoder.h
Tools/ChangeLog
Tools/DumpRenderTree/win/HistoryDelegate.h
Tools/DumpRenderTree/win/UIDelegate.h
Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp
Tools/TestWebKitAPI/Tests/WTF/HashSet.cpp
Tools/TestWebKitAPI/Tests/WebKit/win/WebViewDestruction.cpp
Tools/TestWebKitAPI/Tests/WebKit2/UserMessage.cpp
Tools/TestWebKitAPI/Tests/WebKit2/WillLoad.cpp
Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMDOMWindowTest.cpp
Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp