Replace use of OwnArrayPtr<Foo> with std::unique_ptr<Foo[]> in Tools
[WebKit-https.git] / Tools / TestWebKitAPI / JavaScriptTest.cpp
index 85be892..de1848f 100644 (file)
@@ -32,7 +32,7 @@
 #include <JavaScriptCore/JSRetainPtr.h>
 #include <WebKit2/WKRetainPtr.h>
 #include <WebKit2/WKSerializedScriptValue.h>
-#include <wtf/OwnArrayPtr.h>
+#include <wtf/StdLibExtras.h>
 
 namespace TestWebKitAPI {
 
@@ -72,7 +72,7 @@ static void javaScriptCallback(WKSerializedScriptValueRef resultSerializedScript
     Util::run(&context.didFinish);
 
     size_t bufferSize = JSStringGetMaximumUTF8CStringSize(context.actualString.get());
-    OwnArrayPtr<char> buffer = adoptArrayPtr(new char[bufferSize]);
+    auto buffer = std::make_unique<char[]>(bufferSize);
     JSStringGetUTF8CString(context.actualString.get(), buffer.get(), bufferSize);
     
     return compareJSResult(script, buffer.get(), expectedResult);