Make MessageSender functions const
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Feb 2019 01:30:24 +0000 (01:30 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Feb 2019 01:30:24 +0000 (01:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194247

Reviewed by Brady Eidson.

* NetworkProcess/Downloads/Download.cpp:
(WebKit::Download::messageSenderConnection const):
(WebKit::Download::messageSenderDestinationID const):
(WebKit::Download::messageSenderConnection): Deleted.
(WebKit::Download::messageSenderDestinationID): Deleted.
* NetworkProcess/Downloads/Download.h:
* NetworkProcess/Downloads/PendingDownload.cpp:
(WebKit::PendingDownload::messageSenderConnection const):
(WebKit::PendingDownload::messageSenderDestinationID const):
(WebKit::PendingDownload::messageSenderConnection): Deleted.
(WebKit::PendingDownload::messageSenderDestinationID): Deleted.
* NetworkProcess/Downloads/PendingDownload.h:
* NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
(WebKit::WebIDBConnectionToClient::messageSenderConnection const):
(WebKit::WebIDBConnectionToClient::messageSenderConnection): Deleted.
* NetworkProcess/IndexedDB/WebIDBConnectionToClient.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::messageSenderConnection const):
(WebKit::NetworkResourceLoader::messageSenderConnection): Deleted.
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/NetworkSocketStream.cpp:
(WebKit::NetworkSocketStream::messageSenderConnection const):
(WebKit::NetworkSocketStream::messageSenderDestinationID const):
(WebKit::NetworkSocketStream::messageSenderConnection): Deleted.
(WebKit::NetworkSocketStream::messageSenderDestinationID): Deleted.
* NetworkProcess/NetworkSocketStream.h:
* NetworkProcess/ServiceWorker/WebSWServerConnection.h:
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
(WebKit::WebSWServerToContextConnection::messageSenderConnection const):
(WebKit::WebSWServerToContextConnection::messageSenderDestinationID const):
(WebKit::WebSWServerToContextConnection::messageSenderConnection): Deleted.
(WebKit::WebSWServerToContextConnection::messageSenderDestinationID): Deleted.
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
* Platform/IPC/MessageSender.h:
* Shared/AuxiliaryProcess.cpp:
(WebKit::AuxiliaryProcess::messageSenderConnection const):
(WebKit::AuxiliaryProcess::messageSenderDestinationID const):
(WebKit::AuxiliaryProcess::messageSenderConnection): Deleted.
(WebKit::AuxiliaryProcess::messageSenderDestinationID): Deleted.
* Shared/AuxiliaryProcess.h:
* UIProcess/WebConnectionToWebProcess.cpp:
(WebKit::WebConnectionToWebProcess::messageSenderConnection const):
(WebKit::WebConnectionToWebProcess::messageSenderDestinationID const):
(WebKit::WebConnectionToWebProcess::messageSenderConnection): Deleted.
(WebKit::WebConnectionToWebProcess::messageSenderDestinationID): Deleted.
* UIProcess/WebConnectionToWebProcess.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::messageSenderConnection const):
(WebKit::WebPageProxy::messageSenderDestinationID const):
(WebKit::WebPageProxy::messageSenderConnection): Deleted.
(WebKit::WebPageProxy::messageSenderDestinationID): Deleted.
* UIProcess/WebPageProxy.h:
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
(WebKit::WebIDBConnectionToServer::messageSenderConnection const):
(WebKit::WebIDBConnectionToServer::messageSenderConnection): Deleted.
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::messageSenderConnection const):
(WebKit::WebResourceLoader::messageSenderDestinationID const):
(WebKit::WebResourceLoader::messageSenderConnection): Deleted.
(WebKit::WebResourceLoader::messageSenderDestinationID): Deleted.
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebSocketStream.cpp:
(WebKit::WebSocketStream::messageSenderConnection const):
(WebKit::WebSocketStream::messageSenderDestinationID const):
(WebKit::WebSocketStream::messageSenderConnection): Deleted.
(WebKit::WebSocketStream::messageSenderDestinationID): Deleted.
* WebProcess/Network/WebSocketStream.h:
* WebProcess/Storage/WebSWClientConnection.h:
* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::messageSenderConnection const):
(WebKit::WebConnectionToUIProcess::messageSenderDestinationID const):
(WebKit::WebConnectionToUIProcess::messageSenderConnection): Deleted.
(WebKit::WebConnectionToUIProcess::messageSenderDestinationID): Deleted.
* WebProcess/WebConnectionToUIProcess.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::messageSenderConnection const):
(WebKit::WebPage::messageSenderDestinationID const):
(WebKit::WebPage::messageSenderConnection): Deleted.
(WebKit::WebPage::messageSenderDestinationID): Deleted.
* WebProcess/WebPage/WebPage.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240955 268f45cc-cd09-0410-ab3c-d52691b4dbfc

