Remove makePoisonedUnique
authorjfbastien@apple.com <jfbastien@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Jan 2018 22:02:45 +0000 (22:02 +0000)
committerjfbastien@apple.com <jfbastien@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Jan 2018 22:02:45 +0000 (22:02 +0000)
commitac677b9d97d5f4c564ead8fbc2bccb443ab4f1a7
treecb94a715d10a4d1f33bbf0a0a67269535729fe5e
parent25812231fe2a8725c8f0e13dabf59d88034e11fd
Remove makePoisonedUnique
https://bugs.webkit.org/show_bug.cgi?id=181630
<rdar://problem/36498623>

Reviewed by Mark Lam.

Source/JavaScriptCore:

I added a conversion from std::unique_ptr, so we can just use
std::make_unique and it'll auto-poison when converted.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::makePoisonedUnique): Deleted.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::makePoisonedUnique): Deleted.

Source/WTF:

I added a conversion from std::unique_ptr, so we can just use
std::make_unique and it'll auto-poison when converted.

* wtf/PoisonedUniquePtr.h:
(WTF::makePoisonedUnique): Deleted.

Tools:

Update tests.

* TestWebKitAPI/Tests/WTF/PoisonedUniquePtr.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/PoisonedUniquePtrForNonTriviallyDestructibleArrays.cpp:
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecode/CodeBlock.h
Source/JavaScriptCore/runtime/JSGlobalObject.cpp
Source/JavaScriptCore/runtime/JSGlobalObject.h
Source/WTF/ChangeLog
Source/WTF/wtf/PoisonedUniquePtr.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WTF/PoisonedUniquePtr.cpp
Tools/TestWebKitAPI/Tests/WTF/PoisonedUniquePtrForNonTriviallyDestructibleArrays.cpp