Diff
Modified: trunk/Source/WebCore/ChangeLog (266466 => 266467)
--- trunk/Source/WebCore/ChangeLog 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebCore/ChangeLog 2020-09-02 16:10:19 UTC (rev 266467)
@@ -1,3 +1,39 @@
+2020-09-02 Youenn Fablet <[email protected]>
+
+ Introduce a ThreadableWebSocketChannel identifier
+ https://bugs.webkit.org/show_bug.cgi?id=216034
+
+ Reviewed by Alex Christensen.
+
+ Clean-up code to have a single identifier for all WebSockets.
+ We use a WebSocketIdentifier that is now moved from WebKit to WebCore.
+ Introduce CookieGetter name following comments from https://bugs.webkit.org/show_bug.cgi?id=215928 review.
+ No change of behavior.
+
+ * Headers.cmake:
+ * Modules/websockets/ThreadableWebSocketChannel.cpp:
+ (WebCore::ThreadableWebSocketChannel::ThreadableWebSocketChannel):
+ * Modules/websockets/ThreadableWebSocketChannel.h:
+ (WebCore::ThreadableWebSocketChannel::ref):
+ (WebCore::ThreadableWebSocketChannel::deref):
+ (WebCore::ThreadableWebSocketChannel::identifier const):
+ * Modules/websockets/WebSocketChannel.cpp:
+ (WebCore::WebSocketChannel::connect):
+ (WebCore::WebSocketChannel::clientHandshakeRequest const):
+ * Modules/websockets/WebSocketChannel.h:
+ * Modules/websockets/WebSocketHandshake.cpp:
+ (WebCore::WebSocketHandshake::clientHandshakeRequest const):
+ * Modules/websockets/WebSocketHandshake.h:
+ * Modules/websockets/WebSocketIdentifier.h: Added.
+ * Modules/websockets/WorkerThreadableWebSocketChannel.h:
+ * WebCore.xcodeproj/project.pbxproj:
+ * inspector/agents/InspectorNetworkAgent.cpp:
+ (WebCore::InspectorNetworkAgent::enable):
+ (WebCore::InspectorNetworkAgent::webSocketForRequestId):
+ * page/SocketProvider.cpp:
+ (WebCore::SocketProvider::createSocketStreamHandle):
+ * page/SocketProvider.h:
+
2020-09-02 Alex Christensen <[email protected]>
Allow direct creation of replacement codec
Modified: trunk/Source/WebCore/Headers.cmake (266466 => 266467)
--- trunk/Source/WebCore/Headers.cmake 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebCore/Headers.cmake 2020-09-02 16:10:19 UTC (rev 266467)
@@ -165,6 +165,7 @@
Modules/websockets/WebSocketExtensionDispatcher.h
Modules/websockets/WebSocketExtensionProcessor.h
Modules/websockets/WebSocketFrame.h
+ Modules/websockets/WebSocketIdentifier.h
Modules/websockets/WebSocketHandshake.h
accessibility/AXLogger.h
Modified: trunk/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp (266466 => 266467)
--- trunk/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp 2020-09-02 16:10:19 UTC (rev 266467)
@@ -79,6 +79,11 @@
return create(downcast<Document>(context), client, provider);
}
+ThreadableWebSocketChannel::ThreadableWebSocketChannel()
+ : m_identifier(WebSocketIdentifier::generateThreadSafe())
+{
+}
+
Optional<ThreadableWebSocketChannel::ValidatedURL> ThreadableWebSocketChannel::validateURL(Document& document, const URL& requestedURL)
{
ValidatedURL validatedURL { requestedURL, true };
Modified: trunk/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h (266466 => 266467)
--- trunk/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h 2020-09-02 16:10:19 UTC (rev 266467)
@@ -30,6 +30,7 @@
#pragma once
+#include "WebSocketIdentifier.h"
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
#include <wtf/URL.h>
@@ -53,20 +54,23 @@
public:
static Ref<ThreadableWebSocketChannel> create(Document&, WebSocketChannelClient&, SocketProvider&);
static Ref<ThreadableWebSocketChannel> create(ScriptExecutionContext&, WebSocketChannelClient&, SocketProvider&);
- ThreadableWebSocketChannel() = default;
+ WEBCORE_EXPORT ThreadableWebSocketChannel();
- enum SendResult {
- SendSuccess,
- SendFail
- };
+ void ref() { refThreadableWebSocketChannel(); }
+ void deref() { derefThreadableWebSocketChannel(); }
+ WebSocketIdentifier identifier() const { return m_identifier; };
+
enum class ConnectStatus { KO, OK };
virtual ConnectStatus connect(const URL&, const String& protocol) = 0;
virtual String subprotocol() = 0; // Will be available after didConnect() callback is invoked.
virtual String extensions() = 0; // Will be available after didConnect() callback is invoked.
+
+ enum SendResult { SendSuccess, SendFail };
virtual SendResult send(const String& message) = 0;
virtual SendResult send(const JSC::ArrayBuffer&, unsigned byteOffset, unsigned byteLength) = 0;
virtual SendResult send(Blob&) = 0;
+
virtual unsigned bufferedAmount() const = 0;
virtual void close(int code, const String& reason) = 0;
// Log the reason text and close the connection. Will call didClose().
@@ -76,14 +80,10 @@
virtual void suspend() = 0;
virtual void resume() = 0;
- void ref() { refThreadableWebSocketChannel(); }
- void deref() { derefThreadableWebSocketChannel(); }
-
- // FIXME: Merge channelIdentifier and identifier.
- virtual unsigned channelIdentifier() const = 0;
virtual bool hasCreatedHandshake() const = 0;
virtual bool isConnected() const = 0;
- virtual ResourceRequest clientHandshakeRequest(Function<String(const URL&)>&&) const = 0;
+ using CookieGetter = Function<String(const URL&)>;
+ virtual ResourceRequest clientHandshakeRequest(const CookieGetter&) const = 0;
virtual const ResourceResponse& serverHandshakeResponse() const = 0;
protected:
@@ -97,6 +97,8 @@
};
static Optional<ValidatedURL> validateURL(Document&, const URL&);
WEBCORE_EXPORT static Optional<ResourceRequest> webSocketConnectRequest(Document&, const URL&);
+
+ WebSocketIdentifier m_identifier;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/Modules/websockets/WebSocketChannel.cpp (266466 => 266467)
--- trunk/Source/WebCore/Modules/websockets/WebSocketChannel.cpp 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebCore/Modules/websockets/WebSocketChannel.cpp 2020-09-02 16:10:19 UTC (rev 266467)
@@ -110,7 +110,7 @@
ref();
String partition = m_document->domainForCachePartition();
- m_handle = m_socketProvider->createSocketStreamHandle(m_handshake->url(), *this, page->sessionID(), partition, frame->loader().networkingContext());
+ m_handle = m_socketProvider->createSocketStreamHandle(m_handshake->url(), *this, identifier(), page->sessionID(), partition, frame->loader().networkingContext());
return ConnectStatus::OK;
}
@@ -833,9 +833,9 @@
m_handle->sendData(frameData.data(), frameData.size(), WTFMove(completionHandler));
}
-ResourceRequest WebSocketChannel::clientHandshakeRequest(Function<String(const URL&)>&& cookieRequestHeaderFieldValue) const
+ResourceRequest WebSocketChannel::clientHandshakeRequest(const CookieGetter& cookieRequestHeaderFieldValue) const
{
- return m_handshake->clientHandshakeRequest(WTFMove(cookieRequestHeaderFieldValue));
+ return m_handshake->clientHandshakeRequest(cookieRequestHeaderFieldValue);
}
const ResourceResponse& WebSocketChannel::serverHandshakeResponse() const
Modified: trunk/Source/WebCore/Modules/websockets/WebSocketChannel.h (266466 => 266467)
--- trunk/Source/WebCore/Modules/websockets/WebSocketChannel.h 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebCore/Modules/websockets/WebSocketChannel.h 2020-09-02 16:10:19 UTC (rev 266467)
@@ -114,11 +114,9 @@
void didFinishLoading() override;
void didFail(ExceptionCode errorCode) override;
- unsigned identifier() const { return m_identifier; }
- unsigned channelIdentifier() const final { return m_identifier; }
bool hasCreatedHandshake() const final { return !!m_handshake; }
bool isConnected() const final { return m_handshake->mode() == WebSocketHandshake::Mode::Connected; }
- ResourceRequest clientHandshakeRequest(Function<String(const URL&)>&& cookieRequestHeaderFieldValue) const final;
+ ResourceRequest clientHandshakeRequest(const CookieGetter&) const final;
const ResourceResponse& serverHandshakeResponse() const final;
using RefCounted<WebSocketChannel>::ref;
Modified: trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp (266466 => 266467)
--- trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp 2020-09-02 16:10:19 UTC (rev 266467)
@@ -216,7 +216,7 @@
return builder.toString().utf8();
}
-ResourceRequest WebSocketHandshake::clientHandshakeRequest(Function<String(const URL&)>&& cookieRequestHeaderFieldValue) const
+ResourceRequest WebSocketHandshake::clientHandshakeRequest(const Function<String(const URL&)>& cookieRequestHeaderFieldValue) const
{
// Keep the following consistent with clientHandshakeMessage().
ResourceRequest request(m_url);
Modified: trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.h (266466 => 266467)
--- trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.h 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.h 2020-09-02 16:10:19 UTC (rev 266467)
@@ -64,7 +64,7 @@
String clientLocation() const;
CString clientHandshakeMessage() const;
- ResourceRequest clientHandshakeRequest(Function<String(const URL&)>&& cookieRequestHeaderFieldValue) const;
+ ResourceRequest clientHandshakeRequest(const Function<String(const URL&)>& cookieRequestHeaderFieldValue) const;
void reset();
Copied: trunk/Source/WebCore/Modules/websockets/WebSocketIdentifier.h (from rev 266466, trunk/Source/WebKit/WebProcess/Network/WebSocketIdentifier.h) (0 => 266467)
--- trunk/Source/WebCore/Modules/websockets/WebSocketIdentifier.h (rev 0)
+++ trunk/Source/WebCore/Modules/websockets/WebSocketIdentifier.h 2020-09-02 16:10:19 UTC (rev 266467)
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice , this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include <wtf/ObjectIdentifier.h>
+
+namespace WebCore {
+
+enum WebSocketIdentifierType { };
+using WebSocketIdentifier = ObjectIdentifier<WebSocketIdentifierType>;
+
+} // namespace WebCore
Modified: trunk/Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h (266466 => 266467)
--- trunk/Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h 2020-09-02 16:10:19 UTC (rev 266467)
@@ -160,11 +160,10 @@
class WorkerGlobalScopeDidInitializeTask;
- // Dummy implementation of inspector related APIs.
- unsigned channelIdentifier() const final { return 1; }
+ // FIXME: <https://webkit.org/b/168475> Web Inspector: Correctly display iframe's and worker's WebSockets
bool hasCreatedHandshake() const final { return false; }
bool isConnected() const final { return false; }
- ResourceRequest clientHandshakeRequest(Function<String(const URL&)>&&) const final { return m_handshakeRequest; }
+ ResourceRequest clientHandshakeRequest(const CookieGetter&) const final { return m_handshakeRequest; }
const ResourceResponse& serverHandshakeResponse() const final { return m_handshakeResponse; }
Ref<WorkerGlobalScope> m_workerGlobalScope;
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (266466 => 266467)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-09-02 16:10:19 UTC (rev 266467)
@@ -1137,6 +1137,7 @@
41D41C672256874F00697942 /* ServiceWorkerInternals.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41D41C652256859200697942 /* ServiceWorkerInternals.mm */; };
41DE7C7C222DA14300532B65 /* StorageQuotaManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 41DE7C7B222DA13E00532B65 /* StorageQuotaManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
41DEFCB61E56C1BD000D9E5F /* JSDOMMapLike.h in Headers */ = {isa = PBXBuildFile; fileRef = 41DEFCB41E56C1B9000D9E5F /* JSDOMMapLike.h */; };
+ 41E12E9F24FE74E20093FFB4 /* WebSocketIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 41E12E9D24FE74E20093FFB4 /* WebSocketIdentifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
41E1B1D10FF5986900576B3B /* AbstractWorker.h in Headers */ = {isa = PBXBuildFile; fileRef = 41E1B1CB0FF5986900576B3B /* AbstractWorker.h */; };
41E9DCE7231974BF00F35949 /* BlobLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 41E9DCE4231973FE00F35949 /* BlobLoader.h */; settings = {ATTRIBUTES = (Private, ); }; };
41E9DCE92319CA7600F35949 /* NetworkSendQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 41E9DCE82319CA7500F35949 /* NetworkSendQueue.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -7692,6 +7693,7 @@
41DEFCB41E56C1B9000D9E5F /* JSDOMMapLike.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMMapLike.h; sourceTree = "<group>"; };
41E0A7D923BB590100561060 /* RTCRtpCodecCapability.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCRtpCodecCapability.idl; sourceTree = "<group>"; };
41E0A7DC23BB63DB00561060 /* RTCRtpCodecCapability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCRtpCodecCapability.h; sourceTree = "<group>"; };
+ 41E12E9D24FE74E20093FFB4 /* WebSocketIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSocketIdentifier.h; sourceTree = "<group>"; };
41E1B1CA0FF5986900576B3B /* AbstractWorker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AbstractWorker.cpp; sourceTree = "<group>"; };
41E1B1CB0FF5986900576B3B /* AbstractWorker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AbstractWorker.h; sourceTree = "<group>"; };
41E1B1CC0FF5986900576B3B /* AbstractWorker.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AbstractWorker.idl; sourceTree = "<group>"; };
@@ -23359,6 +23361,7 @@
97AABD0914FA09D5007457AE /* WebSocketExtensionProcessor.h */,
AAF5B7B11524B4BD0004CB49 /* WebSocketFrame.cpp */,
97AABD0A14FA09D5007457AE /* WebSocketFrame.h */,
+ 41E12E9D24FE74E20093FFB4 /* WebSocketIdentifier.h */,
97AABD0B14FA09D5007457AE /* WebSocketHandshake.cpp */,
97AABD0C14FA09D5007457AE /* WebSocketHandshake.h */,
97AABD1114FA09D5007457AE /* WorkerThreadableWebSocketChannel.cpp */,
@@ -33040,6 +33043,7 @@
1A58E8661D19D4F000C0EA73 /* PaymentCoordinatorClient.h in Headers */,
A1F76B371F44C60F0014C318 /* PaymentCurrencyAmount.h in Headers */,
A1F76B1F1F44C3FE0014C318 /* PaymentDetailsBase.h in Headers */,
+ 41E12E9F24FE74E20093FFB4 /* WebSocketIdentifier.h in Headers */,
A1F76B251F44C4910014C318 /* PaymentDetailsInit.h in Headers */,
A1F76B4F1F44D2420014C318 /* PaymentDetailsModifier.h in Headers */,
A1F600491F47594E0077E83F /* PaymentDetailsUpdate.h in Headers */,
Modified: trunk/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp (266466 => 266467)
--- trunk/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp 2020-09-02 16:10:19 UTC (rev 266467)
@@ -819,7 +819,7 @@
auto& document = downcast<Document>(*webSocket->scriptExecutionContext());
auto channel = webSocket->channel();
- auto identifier = channel->channelIdentifier();
+ auto identifier = channel->identifier().toUInt64();
didCreateWebSocket(identifier, webSocket->url());
auto cookieRequestHeaderFieldValue = [document = makeWeakPtr(document)](const URL& url) -> String {
@@ -997,7 +997,7 @@
LockHolder lock(WebSocket::allActiveWebSocketsMutex());
for (auto* webSocket : activeWebSockets(lock)) {
- if (IdentifiersFactory::requestId(webSocket->channel()->channelIdentifier()) == requestId)
+ if (IdentifiersFactory::requestId(webSocket->channel()->identifier().toUInt64()) == requestId)
return webSocket;
}
Modified: trunk/Source/WebCore/page/SocketProvider.cpp (266466 => 266467)
--- trunk/Source/WebCore/page/SocketProvider.cpp 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebCore/page/SocketProvider.cpp 2020-09-02 16:10:19 UTC (rev 266467)
@@ -31,7 +31,7 @@
namespace WebCore {
-Ref<SocketStreamHandle> SocketProvider::createSocketStreamHandle(const URL& url, SocketStreamHandleClient& client, PAL::SessionID sessionID, const String& credentialPartition, const StorageSessionProvider* provider)
+Ref<SocketStreamHandle> SocketProvider::createSocketStreamHandle(const URL& url, SocketStreamHandleClient& client, WebSocketIdentifier, PAL::SessionID sessionID, const String& credentialPartition, const StorageSessionProvider* provider)
{
return SocketStreamHandleImpl::create(url, client, sessionID, credentialPartition, { }, provider);
}
Modified: trunk/Source/WebCore/page/SocketProvider.h (266466 => 266467)
--- trunk/Source/WebCore/page/SocketProvider.h 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebCore/page/SocketProvider.h 2020-09-02 16:10:19 UTC (rev 266467)
@@ -25,6 +25,7 @@
#pragma once
+#include "WebSocketIdentifier.h"
#include <pal/SessionID.h>
#include <wtf/ThreadSafeRefCounted.h>
#include <wtf/text/WTFString.h>
@@ -43,7 +44,7 @@
class WEBCORE_EXPORT SocketProvider : public ThreadSafeRefCounted<SocketProvider> {
public:
static Ref<SocketProvider> create() { return adoptRef(*new SocketProvider); }
- virtual Ref<SocketStreamHandle> createSocketStreamHandle(const URL&, SocketStreamHandleClient&, PAL::SessionID, const String& credentialPartition, const StorageSessionProvider*);
+ virtual Ref<SocketStreamHandle> createSocketStreamHandle(const URL&, SocketStreamHandleClient&, WebSocketIdentifier, PAL::SessionID, const String& credentialPartition, const StorageSessionProvider*);
virtual RefPtr<ThreadableWebSocketChannel> createWebSocketChannel(Document&, WebSocketChannelClient&);
Modified: trunk/Source/WebKit/ChangeLog (266466 => 266467)
--- trunk/Source/WebKit/ChangeLog 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebKit/ChangeLog 2020-09-02 16:10:19 UTC (rev 266467)
@@ -1,3 +1,31 @@
+2020-09-02 Youenn Fablet <[email protected]>
+
+ Introduce a ThreadableWebSocketChannel identifier
+ https://bugs.webkit.org/show_bug.cgi?id=216034
+
+ Reviewed by Alex Christensen.
+
+ * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+ * NetworkProcess/NetworkConnectionToWebProcess.h:
+ * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
+ * NetworkProcess/NetworkSocketChannel.h:
+ * NetworkProcess/NetworkSocketStream.h:
+ * Scripts/webkit/messages.py:
+ * WebKit.xcodeproj/project.pbxproj:
+ * WebProcess/Network/WebSocketChannel.cpp:
+ (WebKit::WebSocketChannel::WebSocketChannel):
+ * WebProcess/Network/WebSocketChannel.h:
+ (WebKit::WebSocketChannel::identifier const): Deleted.
+ * WebProcess/Network/WebSocketChannelManager.h:
+ * WebProcess/Network/WebSocketIdentifier.h: Removed.
+ * WebProcess/Network/WebSocketProvider.cpp:
+ (WebKit::WebSocketProvider::createSocketStreamHandle):
+ * WebProcess/Network/WebSocketProvider.h:
+ * WebProcess/Network/WebSocketStream.cpp:
+ (WebKit::WebSocketStream::create):
+ (WebKit::WebSocketStream::WebSocketStream):
+ * WebProcess/Network/WebSocketStream.h:
+
2020-09-02 Aditya Keerthi <[email protected]>
[macOS] Update date picker when the inner control is edited
Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (266466 => 266467)
--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp 2020-09-02 16:10:19 UTC (rev 266467)
@@ -60,7 +60,6 @@
#include "WebSWServerConnectionMessages.h"
#include "WebSWServerToContextConnection.h"
#include "WebSWServerToContextConnectionMessages.h"
-#include "WebSocketIdentifier.h"
#include "WebsiteDataStoreParameters.h"
#include <WebCore/DocumentStorageAccess.h>
#include <WebCore/HTTPCookieAcceptPolicy.h>
Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h (266466 => 266467)
--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h 2020-09-02 16:10:19 UTC (rev 266467)
@@ -38,7 +38,6 @@
#include "WebPageProxyIdentifier.h"
#include "WebPaymentCoordinatorProxy.h"
#include "WebResourceLoadObserver.h"
-#include "WebSocketIdentifier.h"
#include <_javascript_Core/ConsoleTypes.h>
#include <WebCore/FrameIdentifier.h>
#include <WebCore/MessagePortChannelProvider.h>
@@ -48,6 +47,7 @@
#include <WebCore/PageIdentifier.h>
#include <WebCore/ProcessIdentifier.h>
#include <WebCore/RegistrableDomain.h>
+#include <WebCore/WebSocketIdentifier.h>
#include <wtf/RefCounted.h>
namespace PAL {
@@ -158,7 +158,7 @@
Vector<RefPtr<WebCore::BlobDataFileReference>> resolveBlobReferences(const NetworkResourceLoadParameters&);
- void removeSocketChannel(WebSocketIdentifier);
+ void removeSocketChannel(WebCore::WebSocketIdentifier);
WebCore::ProcessIdentifier webProcessIdentifier() const { return m_webProcessIdentifier; }
@@ -227,9 +227,9 @@
void setCaptureExtraNetworkLoadMetricsEnabled(bool);
- void createSocketStream(URL&&, String cachePartition, WebSocketIdentifier);
+ void createSocketStream(URL&&, String cachePartition, WebCore::WebSocketIdentifier);
- void createSocketChannel(const WebCore::ResourceRequest&, const String& protocol, WebSocketIdentifier);
+ void createSocketChannel(const WebCore::ResourceRequest&, const String& protocol, WebCore::WebSocketIdentifier);
void updateQuotaBasedOnSpaceUsageForTesting(const WebCore::ClientOrigin&);
#if ENABLE(SERVICE_WORKER)
@@ -339,8 +339,8 @@
Ref<NetworkProcess> m_networkProcess;
PAL::SessionID m_sessionID;
- HashMap<WebSocketIdentifier, RefPtr<NetworkSocketStream>> m_networkSocketStreams;
- HashMap<WebSocketIdentifier, std::unique_ptr<NetworkSocketChannel>> m_networkSocketChannels;
+ HashMap<WebCore::WebSocketIdentifier, RefPtr<NetworkSocketStream>> m_networkSocketStreams;
+ HashMap<WebCore::WebSocketIdentifier, std::unique_ptr<NetworkSocketChannel>> m_networkSocketChannels;
NetworkResourceLoadMap m_networkResourceLoaders;
HashMap<String, RefPtr<WebCore::BlobDataFileReference>> m_blobDataFileReferences;
Vector<ResourceNetworkActivityTracker> m_networkActivityTrackers;
Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in (266466 => 266467)
--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in 2020-09-02 16:10:19 UTC (rev 266467)
@@ -58,8 +58,8 @@
SetCaptureExtraNetworkLoadMetricsEnabled(bool enabled)
- CreateSocketStream(URL url, String cachePartition, WebKit::WebSocketIdentifier identifier)
- CreateSocketChannel(WebCore::ResourceRequest request, String protocol, WebKit::WebSocketIdentifier identifier)
+ CreateSocketStream(URL url, String cachePartition, WebCore::WebSocketIdentifier identifier)
+ CreateSocketChannel(WebCore::ResourceRequest request, String protocol, WebCore::WebSocketIdentifier identifier)
#if ENABLE(RESOURCE_LOAD_STATISTICS)
RemoveStorageAccessForFrame(WebCore::FrameIdentifier frameID, WebCore::PageIdentifier pageID);
Modified: trunk/Source/WebKit/NetworkProcess/NetworkSocketChannel.h (266466 => 266467)
--- trunk/Source/WebKit/NetworkProcess/NetworkSocketChannel.h 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebKit/NetworkProcess/NetworkSocketChannel.h 2020-09-02 16:10:19 UTC (rev 266467)
@@ -27,8 +27,8 @@
#include "MessageReceiver.h"
#include "MessageSender.h"
-#include "WebSocketIdentifier.h"
#include <WebCore/Timer.h>
+#include <WebCore/WebSocketIdentifier.h>
#include <pal/SessionID.h>
#include <wtf/CompletionHandler.h>
#include <wtf/WeakPtr.h>
@@ -53,9 +53,9 @@
class NetworkSocketChannel : public IPC::MessageSender, public IPC::MessageReceiver {
WTF_MAKE_FAST_ALLOCATED;
public:
- static std::unique_ptr<NetworkSocketChannel> create(NetworkConnectionToWebProcess&, PAL::SessionID, const WebCore::ResourceRequest&, const String& protocol, WebSocketIdentifier);
+ static std::unique_ptr<NetworkSocketChannel> create(NetworkConnectionToWebProcess&, PAL::SessionID, const WebCore::ResourceRequest&, const String& protocol, WebCore::WebSocketIdentifier);
- NetworkSocketChannel(NetworkConnectionToWebProcess&, NetworkSession*, const WebCore::ResourceRequest&, const String& protocol, WebSocketIdentifier);
+ NetworkSocketChannel(NetworkConnectionToWebProcess&, NetworkSession*, const WebCore::ResourceRequest&, const String& protocol, WebCore::WebSocketIdentifier);
~NetworkSocketChannel();
void didReceiveMessage(IPC::Connection&, IPC::Decoder&);
@@ -84,7 +84,7 @@
void finishClosingIfPossible();
NetworkConnectionToWebProcess& m_connectionToWebProcess;
- WebSocketIdentifier m_identifier;
+ WebCore::WebSocketIdentifier m_identifier;
WeakPtr<NetworkSession> m_session;
std::unique_ptr<WebSocketTask> m_socket;
Modified: trunk/Source/WebKit/NetworkProcess/NetworkSocketStream.h (266466 => 266467)
--- trunk/Source/WebKit/NetworkProcess/NetworkSocketStream.h 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebKit/NetworkProcess/NetworkSocketStream.h 2020-09-02 16:10:19 UTC (rev 266467)
@@ -27,11 +27,11 @@
#include "MessageReceiver.h"
#include "MessageSender.h"
-#include "WebSocketIdentifier.h"
#include <WebCore/SocketStreamError.h>
#include <WebCore/SocketStreamHandleClient.h>
#include <WebCore/SocketStreamHandleImpl.h>
#include <WebCore/Timer.h>
+#include <WebCore/WebSocketIdentifier.h>
#include <pal/SessionID.h>
namespace IPC {
@@ -46,7 +46,7 @@
class NetworkSocketStream : public RefCounted<NetworkSocketStream>, public IPC::MessageSender, public IPC::MessageReceiver, public WebCore::SocketStreamHandleClient {
public:
- static Ref<NetworkSocketStream> create(NetworkProcess&, URL&&, PAL::SessionID, const String& credentialPartition, WebSocketIdentifier, IPC::Connection&, WebCore::SourceApplicationAuditToken&&);
+ static Ref<NetworkSocketStream> create(NetworkProcess&, URL&&, PAL::SessionID, const String& credentialPartition, WebCore::WebSocketIdentifier, IPC::Connection&, WebCore::SourceApplicationAuditToken&&);
~NetworkSocketStream();
void didReceiveMessage(IPC::Connection&, IPC::Decoder&);
@@ -68,9 +68,9 @@
IPC::Connection* messageSenderConnection() const final;
uint64_t messageSenderDestinationID() const final;
- NetworkSocketStream(NetworkProcess&, URL&&, PAL::SessionID, const String& credentialPartition, WebSocketIdentifier, IPC::Connection&, WebCore::SourceApplicationAuditToken&&);
+ NetworkSocketStream(NetworkProcess&, URL&&, PAL::SessionID, const String& credentialPartition, WebCore::WebSocketIdentifier, IPC::Connection&, WebCore::SourceApplicationAuditToken&&);
- WebSocketIdentifier m_identifier;
+ WebCore::WebSocketIdentifier m_identifier;
IPC::Connection& m_connection;
Ref<WebCore::SocketStreamHandleImpl> m_impl;
WebCore::Timer m_delayFailTimer;
Modified: trunk/Source/WebKit/Scripts/webkit/messages.py (266466 => 266467)
--- trunk/Source/WebKit/Scripts/webkit/messages.py 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebKit/Scripts/webkit/messages.py 2020-09-02 16:10:19 UTC (rev 266467)
@@ -229,6 +229,7 @@
'WebCore::SharedStringHash',
'WebCore::SleepDisablerIdentifier',
'WebCore::SWServerConnectionIdentifier',
+ 'WebCore::WebSocketIdentifier',
'WebKit::ActivityStateChangeID',
'WebKit::AudioMediaStreamTrackRendererIdentifier',
'WebKit::ContentWorldIdentifier',
@@ -264,7 +265,6 @@
'WebKit::TransactionID',
'WebKit::UserContentControllerIdentifier',
'WebKit::WebPageProxyIdentifier',
- 'WebKit::WebSocketIdentifier',
])
Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (266466 => 266467)
--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2020-09-02 16:10:19 UTC (rev 266467)
@@ -3457,7 +3457,6 @@
417915B62257046E00D6F97E /* NetworkSocketChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkSocketChannel.h; sourceTree = "<group>"; };
417915B72257046E00D6F97E /* NetworkSocketChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkSocketChannel.cpp; sourceTree = "<group>"; };
417915B82257046E00D6F97E /* NetworkSocketChannel.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NetworkSocketChannel.messages.in; sourceTree = "<group>"; };
- 41794D1C23EDD757008C453F /* WebSocketIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebSocketIdentifier.h; path = Network/WebSocketIdentifier.h; sourceTree = "<group>"; };
41897ECC1F415D5C0016FA42 /* WebCacheStorageProvider.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebCacheStorageProvider.cpp; sourceTree = "<group>"; };
41897ECD1F415D5C0016FA42 /* WebCacheStorageConnection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebCacheStorageConnection.h; sourceTree = "<group>"; };
41897ECE1F415D5C0016FA42 /* WebCacheStorageConnection.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebCacheStorageConnection.cpp; sourceTree = "<group>"; };
@@ -7751,7 +7750,6 @@
417915B42256D1A700D6F97E /* WebSocketChannel.messages.in */,
417915B22256C2E200D6F97E /* WebSocketChannelManager.cpp */,
417915B02256C0D600D6F97E /* WebSocketChannelManager.h */,
- 41794D1C23EDD757008C453F /* WebSocketIdentifier.h */,
5C7706731D111D8B0012700F /* WebSocketProvider.cpp */,
5C7C88DC1D0F41A0009D2F6D /* WebSocketProvider.h */,
5C0B177A1E7C884F00E9123C /* WebSocketStream.cpp */,
Modified: trunk/Source/WebKit/WebProcess/Network/WebSocketChannel.cpp (266466 => 266467)
--- trunk/Source/WebKit/WebProcess/Network/WebSocketChannel.cpp 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebKit/WebProcess/Network/WebSocketChannel.cpp 2020-09-02 16:10:19 UTC (rev 266467)
@@ -71,7 +71,6 @@
WebSocketChannel::WebSocketChannel(Document& document, WebSocketChannelClient& client)
: m_document(makeWeakPtr(document))
- , m_identifier(WebSocketIdentifier::generate())
, m_client(makeWeakPtr(client))
, m_messageQueue(createMessageQueue(document, *this))
, m_inspector(document)
Modified: trunk/Source/WebKit/WebProcess/Network/WebSocketChannel.h (266466 => 266467)
--- trunk/Source/WebKit/WebProcess/Network/WebSocketChannel.h 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebKit/WebProcess/Network/WebSocketChannel.h 2020-09-02 16:10:19 UTC (rev 266467)
@@ -27,7 +27,6 @@
#include "MessageReceiver.h"
#include "MessageSender.h"
-#include "WebSocketIdentifier.h"
#include <WebCore/NetworkSendQueue.h>
#include <WebCore/ResourceRequest.h>
#include <WebCore/ResourceResponse.h>
@@ -49,8 +48,6 @@
static Ref<WebSocketChannel> create(WebCore::Document&, WebCore::WebSocketChannelClient&);
~WebSocketChannel();
- WebSocketIdentifier identifier() const { return m_identifier; }
-
void didReceiveMessage(IPC::Connection&, IPC::Decoder&);
void networkProcessCrashed();
@@ -100,14 +97,12 @@
template<typename T> void sendMessage(T&&, size_t byteLength);
void enqueueTask(Function<void()>&&);
- unsigned channelIdentifier() const final { return m_identifier.toUInt64(); }
bool hasCreatedHandshake() const final { return !m_url.isNull(); }
bool isConnected() const final { return !m_handshakeResponse.isNull(); }
- WebCore::ResourceRequest clientHandshakeRequest(Function<String(const URL&)>&&) const final { return m_handshakeRequest; }
+ WebCore::ResourceRequest clientHandshakeRequest(const CookieGetter&) const final { return m_handshakeRequest; }
const WebCore::ResourceResponse& serverHandshakeResponse() const final { return m_handshakeResponse; }
WeakPtr<WebCore::Document> m_document;
- WebSocketIdentifier m_identifier;
WeakPtr<WebCore::WebSocketChannelClient> m_client;
URL m_url;
String m_subprotocol;
Modified: trunk/Source/WebKit/WebProcess/Network/WebSocketChannelManager.h (266466 => 266467)
--- trunk/Source/WebKit/WebProcess/Network/WebSocketChannelManager.h 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebKit/WebProcess/Network/WebSocketChannelManager.h 2020-09-02 16:10:19 UTC (rev 266467)
@@ -50,7 +50,7 @@
void removeChannel(WebSocketChannel& channel) { m_channels.remove(channel.identifier() ); }
private:
- HashMap<WebSocketIdentifier, WeakPtr<WebSocketChannel>> m_channels;
+ HashMap<WebCore::WebSocketIdentifier, WeakPtr<WebSocketChannel>> m_channels;
};
} // namespace WebKit
Deleted: trunk/Source/WebKit/WebProcess/Network/WebSocketIdentifier.h (266466 => 266467)
--- trunk/Source/WebKit/WebProcess/Network/WebSocketIdentifier.h 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebKit/WebProcess/Network/WebSocketIdentifier.h 2020-09-02 16:10:19 UTC (rev 266467)
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice , this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include <wtf/ObjectIdentifier.h>
-
-namespace WebKit {
-
-enum WebSocketIdentifierType { };
-using WebSocketIdentifier = ObjectIdentifier<WebSocketIdentifierType>;
-
-} // namespace WebKit
Modified: trunk/Source/WebKit/WebProcess/Network/WebSocketProvider.cpp (266466 => 266467)
--- trunk/Source/WebKit/WebProcess/Network/WebSocketProvider.cpp 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebKit/WebProcess/Network/WebSocketProvider.cpp 2020-09-02 16:10:19 UTC (rev 266467)
@@ -38,10 +38,10 @@
namespace WebKit {
using namespace WebCore;
-Ref<SocketStreamHandle> WebSocketProvider::createSocketStreamHandle(const URL& url, SocketStreamHandleClient& client, PAL::SessionID sessionID, const String& credentialPartition, const StorageSessionProvider*)
+Ref<SocketStreamHandle> WebSocketProvider::createSocketStreamHandle(const URL& url, SocketStreamHandleClient& client, WebSocketIdentifier identifier, PAL::SessionID sessionID, const String& credentialPartition, const StorageSessionProvider*)
{
ASSERT_UNUSED(sessionID, sessionID == WebProcess::singleton().sessionID());
- return WebSocketStream::create(url, client, credentialPartition);
+ return WebSocketStream::create(url, client, identifier, credentialPartition);
}
RefPtr<ThreadableWebSocketChannel> WebSocketProvider::createWebSocketChannel(Document& document, WebSocketChannelClient& client)
Modified: trunk/Source/WebKit/WebProcess/Network/WebSocketProvider.h (266466 => 266467)
--- trunk/Source/WebKit/WebProcess/Network/WebSocketProvider.h 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebKit/WebProcess/Network/WebSocketProvider.h 2020-09-02 16:10:19 UTC (rev 266467)
@@ -32,7 +32,7 @@
class WebSocketProvider final : public WebCore::SocketProvider {
public:
static Ref<WebSocketProvider> create() { return adoptRef(*new WebSocketProvider); }
- Ref<WebCore::SocketStreamHandle> createSocketStreamHandle(const URL&, WebCore::SocketStreamHandleClient&, PAL::SessionID, const String& credentialPartition, const WebCore::StorageSessionProvider*) final;
+ Ref<WebCore::SocketStreamHandle> createSocketStreamHandle(const URL&, WebCore::SocketStreamHandleClient&, WebCore::WebSocketIdentifier, PAL::SessionID, const String& credentialPartition, const WebCore::StorageSessionProvider*) final;
RefPtr<WebCore::ThreadableWebSocketChannel> createWebSocketChannel(WebCore::Document&, WebCore::WebSocketChannelClient&) final;
virtual ~WebSocketProvider() { }
};
Modified: trunk/Source/WebKit/WebProcess/Network/WebSocketStream.cpp (266466 => 266467)
--- trunk/Source/WebKit/WebProcess/Network/WebSocketStream.cpp 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebKit/WebProcess/Network/WebSocketStream.cpp 2020-09-02 16:10:19 UTC (rev 266467)
@@ -32,7 +32,6 @@
#include "NetworkSocketStreamMessages.h"
#include "WebCoreArgumentCoders.h"
#include "WebProcess.h"
-#include "WebSocketIdentifier.h"
#include <WebCore/CookieRequestHeaderFieldProxy.h>
#include <WebCore/SocketStreamError.h>
#include <WebCore/SocketStreamHandleClient.h>
@@ -77,14 +76,14 @@
globalWebSocketStreamMap().clear();
}
-Ref<WebSocketStream> WebSocketStream::create(const URL& url, SocketStreamHandleClient& client, const String& credentialPartition)
+Ref<WebSocketStream> WebSocketStream::create(const URL& url, SocketStreamHandleClient& client, WebSocketIdentifier identifier, const String& credentialPartition)
{
- return adoptRef(*new WebSocketStream(url, client, credentialPartition));
+ return adoptRef(*new WebSocketStream(url, client, identifier, credentialPartition));
}
-WebSocketStream::WebSocketStream(const URL& url, WebCore::SocketStreamHandleClient& client, const String& cachePartition)
+WebSocketStream::WebSocketStream(const URL& url, WebCore::SocketStreamHandleClient& client, WebSocketIdentifier identifier, const String& cachePartition)
: SocketStreamHandle(url, client)
- , m_identifier(WebSocketIdentifier::generate())
+ , m_identifier(identifier)
, m_client(client)
{
WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::CreateSocketStream(url, cachePartition, m_identifier), 0);
Modified: trunk/Source/WebKit/WebProcess/Network/WebSocketStream.h (266466 => 266467)
--- trunk/Source/WebKit/WebProcess/Network/WebSocketStream.h 2020-09-02 15:52:14 UTC (rev 266466)
+++ trunk/Source/WebKit/WebProcess/Network/WebSocketStream.h 2020-09-02 16:10:19 UTC (rev 266467)
@@ -27,8 +27,8 @@
#include "MessageReceiver.h"
#include "MessageSender.h"
-#include "WebSocketIdentifier.h"
#include <WebCore/SocketStreamHandle.h>
+#include <WebCore/WebSocketIdentifier.h>
namespace IPC {
class Connection;
@@ -44,9 +44,9 @@
class WebSocketStream : public IPC::MessageSender, public IPC::MessageReceiver, public WebCore::SocketStreamHandle {
public:
- static Ref<WebSocketStream> create(const URL&, WebCore::SocketStreamHandleClient&, const String& credentialPartition);
+ static Ref<WebSocketStream> create(const URL&, WebCore::SocketStreamHandleClient&, WebCore::WebSocketIdentifier, const String& credentialPartition);
static void networkProcessCrashed();
- static WebSocketStream* streamWithIdentifier(WebSocketIdentifier);
+ static WebSocketStream* streamWithIdentifier(WebCore::WebSocketIdentifier);
void didReceiveMessage(IPC::Connection&, IPC::Decoder&);
@@ -72,10 +72,10 @@
IPC::Connection* messageSenderConnection() const final;
uint64_t messageSenderDestinationID() const final;
- WebSocketStream(const URL&, WebCore::SocketStreamHandleClient&, const String& credentialPartition);
+ WebSocketStream(const URL&, WebCore::SocketStreamHandleClient&, WebCore::WebSocketIdentifier, const String& credentialPartition);
~WebSocketStream();
- WebSocketIdentifier m_identifier;
+ WebCore::WebSocketIdentifier m_identifier;
size_t m_bufferedAmount { 0 };
WebCore::SocketStreamHandleClient& m_client;
HashMap<uint64_t, Function<void(bool)>> m_sendDataCallbacks;