32 files changed:
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/Downloads/Download.cpp
Source/WebKit/NetworkProcess/Downloads/Download.h
Source/WebKit/NetworkProcess/Downloads/PendingDownload.cpp
Source/WebKit/NetworkProcess/Downloads/PendingDownload.h
Source/WebKit/NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp
Source/WebKit/NetworkProcess/IndexedDB/WebIDBConnectionToClient.h
Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
Source/WebKit/NetworkProcess/NetworkResourceLoader.h
Source/WebKit/NetworkProcess/NetworkSocketStream.cpp
Source/WebKit/NetworkProcess/NetworkSocketStream.h
Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.h
Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp
Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h
Source/WebKit/Platform/IPC/MessageSender.h
Source/WebKit/Shared/AuxiliaryProcess.cpp
Source/WebKit/Shared/AuxiliaryProcess.h
Source/WebKit/UIProcess/WebConnectionToWebProcess.cpp
Source/WebKit/UIProcess/WebConnectionToWebProcess.h
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp
Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h
Source/WebKit/WebProcess/Network/WebResourceLoader.cpp
Source/WebKit/WebProcess/Network/WebResourceLoader.h
Source/WebKit/WebProcess/Network/WebSocketStream.cpp
Source/WebKit/WebProcess/Network/WebSocketStream.h
Source/WebKit/WebProcess/Storage/WebSWClientConnection.h
Source/WebKit/WebProcess/WebConnectionToUIProcess.cpp
Source/WebKit/WebProcess/WebConnectionToUIProcess.h
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKit/WebProcess/WebPage/WebPage.h

