Part 1 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 May 2009 16:39:20 +0000 (16:39 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 May 2009 16:39:20 +0000 (16:39 +0000)
commit8f0764fa6c3c1399c1044aeaa054fcb7b429379b
treecf38ab96947a66bb7a8d0a2f12c1257461dc46c0
parentd75bc5946399d000c7b53200c3895e4f396dcf6e
    Part 1 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr

        <https://bugs.webkit.org/show_bug.cgi?id=25495>

        Reviewed by Oliver Hunt.

JavaScriptCore:

        * GNUmakefile.am: Added OwnPtrCommon.h and PassOwnPtr.h.
        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
        * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.

        * wtf/OwnPtr.h:
        (WTF::OwnPtr::OwnPtr): Added constructors that take a
        PassOwnPtr.  Also added a copy constructor declaration that's
        required when assigning a PassOwnPtr to a stack-based OwnPtr.
        (WTF::operator=): Added assignment operator methods that take a
        PassOwnPtr.
        (WTF::swap): Reformatted.
        (WTF::operator==): Whitespace changes.
        (WTF::operator!=): Ditto.

        * wtf/OwnPtrCommon.h: Added.
        (WTF::deleteOwnedPtr):

        * wtf/PassOwnPtr.h: Added.
        (WTF::PassOwnPtr::PassOwnPtr):
        (WTF::PassOwnPtr::~PassOwnPtr):
        (WTF::PassOwnPtr::get):
        (WTF::PassOwnPtr::clear):
        (WTF::PassOwnPtr::release):
        (WTF::PassOwnPtr::operator*):
        (WTF::PassOwnPtr::operator->):
        (WTF::PassOwnPtr::operator!):
        (WTF::PassOwnPtr::operator UnspecifiedBoolType):
        (WTF::::operator):
        (WTF::operator==):
        (WTF::operator!=):
        (WTF::static_pointer_cast):
        (WTF::const_pointer_cast):
        (WTF::getPtr):

JavaScriptGlue:

        * ForwardingHeaders/wtf/OwnPtrCommon.h: Added.
        * ForwardingHeaders/wtf/PassOwnPtr.h: Added.

WebCore:

        * ForwardingHeaders/wtf/OwnPtrCommon.h: Added.
        * ForwardingHeaders/wtf/PassOwnPtr.h: Added.
        * WebCore.vcproj/WebCore.vcproj: Added OwnPtrCommon.h and
        PassOwnPtr.h.

WebKit/mac:

        * ForwardingHeaders/wtf/OwnPtrCommon.h: Added.
        * ForwardingHeaders/wtf/PassOwnPtr.h: Added.

WebKitTools:

        * DumpRenderTree/ForwardingHeaders/wtf/OwnPtrCommon.h: Added.
        * DumpRenderTree/ForwardingHeaders/wtf/PassOwnPtr.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@44095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/GNUmakefile.am
JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
JavaScriptCore/wtf/OwnPtr.h
JavaScriptCore/wtf/OwnPtrCommon.h [new file with mode: 0644]
JavaScriptCore/wtf/PassOwnPtr.h [new file with mode: 0644]
JavaScriptGlue/ChangeLog
JavaScriptGlue/ForwardingHeaders/wtf/OwnPtrCommon.h [new file with mode: 0644]
JavaScriptGlue/ForwardingHeaders/wtf/PassOwnPtr.h [new file with mode: 0644]
WebCore/ChangeLog
WebCore/ForwardingHeaders/wtf/OwnPtrCommon.h [new file with mode: 0644]
WebCore/ForwardingHeaders/wtf/PassOwnPtr.h [new file with mode: 0644]
WebCore/WebCore.vcproj/WebCore.vcproj
WebKit/mac/ChangeLog
WebKit/mac/ForwardingHeaders/wtf/OwnPtrCommon.h [new file with mode: 0644]
WebKit/mac/ForwardingHeaders/wtf/PassOwnPtr.h [new file with mode: 0644]
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/OwnPtrCommon.h [new file with mode: 0644]
WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/PassOwnPtr.h [new file with mode: 0644]