diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-05-30 12:48:17 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-05-30 12:48:17 +0200 |
commit | 881da28418d380042aa95a97f0cbd42560a64f7c (patch) | |
tree | a794dff3274695e99c651902dde93d934ea7a5af /Tools/TestWebKitAPI/JavaScriptTest.cpp | |
parent | 7e104c57a70fdf551bb3d22a5d637cdcbc69dbea (diff) | |
parent | 0fcedcd17cc00d3dd44c718b3cb36c1033319671 (diff) | |
download | qtwebkit-881da28418d380042aa95a97f0cbd42560a64f7c.tar.gz |
Merge 'wip/next' into dev
Change-Id: Iff9ee5e23bb326c4371ec8ed81d56f2f05d680e9
Diffstat (limited to 'Tools/TestWebKitAPI/JavaScriptTest.cpp')
-rw-r--r-- | Tools/TestWebKitAPI/JavaScriptTest.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Tools/TestWebKitAPI/JavaScriptTest.cpp b/Tools/TestWebKitAPI/JavaScriptTest.cpp index 85be89252..133d99eee 100644 --- a/Tools/TestWebKitAPI/JavaScriptTest.cpp +++ b/Tools/TestWebKitAPI/JavaScriptTest.cpp @@ -24,15 +24,18 @@ */ #include "config.h" + +#if WK_HAVE_C_SPI + #include "JavaScriptTest.h" #include "PlatformUtilities.h" #include "Test.h" #include <JavaScriptCore/JSContextRef.h> #include <JavaScriptCore/JSRetainPtr.h> -#include <WebKit2/WKRetainPtr.h> -#include <WebKit2/WKSerializedScriptValue.h> -#include <wtf/OwnArrayPtr.h> +#include <WebKit/WKRetainPtr.h> +#include <WebKit/WKSerializedScriptValue.h> +#include <wtf/StdLibExtras.h> namespace TestWebKitAPI { @@ -72,7 +75,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); @@ -90,3 +93,5 @@ static void javaScriptCallback(WKSerializedScriptValueRef resultSerializedScript } } // namespace TestWebKitAPI + +#endif |