index 23fe1d3..13f8ab5 100644 (file)
@@ -1,3 +1,92 @@
+2019-02-04  Alex Christensen  <achristensen@webkit.org>
+
+        Make MessageSender functions const
+        https://bugs.webkit.org/show_bug.cgi?id=194247
+
+        Reviewed by Brady Eidson.
+
+        * NetworkProcess/Downloads/Download.cpp:
+        (WebKit::Download::messageSenderConnection const):
+        (WebKit::Download::messageSenderDestinationID const):
+        (WebKit::Download::messageSenderConnection): Deleted.
+        (WebKit::Download::messageSenderDestinationID): Deleted.
+        * NetworkProcess/Downloads/Download.h:
+        * NetworkProcess/Downloads/PendingDownload.cpp:
+        (WebKit::PendingDownload::messageSenderConnection const):
+        (WebKit::PendingDownload::messageSenderDestinationID const):
+        (WebKit::PendingDownload::messageSenderConnection): Deleted.
+        (WebKit::PendingDownload::messageSenderDestinationID): Deleted.
+        * NetworkProcess/Downloads/PendingDownload.h:
+        * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
+        (WebKit::WebIDBConnectionToClient::messageSenderConnection const):
+        (WebKit::WebIDBConnectionToClient::messageSenderConnection): Deleted.
+        * NetworkProcess/IndexedDB/WebIDBConnectionToClient.h:
+        * NetworkProcess/NetworkResourceLoader.cpp:
+        (WebKit::NetworkResourceLoader::messageSenderConnection const):
+        (WebKit::NetworkResourceLoader::messageSenderConnection): Deleted.
+        * NetworkProcess/NetworkResourceLoader.h:
+        * NetworkProcess/NetworkSocketStream.cpp:
+        (WebKit::NetworkSocketStream::messageSenderConnection const):
+        (WebKit::NetworkSocketStream::messageSenderDestinationID const):
+        (WebKit::NetworkSocketStream::messageSenderConnection): Deleted.
+        (WebKit::NetworkSocketStream::messageSenderDestinationID): Deleted.
+        * NetworkProcess/NetworkSocketStream.h:
+        * NetworkProcess/ServiceWorker/WebSWServerConnection.h:
+        * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
+        (WebKit::WebSWServerToContextConnection::messageSenderConnection const):
+        (WebKit::WebSWServerToContextConnection::messageSenderDestinationID const):
+        (WebKit::WebSWServerToContextConnection::messageSenderConnection): Deleted.
+        (WebKit::WebSWServerToContextConnection::messageSenderDestinationID): Deleted.
+        * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
+        * Platform/IPC/MessageSender.h:
+        * Shared/AuxiliaryProcess.cpp:
+        (WebKit::AuxiliaryProcess::messageSenderConnection const):
+        (WebKit::AuxiliaryProcess::messageSenderDestinationID const):
+        (WebKit::AuxiliaryProcess::messageSenderConnection): Deleted.
+        (WebKit::AuxiliaryProcess::messageSenderDestinationID): Deleted.
+        * Shared/AuxiliaryProcess.h:
+        * UIProcess/WebConnectionToWebProcess.cpp:
+        (WebKit::WebConnectionToWebProcess::messageSenderConnection const):
+        (WebKit::WebConnectionToWebProcess::messageSenderDestinationID const):
+        (WebKit::WebConnectionToWebProcess::messageSenderConnection): Deleted.
+        (WebKit::WebConnectionToWebProcess::messageSenderDestinationID): Deleted.
+        * UIProcess/WebConnectionToWebProcess.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::messageSenderConnection const):
+        (WebKit::WebPageProxy::messageSenderDestinationID const):
+        (WebKit::WebPageProxy::messageSenderConnection): Deleted.
+        (WebKit::WebPageProxy::messageSenderDestinationID): Deleted.
+        * UIProcess/WebPageProxy.h:
+        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
+        (WebKit::WebIDBConnectionToServer::messageSenderConnection const):
+        (WebKit::WebIDBConnectionToServer::messageSenderConnection): Deleted.
+        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
+        * WebProcess/Network/WebResourceLoader.cpp:
+        (WebKit::WebResourceLoader::messageSenderConnection const):
+        (WebKit::WebResourceLoader::messageSenderDestinationID const):
+        (WebKit::WebResourceLoader::messageSenderConnection): Deleted.
+        (WebKit::WebResourceLoader::messageSenderDestinationID): Deleted.
+        * WebProcess/Network/WebResourceLoader.h:
+        * WebProcess/Network/WebSocketStream.cpp:
+        (WebKit::WebSocketStream::messageSenderConnection const):
+        (WebKit::WebSocketStream::messageSenderDestinationID const):
+        (WebKit::WebSocketStream::messageSenderConnection): Deleted.
+        (WebKit::WebSocketStream::messageSenderDestinationID): Deleted.
+        * WebProcess/Network/WebSocketStream.h:
+        * WebProcess/Storage/WebSWClientConnection.h:
+        * WebProcess/WebConnectionToUIProcess.cpp:
+        (WebKit::WebConnectionToUIProcess::messageSenderConnection const):
+        (WebKit::WebConnectionToUIProcess::messageSenderDestinationID const):
+        (WebKit::WebConnectionToUIProcess::messageSenderConnection): Deleted.
+        (WebKit::WebConnectionToUIProcess::messageSenderDestinationID): Deleted.
+        * WebProcess/WebConnectionToUIProcess.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::messageSenderConnection const):
+        (WebKit::WebPage::messageSenderDestinationID const):
+        (WebKit::WebPage::messageSenderConnection): Deleted.
+        (WebKit::WebPage::messageSenderDestinationID): Deleted.
+        * WebProcess/WebPage/WebPage.h:
+
 2019-02-04  Brady Eidson  <beidson@apple.com>
 
         Take additional process assertion while downloading.
