Title: [205137] trunk/Source/WebKit2
Revision
205137
Author
ander...@apple.com
Date
2016-08-29 12:44:48 -0700 (Mon, 29 Aug 2016)

Log Message

Stop using WebProcessProxy::fromConnection in WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=161322

Reviewed by Dan Bernstein.

The WebPageProxy already knows its WebProcessProxy - no need to look it up from the connection.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleMessage):
(WebKit::WebPageProxy::handleSynchronousMessage):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (205136 => 205137)


--- trunk/Source/WebKit2/ChangeLog	2016-08-29 19:37:01 UTC (rev 205136)
+++ trunk/Source/WebKit2/ChangeLog	2016-08-29 19:44:48 UTC (rev 205137)
@@ -1,5 +1,18 @@
 2016-08-29  Anders Carlsson  <ander...@apple.com>
 
+        Stop using WebProcessProxy::fromConnection in WebPageProxy
+        https://bugs.webkit.org/show_bug.cgi?id=161322
+
+        Reviewed by Dan Bernstein.
+
+        The WebPageProxy already knows its WebProcessProxy - no need to look it up from the connection.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::handleMessage):
+        (WebKit::WebPageProxy::handleSynchronousMessage):
+
+2016-08-29  Anders Carlsson  <ander...@apple.com>
+
         Move some structs into Connection.cpp
         https://bugs.webkit.org/show_bug.cgi?id=161320
 

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (205136 => 205137)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2016-08-29 19:37:01 UTC (rev 205136)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2016-08-29 19:44:48 UTC (rev 205137)
@@ -669,23 +669,26 @@
 
 void WebPageProxy::handleMessage(IPC::Connection& connection, const String& messageName, const WebKit::UserData& messageBody)
 {
-    auto* webProcessProxy = WebProcessProxy::fromConnection(&connection);
-    if (!webProcessProxy || !m_injectedBundleClient)
+    ASSERT(m_process->connection() == &connection);
+
+    if (!m_injectedBundleClient)
         return;
-    m_injectedBundleClient->didReceiveMessageFromInjectedBundle(this, messageName, webProcessProxy->transformHandlesToObjects(messageBody.object()).get());
+
+    m_injectedBundleClient->didReceiveMessageFromInjectedBundle(this, messageName, m_process->transformHandlesToObjects(messageBody.object()).get());
 }
 
 void WebPageProxy::handleSynchronousMessage(IPC::Connection& connection, const String& messageName, const UserData& messageBody, UserData& returnUserData)
 {
-    if (!WebProcessProxy::fromConnection(&connection) || !m_injectedBundleClient)
+    ASSERT(m_process->connection() == &connection);
+
+    if (!m_injectedBundleClient)
         return;
 
     RefPtr<API::Object> returnData;
-    m_injectedBundleClient->didReceiveSynchronousMessageFromInjectedBundle(this, messageName, WebProcessProxy::fromConnection(&connection)->transformHandlesToObjects(messageBody.object()).get(), returnData);
-    returnUserData = UserData(WebProcessProxy::fromConnection(&connection)->transformObjectsToHandles(returnData.get()));
+    m_injectedBundleClient->didReceiveSynchronousMessageFromInjectedBundle(this, messageName, m_process->transformHandlesToObjects(messageBody.object()).get(), returnData);
+    returnUserData = UserData(m_process->transformObjectsToHandles(returnData.get()));
 }
 
-
 void WebPageProxy::reattachToWebProcess()
 {
     ASSERT(!m_isClosed);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to