summaryrefslogtreecommitdiffstats
path: root/Source/WebKit2/Platform/IPC/win/ConnectionWin.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-07-04 15:29:25 +0200
committerLiang Qi <liang.qi@qt.io>2017-07-04 15:30:15 +0200
commitdb2ecc45564609f940ff564e777f76a1a4b734d4 (patch)
treed4756dffb486a2a1c64f13402bafd0327b7ddbb3 /Source/WebKit2/Platform/IPC/win/ConnectionWin.cpp
parent8231f9776c2e4028937411bd2a0886aa72c97831 (diff)
parentd10511e0a3f655ab2b1dfebfd9c17ade151a7cfe (diff)
Merge remote-tracking branch 'origin/5.212' into dev
Diffstat (limited to 'Source/WebKit2/Platform/IPC/win/ConnectionWin.cpp')
-rw-r--r--Source/WebKit2/Platform/IPC/win/ConnectionWin.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/WebKit2/Platform/IPC/win/ConnectionWin.cpp b/Source/WebKit2/Platform/IPC/win/ConnectionWin.cpp
index 7ea5ba0f5..c5a8ccfa9 100644
--- a/Source/WebKit2/Platform/IPC/win/ConnectionWin.cpp
+++ b/Source/WebKit2/Platform/IPC/win/ConnectionWin.cpp
@@ -29,6 +29,7 @@
#include "DataReference.h"
#include <wtf/RandomNumber.h>
#include <wtf/text/WTFString.h>
+#include <wtf/text/win/WCharStringExtras.h>
#include <wtf/threads/BinarySemaphore.h>
using namespace std;
@@ -46,7 +47,7 @@ bool Connection::createServerAndClientIdentifiers(HANDLE& serverIdentifier, HAND
unsigned uniqueID = randomNumber() * std::numeric_limits<unsigned>::max();
pipeName = String::format("\\\\.\\pipe\\com.apple.WebKit.%x", uniqueID);
- serverIdentifier = ::CreateNamedPipe(pipeName.charactersWithNullTermination().data(),
+ serverIdentifier = ::CreateNamedPipe(stringToNullTerminatedWChar(pipeName).data(),
PIPE_ACCESS_DUPLEX | FILE_FLAG_FIRST_PIPE_INSTANCE | FILE_FLAG_OVERLAPPED,
PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE, 1, inlineMessageMaxSize, inlineMessageMaxSize,
0, 0);
@@ -61,7 +62,7 @@ bool Connection::createServerAndClientIdentifiers(HANDLE& serverIdentifier, HAND
if (!serverIdentifier)
return false;
- clientIdentifier = ::CreateFileW(pipeName.charactersWithNullTermination().data(), GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0);
+ clientIdentifier = ::CreateFileW(stringToNullTerminatedWChar(pipeName).data(), GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0);
if (!clientIdentifier) {
::CloseHandle(serverIdentifier);
return false;