index db1ee5f..42d7f1e 100644 (file)
@@ -159,12 +159,12 @@ void Download::didCancel(const IPC::DataReference& resumeData)
     m_downloadManager.downloadFinished(this);
 }
 
-IPC::Connection* Download::messageSenderConnection()
+IPC::Connection* Download::messageSenderConnection() const
 {
     return m_downloadManager.downloadProxyConnection();
 }
 
-uint64_t Download::messageSenderDestinationID()
+uint64_t Download::messageSenderDestinationID() const
 {
     return m_downloadID.downloadID();
 }
index 7d4cb01..bc07de0 100644 (file)
@@ -91,8 +91,8 @@ public:
 
 private:
     // IPC::MessageSender
-    IPC::Connection* messageSenderConnection() override;
-    uint64_t messageSenderDestinationID() override;
+    IPC::Connection* messageSenderConnection() const override;
+    uint64_t messageSenderDestinationID() const override;
 
     void platformCancelNetworkLoad();
     void platformDestroyDownload();
index 3ec983e..566db9d 100644 (file)
@@ -98,7 +98,7 @@ void PendingDownload::didFailLoading(const WebCore::ResourceError& error)
     send(Messages::DownloadProxy::DidFail(error, { }));
 }
     
-IPC::Connection* PendingDownload::messageSenderConnection()
+IPC::Connection* PendingDownload::messageSenderConnection() const
 {
     return m_parentProcessConnection.get();
 }
@@ -108,7 +108,7 @@ void PendingDownload::didReceiveResponse(WebCore::ResourceResponse&& response, R
     completionHandler(WebCore::PolicyAction::Download);
 }
 
-uint64_t PendingDownload::messageSenderDestinationID()
+uint64_t PendingDownload::messageSenderDestinationID() const
 {
     return m_networkLoad->pendingDownloadID().downloadID();
 }
index 4b92f1b..a0c595d 100644 (file)
@@ -71,8 +71,8 @@ private:
     void didFailLoading(const WebCore::ResourceError&) override;
 
     // MessageSender.
-    IPC::Connection* messageSenderConnection() override;
-    uint64_t messageSenderDestinationID() override;
+    IPC::Connection* messageSenderConnection() const override;
+    uint64_t messageSenderDestinationID() const override;
 
 private:
     std::unique_ptr<NetworkLoad> m_networkLoad;
index a1fecd2..d0e8565 100644 (file)
@@ -69,7 +69,7 @@ void WebIDBConnectionToClient::disconnectedFromWebProcess()
     m_networkProcess->idbServer(m_sessionID).unregisterConnection(*m_connectionToClient);
 }
 
-IPC::Connection* WebIDBConnectionToClient::messageSenderConnection()
+IPC::Connection* WebIDBConnectionToClient::messageSenderConnection() const
 {
     return m_connection.ptr();
 }
index 54b1359..b13434c 100644 (file)
@@ -60,7 +60,7 @@ public:
 
     WebCore::IDBServer::IDBConnectionToClient& connectionToClient();
     uint64_t identifier() const final { return m_identifier; }
-    uint64_t messageSenderDestinationID() final { return m_identifier; }
+    uint64_t messageSenderDestinationID() const final { return m_identifier; }
 
     // IDBConnectionToClientDelegate
     void didDeleteDatabase(const WebCore::IDBResultData&) final;
@@ -130,7 +130,7 @@ public:
 private:
     WebIDBConnectionToClient(NetworkProcess&, IPC::Connection&, uint64_t serverConnectionIdentifier, PAL::SessionID);
 
-    IPC::Connection* messageSenderConnection() final;
+    IPC::Connection* messageSenderConnection() const final;
 
     template<class MessageType> void handleGetResult(const WebCore::IDBResultData&);
 
index 9df0d76..34624a1 100644 (file)
@@ -898,7 +898,7 @@ void NetworkResourceLoader::dispatchWillSendRequestForCacheEntry(ResourceRequest
     willSendRedirectedRequest(WTFMove(request), ResourceRequest { *entry->redirectRequest() }, ResourceResponse { entry->response() });
 }
 
-IPC::Connection* NetworkResourceLoader::messageSenderConnection()
+IPC::Connection* NetworkResourceLoader::messageSenderConnection() const
 {
     return &connectionToWebProcess().connection();
 }
index fb0eec7..e7ccb81 100644 (file)
@@ -81,7 +81,7 @@ public:
 
     const WebCore::ResourceResponse& response() const { return m_response; }
 
-    NetworkConnectionToWebProcess& connectionToWebProcess() { return m_connection; }
+    NetworkConnectionToWebProcess& connectionToWebProcess() const { return m_connection; }
     PAL::SessionID sessionID() const { return m_parameters.sessionID; }
     ResourceLoadIdentifier identifier() const { return m_parameters.identifier; }
     uint64_t frameID() const { return m_parameters.webFrameID; }
@@ -119,8 +119,8 @@ private:
     NetworkResourceLoader(NetworkResourceLoadParameters&&, NetworkConnectionToWebProcess&, Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::DelayedReply&&);
 
     // IPC::MessageSender
-    IPC::Connection* messageSenderConnection() override;
-    uint64_t messageSenderDestinationID() override { return m_parameters.identifier; }
+    IPC::Connection* messageSenderConnection() const override;
+    uint64_t messageSenderDestinationID() const override { return m_parameters.identifier; }
 
     bool canUseCache(const WebCore::ResourceRequest&) const;
     bool canUseCachedRedirect(const WebCore::ResourceRequest&) const;
index e26721f..9efcdde 100644 (file)
@@ -107,12 +107,12 @@ void NetworkSocketStream::didFailSocketStream(SocketStreamHandle& handle, const
     send(Messages::WebSocketStream::DidFailSocketStream(error));
 }
 
-IPC::Connection* NetworkSocketStream::messageSenderConnection()
+IPC::Connection* NetworkSocketStream::messageSenderConnection() const
 {
     return &m_connection;
 }
 
-uint64_t NetworkSocketStream::messageSenderDestinationID()
+uint64_t NetworkSocketStream::messageSenderDestinationID() const
 {
     return m_identifier;
 }
index 145fc0c..42b5086 100644 (file)
@@ -61,8 +61,8 @@ public:
     void didFailSocketStream(WebCore::SocketStreamHandle&, const WebCore::SocketStreamError&) final;
 
 private:
-    IPC::Connection* messageSenderConnection() final;
-    uint64_t messageSenderDestinationID() final;
+    IPC::Connection* messageSenderConnection() const final;
+    uint64_t messageSenderDestinationID() const final;
 
     NetworkSocketStream(NetworkProcess&, URL&&, PAL::SessionID, const String& credentialPartition, uint64_t, IPC::Connection&, WebCore::SourceApplicationAuditToken&&);
 
index 8f36d77..e96da20 100644 (file)
@@ -98,8 +98,8 @@ private:
     void registerServiceWorkerClient(WebCore::SecurityOriginData&& topOrigin, WebCore::ServiceWorkerClientData&&, const Optional<WebCore::ServiceWorkerRegistrationIdentifier>&, String&& userAgent);
     void unregisterServiceWorkerClient(const WebCore::ServiceWorkerClientIdentifier&);
 
-    IPC::Connection* messageSenderConnection() final { return m_contentConnection.ptr(); }
-    uint64_t messageSenderDestinationID() final { return identifier().toUInt64(); }
+    IPC::Connection* messageSenderConnection() const final { return m_contentConnection.ptr(); }
+    uint64_t messageSenderDestinationID() const final { return identifier().toUInt64(); }
     
     template<typename U> static void sendToContextProcess(WebCore::SWServerToContextConnection&, U&& message);
 
index 6ba6756..000e427 100644 (file)
@@ -45,12 +45,12 @@ WebSWServerToContextConnection::WebSWServerToContextConnection(NetworkProcess& n
 
 WebSWServerToContextConnection::~WebSWServerToContextConnection() = default;
 
-IPC::Connection* WebSWServerToContextConnection::messageSenderConnection()
+IPC::Connection* WebSWServerToContextConnection::messageSenderConnection() const
 {
     return m_ipcConnection.ptr();
 }
 
-uint64_t WebSWServerToContextConnection::messageSenderDestinationID()
+uint64_t WebSWServerToContextConnection::messageSenderDestinationID() const
 {
     return 0;
 }
index 8bfc6ef..2f889b2 100644 (file)
@@ -56,8 +56,8 @@ private:
     ~WebSWServerToContextConnection();
 
     // IPC::MessageSender
-    IPC::Connection* messageSenderConnection() final;
-    uint64_t messageSenderDestinationID() final;
+    IPC::Connection* messageSenderConnection() const final;
+    uint64_t messageSenderDestinationID() const final;
 
     // Messages to the SW host WebProcess
     void installServiceWorkerContext(const WebCore::ServiceWorkerContextData&, PAL::SessionID, const String& userAgent) final;
index ec91d76..d5f981e 100644 (file)
@@ -74,8 +74,8 @@ public:
     virtual bool sendMessage(std::unique_ptr<Encoder>, OptionSet<SendOption>);
 
 private:
-    virtual Connection* messageSenderConnection() = 0;
-    virtual uint64_t messageSenderDestinationID() = 0;
+    virtual Connection* messageSenderConnection() const = 0;
+    virtual uint64_t messageSenderDestinationID() const = 0;
 };
 
 } // namespace IPC
index 0ca9a2c..ac386a6 100644 (file)
@@ -150,12 +150,12 @@ void AuxiliaryProcess::enableTermination()
     m_terminationTimer.startOneShot(m_terminationTimeout);
 }
 
-IPC::Connection* AuxiliaryProcess::messageSenderConnection()
+IPC::Connection* AuxiliaryProcess::messageSenderConnection() const
 {
     return m_connection.get();
 }
 
-uint64_t AuxiliaryProcess::messageSenderDestinationID()
+uint64_t AuxiliaryProcess::messageSenderDestinationID() const
 {
     return 0;
 }
index 76302c3..42f10c2 100644 (file)
@@ -114,8 +114,8 @@ private:
     virtual bool shouldOverrideQuarantine() { return true; }
 
     // IPC::MessageSender
-    IPC::Connection* messageSenderConnection() override;
-    uint64_t messageSenderDestinationID() override;
+    IPC::Connection* messageSenderConnection() const override;
+    uint64_t messageSenderDestinationID() const override;
 
     // IPC::Connection::Client.
     void didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference messageReceiverName, IPC::StringReference messageName) final;
index 2065c84..33c1ff8 100644 (file)
@@ -66,12 +66,12 @@ bool WebConnectionToWebProcess::hasValidConnection() const
     return m_process;
 }
 
-IPC::Connection* WebConnectionToWebProcess::messageSenderConnection()
+IPC::Connection* WebConnectionToWebProcess::messageSenderConnection() const
 {
     return m_process->connection();
 }
 
-uint64_t WebConnectionToWebProcess::messageSenderDestinationID()
+uint64_t WebConnectionToWebProcess::messageSenderDestinationID() const
 {
     return 0;
 }
index 7be1f1d..c6a4d9a 100644 (file)
@@ -48,8 +48,8 @@ private:
     bool hasValidConnection() const override;
 
     // IPC::MessageSender
-    IPC::Connection* messageSenderConnection() override;
-    uint64_t messageSenderDestinationID() override;
+    IPC::Connection* messageSenderConnection() const override;
+    uint64_t messageSenderDestinationID() const override;
 
     WebProcessProxy* m_process;
 };
index 4bca922..c8e0feb 100644 (file)
@@ -5580,12 +5580,12 @@ bool WebPageProxy::sendMessage(std::unique_ptr<IPC::Encoder> encoder, OptionSet<
     return m_process->sendMessage(WTFMove(encoder), sendOptions);
 }
 
-IPC::Connection* WebPageProxy::messageSenderConnection()
+IPC::Connection* WebPageProxy::messageSenderConnection() const
 {
     return m_process->connection();
 }
 
-uint64_t WebPageProxy::messageSenderDestinationID()
+uint64_t WebPageProxy::messageSenderDestinationID() const
 {
     return m_pageID;
 }
index 6f103cc..7be9194 100644 (file)
@@ -1479,8 +1479,8 @@ private:
 
     // IPC::MessageSender
     bool sendMessage(std::unique_ptr<IPC::Encoder>, OptionSet<IPC::SendOption>) override;
-    IPC::Connection* messageSenderConnection() override;
-    uint64_t messageSenderDestinationID() override;
+    IPC::Connection* messageSenderConnection() const override;
+    uint64_t messageSenderDestinationID() const override;
 
     // WebPopupMenuProxy::Client
     void valueChangedForPopupMenu(WebPopupMenuProxy*, int32_t newSelectedIndex) override;
index f352200..17c4a94 100644 (file)
@@ -71,7 +71,7 @@ WebIDBConnectionToServer::~WebIDBConnectionToServer()
 {
 }
 
-IPC::Connection* WebIDBConnectionToServer::messageSenderConnection()
+IPC::Connection* WebIDBConnectionToServer::messageSenderConnection() const
 {
     return &WebProcess::singleton().ensureNetworkProcessConnection().connection();
 }
index 8fe9cb9..fc11d41 100644 (file)
@@ -44,7 +44,7 @@ public:
 
     WebCore::IDBClient::IDBConnectionToServer& coreConnectionToServer();
     uint64_t identifier() const final { return m_identifier; }
-    uint64_t messageSenderDestinationID() final { return m_identifier; }
+    uint64_t messageSenderDestinationID() const final { return m_identifier; }
 
     // IDBConnectionToServerDelegate
     void deleteDatabase(const WebCore::IDBRequestData&) final;
@@ -111,7 +111,7 @@ public:
 private:
     WebIDBConnectionToServer(PAL::SessionID);
 
-    IPC::Connection* messageSenderConnection() final;
+    IPC::Connection* messageSenderConnection() const final;
 
     uint64_t m_identifier { 0 };
     bool m_isOpenInServer { false };
index 1309dc7..bf88fda 100644 (file)
@@ -65,12 +65,12 @@ WebResourceLoader::~WebResourceLoader()
 {
 }
 
-IPC::Connection* WebResourceLoader::messageSenderConnection()
+IPC::Connection* WebResourceLoader::messageSenderConnection() const
 {
     return &WebProcess::singleton().ensureNetworkProcessConnection().connection();
 }
 
-uint64_t WebResourceLoader::messageSenderDestinationID()
+uint64_t WebResourceLoader::messageSenderDestinationID() const
 {
     RELEASE_ASSERT(RunLoop::isMain());
     RELEASE_ASSERT(m_coreLoader->identifier());
index c62d44d..7fd7832 100644 (file)
@@ -71,8 +71,8 @@ private:
     WebResourceLoader(Ref<WebCore::ResourceLoader>&&, const TrackingParameters&);
 
     // IPC::MessageSender
-    IPC::Connection* messageSenderConnection() override;
-    uint64_t messageSenderDestinationID() override;
+    IPC::Connection* messageSenderConnection() const override;
+    uint64_t messageSenderDestinationID() const override;
 
     void willSendRequest(WebCore::ResourceRequest&&, WebCore::ResourceResponse&&);
     void didSendData(uint64_t bytesSent, uint64_t totalBytesToBeSent);
index f3fd61b..52bc385 100644 (file)
@@ -86,12 +86,12 @@ WebSocketStream::~WebSocketStream()
     globalWebSocketStreamMap().remove(identifier());
 }
 
-IPC::Connection* WebSocketStream::messageSenderConnection()
+IPC::Connection* WebSocketStream::messageSenderConnection() const
 {
     return &WebProcess::singleton().ensureNetworkProcessConnection().connection();
 }
 
-uint64_t WebSocketStream::messageSenderDestinationID()
+uint64_t WebSocketStream::messageSenderDestinationID() const
 {
     return identifier();
 }
index 22f01e4..82b885e 100644 (file)
@@ -70,8 +70,8 @@ public:
     
 private:
     // MessageSender
-    IPC::Connection* messageSenderConnection() final;
-    uint64_t messageSenderDestinationID() final;
+    IPC::Connection* messageSenderConnection() const final;
+    uint64_t messageSenderDestinationID() const final;
 
     WebSocketStream(const URL&, WebCore::SocketStreamHandleClient&, PAL::SessionID, const String& credentialPartition);
     ~WebSocketStream();
index 4c712fc..cb1a10c 100644 (file)
@@ -93,8 +93,8 @@ private:
 
     void runOrDelayTaskForImport(WTF::Function<void()>&& task);
 
-    IPC::Connection* messageSenderConnection() final { return m_connection.ptr(); }
-    uint64_t messageSenderDestinationID() final { return m_identifier.toUInt64(); }
+    IPC::Connection* messageSenderConnection() const final { return m_connection.ptr(); }
+    uint64_t messageSenderDestinationID() const final { return m_identifier.toUInt64(); }
 
     void setSWOriginTableSharedMemory(const SharedMemory::Handle&);
     void setSWOriginTableIsImported();
index 9887f9d..f96c30e 100644 (file)
@@ -66,12 +66,12 @@ bool WebConnectionToUIProcess::hasValidConnection() const
     return m_process;
 }
 
-IPC::Connection* WebConnectionToUIProcess::messageSenderConnection()
+IPC::Connection* WebConnectionToUIProcess::messageSenderConnection() const
 {
     return m_process->parentProcessConnection();
 }
 
-uint64_t WebConnectionToUIProcess::messageSenderDestinationID()
+uint64_t WebConnectionToUIProcess::messageSenderDestinationID() const
 {
     return 0;
 }
index 34649d0..efe51dd 100644 (file)
@@ -23,8 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef WebConnectionToUIProcess_h
-#define WebConnectionToUIProcess_h
+#pragma once
 
 #include "WebConnection.h"
 
@@ -47,12 +46,10 @@ private:
     bool hasValidConnection() const override;
 
     // IPC::MessageSender
-    IPC::Connection* messageSenderConnection() override;
-    uint64_t messageSenderDestinationID() override;
+    IPC::Connection* messageSenderConnection() const override;
+    uint64_t messageSenderDestinationID() const override;
 
     WebProcess* m_process;
 };
 
 } // namespace WebKit
-
-#endif // WebConnectionToUIProcess_h
index 2a74ee0..999f87d 100644 (file)
@@ -790,12 +790,12 @@ WebPage::~WebPage()
 #endif
 }
 
-IPC::Connection* WebPage::messageSenderConnection()
+IPC::Connection* WebPage::messageSenderConnection() const
 {
     return WebProcess::singleton().parentProcessConnection();
 }
 
-uint64_t WebPage::messageSenderDestinationID()
+uint64_t WebPage::messageSenderDestinationID() const
 {
     return pageID();
 }
index 4277c9d..a1a0294 100644 (file)
@@ -1152,8 +1152,8 @@ private:
     void updateUserActivity();
 
     // IPC::MessageSender
-    IPC::Connection* messageSenderConnection() override;
-    uint64_t messageSenderDestinationID() override;
+    IPC::Connection* messageSenderConnection() const override;
+    uint64_t messageSenderDestinationID() const override;
 
     void platformInitialize();
     void platformDetach();