[WK2] Use an actual WebProcessProxy when decoding messages
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jul 2012 21:22:37 +0000 (21:22 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jul 2012 21:22:37 +0000 (21:22 +0000)
        https://bugs.webkit.org/show_bug.cgi?id=92788

        Reviewed by Anders Carlsson.

        WebContextUserMessageDecoder gets process proxy from a WebContext object, but we
        know which process a message came from, and can just use that.

        * UIProcess/WebContextUserMessageCoders.h:
        (WebKit::WebContextUserMessageDecoder::WebContextUserMessageDecoder):
        (WebKit::WebContextUserMessageDecoder::decode):
        This is the focal point of this patch - decoder no longer needs to call m_context->process().

        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::didReceiveMessage):
        (WebKit::WebContext::didReceiveSyncMessage):
        * UIProcess/WebContext.h:
        These methods now take a WebProcessProxy pointer instead of IPC::Connection,
        so that they can call the updated coder.
        A number of other didReceiveMessage can be modified to take WebProcessProxy later
        if needed (it's a richer interface than IPC::Connection), although not all messages
        come from WebProcesses.

        * UIProcess/WebConnectionToWebProcess.cpp:
        (WebKit::WebConnectionToWebProcess::didReceiveMessage):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::willGoToBackForwardListItem):
        (WebKit::WebPageProxy::registerIntentServiceForFrame):
        (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
        (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
        (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
        (WebKit::WebPageProxy::didCommitLoadForFrame):
        (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
        (WebKit::WebPageProxy::didFinishLoadForFrame):
        (WebKit::WebPageProxy::didFailLoadForFrame):
        (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
        (WebKit::WebPageProxy::didReceiveTitleForFrame):
        (WebKit::WebPageProxy::didFirstLayoutForFrame):
        (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
        (WebKit::WebPageProxy::didNewFirstVisuallyNonEmptyLayout):
        (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
        (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
        (WebKit::WebPageProxy::didRunInsecureContentForFrame):
        (WebKit::WebPageProxy::didDetectXSSForFrame):
        (WebKit::WebPageProxy::didReceiveIntentForFrame):
        (WebKit::WebPageProxy::decidePolicyForNavigationAction):
        (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
        (WebKit::WebPageProxy::decidePolicyForResponse):
        (WebKit::WebPageProxy::unableToImplementPolicy):
        (WebKit::WebPageProxy::willSubmitForm):
        (WebKit::WebPageProxy::mouseDidMoveOverElement):
        (WebKit::WebPageProxy::internalShowContextMenu):
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::didReceiveMessage):
        (WebKit::WebProcessProxy::didReceiveSyncMessage):
        Updated arguments accordingly.

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebConnectionToWebProcess.cpp
Source/WebKit2/UIProcess/WebContext.cpp
Source/WebKit2/UIProcess/WebContext.h
Source/WebKit2/UIProcess/WebContextUserMessageCoders.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebProcessProxy.cpp

index 8335acc..e34bb20 100644 (file)
@@ -1,3 +1,62 @@
+2012-07-31  Alexey Proskuryakov  <ap@apple.com>
+
+        [WK2] Use an actual WebProcessProxy when decoding messages
+        https://bugs.webkit.org/show_bug.cgi?id=92788
+
+        Reviewed by Anders Carlsson.
+
+        WebContextUserMessageDecoder gets process proxy from a WebContext object, but we
+        know which process a message came from, and can just use that.
+
+        * UIProcess/WebContextUserMessageCoders.h:
+        (WebKit::WebContextUserMessageDecoder::WebContextUserMessageDecoder):
+        (WebKit::WebContextUserMessageDecoder::decode):
+        This is the focal point of this patch - decoder no longer needs to call m_context->process().
+
+        * UIProcess/WebContext.cpp:
+        (WebKit::WebContext::didReceiveMessage):
+        (WebKit::WebContext::didReceiveSyncMessage):
+        * UIProcess/WebContext.h:
+        These methods now take a WebProcessProxy pointer instead of IPC::Connection,
+        so that they can call the updated coder.
+        A number of other didReceiveMessage can be modified to take WebProcessProxy later
+        if needed (it's a richer interface than IPC::Connection), although not all messages
+        come from WebProcesses.
+
+        * UIProcess/WebConnectionToWebProcess.cpp:
+        (WebKit::WebConnectionToWebProcess::didReceiveMessage):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::willGoToBackForwardListItem):
+        (WebKit::WebPageProxy::registerIntentServiceForFrame):
+        (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
+        (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
+        (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
+        (WebKit::WebPageProxy::didCommitLoadForFrame):
+        (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
+        (WebKit::WebPageProxy::didFinishLoadForFrame):
+        (WebKit::WebPageProxy::didFailLoadForFrame):
+        (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
+        (WebKit::WebPageProxy::didReceiveTitleForFrame):
+        (WebKit::WebPageProxy::didFirstLayoutForFrame):
+        (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
+        (WebKit::WebPageProxy::didNewFirstVisuallyNonEmptyLayout):
+        (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
+        (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
+        (WebKit::WebPageProxy::didRunInsecureContentForFrame):
+        (WebKit::WebPageProxy::didDetectXSSForFrame):
+        (WebKit::WebPageProxy::didReceiveIntentForFrame):
+        (WebKit::WebPageProxy::decidePolicyForNavigationAction):
+        (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
+        (WebKit::WebPageProxy::decidePolicyForResponse):
+        (WebKit::WebPageProxy::unableToImplementPolicy):
+        (WebKit::WebPageProxy::willSubmitForm):
+        (WebKit::WebPageProxy::mouseDidMoveOverElement):
+        (WebKit::WebPageProxy::internalShowContextMenu):
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::didReceiveMessage):
+        (WebKit::WebProcessProxy::didReceiveSyncMessage):
+        Updated arguments accordingly.
+
 2012-07-31  Andras Becsi  <andras.becsi@nokia.com>
 
         [WK2] Visible content rect update with null trajectory vector does not reach the backing store
index 84280a7..e0dbc06 100644 (file)
@@ -78,7 +78,7 @@ void WebConnectionToWebProcess::didReceiveMessage(CoreIPC::Connection* connectio
             case WebConnectionLegacyMessage::PostMessage: {
                 String messageName;
                 RefPtr<APIObject> messageBody;
-                WebContextUserMessageDecoder messageDecoder(messageBody, m_process->context());
+                WebContextUserMessageDecoder messageDecoder(messageBody, m_process);
                 if (!arguments->decode(CoreIPC::Out(messageName, messageDecoder)))
                     return;
 
index a02fef7..210e109 100644 (file)
@@ -756,91 +756,91 @@ HashSet<String, CaseFoldingHash> WebContext::pdfAndPostScriptMIMETypes()
     return mimeTypes;
 }
 
-void WebContext::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
+void WebContext::didReceiveMessage(WebProcessProxy* process, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
 {
     if (messageID.is<CoreIPC::MessageClassWebContext>()) {
-        didReceiveWebContextMessage(connection, messageID, arguments);
+        didReceiveWebContextMessage(process->connection(), messageID, arguments);
         return;
     }
 
     if (messageID.is<CoreIPC::MessageClassDownloadProxy>()) {
         if (DownloadProxy* downloadProxy = m_downloads.get(arguments->destinationID()).get())
-            downloadProxy->didReceiveDownloadProxyMessage(connection, messageID, arguments);
+            downloadProxy->didReceiveDownloadProxyMessage(process->connection(), messageID, arguments);
         
         return;
     }
 
     if (messageID.is<CoreIPC::MessageClassWebApplicationCacheManagerProxy>()) {
-        m_applicationCacheManagerProxy->didReceiveMessage(connection, messageID, arguments);
+        m_applicationCacheManagerProxy->didReceiveMessage(process->connection(), messageID, arguments);
         return;
     }
 
 #if ENABLE(BATTERY_STATUS)
     if (messageID.is<CoreIPC::MessageClassWebBatteryManagerProxy>()) {
-        m_batteryManagerProxy->didReceiveMessage(connection, messageID, arguments);
+        m_batteryManagerProxy->didReceiveMessage(process->connection(), messageID, arguments);
         return;
     }
 #endif
 
     if (messageID.is<CoreIPC::MessageClassWebCookieManagerProxy>()) {
-        m_cookieManagerProxy->didReceiveMessage(connection, messageID, arguments);
+        m_cookieManagerProxy->didReceiveMessage(process->connection(), messageID, arguments);
         return;
     }
 
 #if ENABLE(SQL_DATABASE)
     if (messageID.is<CoreIPC::MessageClassWebDatabaseManagerProxy>()) {
-        m_databaseManagerProxy->didReceiveWebDatabaseManagerProxyMessage(connection, messageID, arguments);
+        m_databaseManagerProxy->didReceiveWebDatabaseManagerProxyMessage(process->connection(), messageID, arguments);
         return;
     }
 #endif
 
     if (messageID.is<CoreIPC::MessageClassWebGeolocationManagerProxy>()) {
-        m_geolocationManagerProxy->didReceiveMessage(connection, messageID, arguments);
+        m_geolocationManagerProxy->didReceiveMessage(process->connection(), messageID, arguments);
         return;
     }
     
     if (messageID.is<CoreIPC::MessageClassWebIconDatabase>()) {
-        m_iconDatabase->didReceiveMessage(connection, messageID, arguments);
+        m_iconDatabase->didReceiveMessage(process->connection(), messageID, arguments);
         return;
     }
 
     if (messageID.is<CoreIPC::MessageClassWebKeyValueStorageManagerProxy>()) {
-        m_keyValueStorageManagerProxy->didReceiveMessage(connection, messageID, arguments);
+        m_keyValueStorageManagerProxy->didReceiveMessage(process->connection(), messageID, arguments);
         return;
     }
 
     if (messageID.is<CoreIPC::MessageClassWebMediaCacheManagerProxy>()) {
-        m_mediaCacheManagerProxy->didReceiveMessage(connection, messageID, arguments);
+        m_mediaCacheManagerProxy->didReceiveMessage(process->connection(), messageID, arguments);
         return;
     }
 
 #if ENABLE(NETWORK_INFO)
     if (messageID.is<CoreIPC::MessageClassWebNetworkInfoManagerProxy>()) {
-        m_networkInfoManagerProxy->didReceiveMessage(connection, messageID, arguments);
+        m_networkInfoManagerProxy->didReceiveMessage(process->connection(), messageID, arguments);
         return;
     }
 #endif
     
     if (messageID.is<CoreIPC::MessageClassWebNotificationManagerProxy>()) {
-        m_notificationManagerProxy->didReceiveMessage(connection, messageID, arguments);
+        m_notificationManagerProxy->didReceiveMessage(process->connection(), messageID, arguments);
         return;
     }
 
     if (messageID.is<CoreIPC::MessageClassWebResourceCacheManagerProxy>()) {
-        m_resourceCacheManagerProxy->didReceiveWebResourceCacheManagerProxyMessage(connection, messageID, arguments);
+        m_resourceCacheManagerProxy->didReceiveWebResourceCacheManagerProxyMessage(process->connection(), messageID, arguments);
         return;
     }
 
 #if USE(SOUP)
     if (messageID.is<CoreIPC::MessageClassWebSoupRequestManagerProxy>()) {
-        m_soupRequestManagerProxy->didReceiveMessage(connection, messageID, arguments);
+        m_soupRequestManagerProxy->didReceiveMessage(process->connection(), messageID, arguments);
         return;
     }
 #endif
 
 #if ENABLE(VIBRATION)
     if (messageID.is<CoreIPC::MessageClassWebVibrationProxy>()) {
-        m_vibrationProxy->didReceiveMessage(connection, messageID, arguments);
+        m_vibrationProxy->didReceiveMessage(process->connection(), messageID, arguments);
         return;
     }
 #endif
@@ -849,7 +849,7 @@ void WebContext::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Mes
         case WebContextLegacyMessage::PostMessage: {
             String messageName;
             RefPtr<APIObject> messageBody;
-            WebContextUserMessageDecoder messageDecoder(messageBody, this);
+            WebContextUserMessageDecoder messageDecoder(messageBody, process);
             if (!arguments->decode(CoreIPC::Out(messageName, messageDecoder)))
                 return;
 
@@ -863,27 +863,27 @@ void WebContext::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Mes
     ASSERT_NOT_REACHED();
 }
 
-void WebContext::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::ArgumentEncoder>& reply)
+void WebContext::didReceiveSyncMessage(WebProcessProxy* process, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::ArgumentEncoder>& reply)
 {
     if (messageID.is<CoreIPC::MessageClassWebContext>()) {
-        didReceiveSyncWebContextMessage(connection, messageID, arguments, reply);
+        didReceiveSyncWebContextMessage(process->connection(), messageID, arguments, reply);
         return;
     }
 
     if (messageID.is<CoreIPC::MessageClassDownloadProxy>()) {
         if (DownloadProxy* downloadProxy = m_downloads.get(arguments->destinationID()).get())
-            downloadProxy->didReceiveSyncDownloadProxyMessage(connection, messageID, arguments, reply);
+            downloadProxy->didReceiveSyncDownloadProxyMessage(process->connection(), messageID, arguments, reply);
         return;
     }
     
     if (messageID.is<CoreIPC::MessageClassWebIconDatabase>()) {
-        m_iconDatabase->didReceiveSyncMessage(connection, messageID, arguments, reply);
+        m_iconDatabase->didReceiveSyncMessage(process->connection(), messageID, arguments, reply);
         return;
     }
 
 #if ENABLE(NETWORK_INFO)
     if (messageID.is<CoreIPC::MessageClassWebNetworkInfoManagerProxy>()) {
-        m_networkInfoManagerProxy->didReceiveSyncMessage(connection, messageID, arguments, reply);
+        m_networkInfoManagerProxy->didReceiveSyncMessage(process->connection(), messageID, arguments, reply);
         return;
     }
 #endif
@@ -894,7 +894,7 @@ void WebContext::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC:
 
             String messageName;
             RefPtr<APIObject> messageBody;
-            WebContextUserMessageDecoder messageDecoder(messageBody, this);
+            WebContextUserMessageDecoder messageDecoder(messageBody, m_process.get());
             if (!arguments->decode(CoreIPC::Out(messageName, messageDecoder)))
                 return;
 
index 59482bc..aa1ad3e 100644 (file)
@@ -135,8 +135,8 @@ public:
     void addVisitedLink(const String&);
     void addVisitedLinkHash(WebCore::LinkHash);
 
-    void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
-    void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&);
+    void didReceiveMessage(WebProcessProxy*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
+    void didReceiveSyncMessage(WebProcessProxy*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&);
 
     void setCacheModel(CacheModel);
     CacheModel cacheModel() const { return m_cacheModel; }
index bb2ba39..5693751 100644 (file)
@@ -84,15 +84,15 @@ class WebContextUserMessageDecoder : public UserMessageDecoder<WebContextUserMes
 public:
     typedef UserMessageDecoder<WebContextUserMessageDecoder> Base;
 
-    WebContextUserMessageDecoder(RefPtr<APIObject>& root, WebContext* context)
+    WebContextUserMessageDecoder(RefPtr<APIObject>& root, WebProcessProxy* process)
         : Base(root)
-        , m_context(context)
+        , m_process(process)
     {
     }
 
     WebContextUserMessageDecoder(WebContextUserMessageDecoder& userMessageDecoder, RefPtr<APIObject>& root)
         : Base(root)
-        , m_context(userMessageDecoder.m_context)
+        , m_process(userMessageDecoder.m_process)
     {
     }
 
@@ -110,14 +110,14 @@ public:
             uint64_t pageID;
             if (!decoder->decode(pageID))
                 return false;
-            coder.m_root = coder.m_context->process()->webPage(pageID);
+            coder.m_root = coder.m_process->webPage(pageID);
             break;
         }
         case APIObject::TypeBundleFrame: {
             uint64_t frameID;
             if (!decoder->decode(frameID))
                 return false;
-            coder.m_root = coder.m_context->process()->webFrame(frameID);
+            coder.m_root = coder.m_process->webFrame(frameID);
             break;
         }
         case APIObject::TypeBundlePageGroup: {
@@ -135,7 +135,7 @@ public:
     }
 
 private:
-    WebContext* m_context;
+    WebProcessProxy* m_process;
 };
 
 } // namespace WebKit
index 6cf260a..b75edde 100644 (file)
@@ -671,7 +671,7 @@ void WebPageProxy::shouldGoToBackForwardListItem(uint64_t itemID, bool& shouldGo
 void WebPageProxy::willGoToBackForwardListItem(uint64_t itemID, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -1897,7 +1897,7 @@ void WebPageProxy::didFinishProgress()
 void WebPageProxy::registerIntentServiceForFrame(uint64_t frameID, const IntentServiceInfo& serviceInfo, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -1914,7 +1914,7 @@ void WebPageProxy::didStartProvisionalLoadForFrame(uint64_t frameID, const Strin
     clearPendingAPIRequestURL();
 
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -1931,7 +1931,7 @@ void WebPageProxy::didStartProvisionalLoadForFrame(uint64_t frameID, const Strin
 void WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, const String& url, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -1947,7 +1947,7 @@ void WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t f
 void WebPageProxy::didFailProvisionalLoadForFrame(uint64_t frameID, const ResourceError& error, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -1975,7 +1975,7 @@ void WebPageProxy::clearLoadDependentCallbacks()
 void WebPageProxy::didCommitLoadForFrame(uint64_t frameID, const String& mimeType, bool frameHasCustomRepresentation, const PlatformCertificateInfo& certificateInfo, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -2015,7 +2015,7 @@ void WebPageProxy::didCommitLoadForFrame(uint64_t frameID, const String& mimeTyp
 void WebPageProxy::didFinishDocumentLoadForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -2028,7 +2028,7 @@ void WebPageProxy::didFinishDocumentLoadForFrame(uint64_t frameID, CoreIPC::Argu
 void WebPageProxy::didFinishLoadForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -2043,7 +2043,7 @@ void WebPageProxy::didFinishLoadForFrame(uint64_t frameID, CoreIPC::ArgumentDeco
 void WebPageProxy::didFailLoadForFrame(uint64_t frameID, const ResourceError& error, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -2060,7 +2060,7 @@ void WebPageProxy::didFailLoadForFrame(uint64_t frameID, const ResourceError& er
 void WebPageProxy::didSameDocumentNavigationForFrame(uint64_t frameID, uint32_t opaqueSameDocumentNavigationType, const String& url, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -2077,7 +2077,7 @@ void WebPageProxy::didSameDocumentNavigationForFrame(uint64_t frameID, uint32_t
 void WebPageProxy::didReceiveTitleForFrame(uint64_t frameID, const String& title, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -2092,7 +2092,7 @@ void WebPageProxy::didReceiveTitleForFrame(uint64_t frameID, const String& title
 void WebPageProxy::didFirstLayoutForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -2105,7 +2105,7 @@ void WebPageProxy::didFirstLayoutForFrame(uint64_t frameID, CoreIPC::ArgumentDec
 void WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -2118,7 +2118,7 @@ void WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, Core
 void WebPageProxy::didNewFirstVisuallyNonEmptyLayout(CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -2128,7 +2128,7 @@ void WebPageProxy::didNewFirstVisuallyNonEmptyLayout(CoreIPC::ArgumentDecoder* a
 void WebPageProxy::didRemoveFrameFromHierarchy(uint64_t frameID, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -2143,7 +2143,7 @@ void WebPageProxy::didRemoveFrameFromHierarchy(uint64_t frameID, CoreIPC::Argume
 void WebPageProxy::didDisplayInsecureContentForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -2156,7 +2156,7 @@ void WebPageProxy::didDisplayInsecureContentForFrame(uint64_t frameID, CoreIPC::
 void WebPageProxy::didRunInsecureContentForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -2169,7 +2169,7 @@ void WebPageProxy::didRunInsecureContentForFrame(uint64_t frameID, CoreIPC::Argu
 void WebPageProxy::didDetectXSSForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -2183,7 +2183,7 @@ void WebPageProxy::didDetectXSSForFrame(uint64_t frameID, CoreIPC::ArgumentDecod
 void WebPageProxy::didReceiveIntentForFrame(uint64_t frameID, const IntentData& intentData, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -2209,7 +2209,7 @@ void WebPageProxy::frameDidBecomeFrameSet(uint64_t frameID, bool value)
 void WebPageProxy::decidePolicyForNavigationAction(uint64_t frameID, uint32_t opaqueNavigationType, uint32_t opaqueModifiers, int32_t opaqueMouseButton, const ResourceRequest& request, uint64_t listenerID, CoreIPC::ArgumentDecoder* arguments, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -2247,7 +2247,7 @@ void WebPageProxy::decidePolicyForNavigationAction(uint64_t frameID, uint32_t op
 void WebPageProxy::decidePolicyForNewWindowAction(uint64_t frameID, uint32_t opaqueNavigationType, uint32_t opaqueModifiers, int32_t opaqueMouseButton, const ResourceRequest& request, const String& frameName, uint64_t listenerID, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -2267,7 +2267,7 @@ void WebPageProxy::decidePolicyForNewWindowAction(uint64_t frameID, uint32_t opa
 void WebPageProxy::decidePolicyForResponse(uint64_t frameID, const ResourceResponse& response, const ResourceRequest& request, uint64_t listenerID, CoreIPC::ArgumentDecoder* arguments, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -2299,7 +2299,7 @@ void WebPageProxy::decidePolicyForResponse(uint64_t frameID, const ResourceRespo
 void WebPageProxy::unableToImplementPolicy(uint64_t frameID, const ResourceError& error, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
     
@@ -2314,7 +2314,7 @@ void WebPageProxy::unableToImplementPolicy(uint64_t frameID, const ResourceError
 void WebPageProxy::willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, const StringPairVector& textFieldValues, uint64_t listenerID, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -2457,7 +2457,7 @@ void WebPageProxy::setStatusText(const String& text)
 void WebPageProxy::mouseDidMoveOverElement(const WebHitTestResult::Data& hitTestResultData, uint32_t opaqueModifiers, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
@@ -2907,7 +2907,7 @@ void WebPageProxy::showContextMenu(const IntPoint& menuLocation, const WebHitTes
 void WebPageProxy::internalShowContextMenu(const IntPoint& menuLocation, const WebHitTestResult::Data& hitTestResultData, const Vector<WebContextMenuItemData>& proposedItems, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
-    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
+    WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
     if (!arguments->decode(messageDecoder))
         return;
 
index e3cdc88..5a0af62 100644 (file)
@@ -332,7 +332,7 @@ void WebProcessProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC
         || messageID.is<CoreIPC::MessageClassWebVibrationProxy>()
 #endif
         || messageID.is<CoreIPC::MessageClassWebResourceCacheManagerProxy>()) {
-        m_context->didReceiveMessage(connection, messageID, arguments);
+        m_context->didReceiveMessage(this, messageID, arguments);
         return;
     }
 
@@ -359,7 +359,7 @@ void WebProcessProxy::didReceiveSyncMessage(CoreIPC::Connection* connection, Cor
         || messageID.is<CoreIPC::MessageClassWebNetworkInfoManagerProxy>()
 #endif
         || messageID.is<CoreIPC::MessageClassDownloadProxy>() || messageID.is<CoreIPC::MessageClassWebIconDatabase>()) {
-        m_context->didReceiveSyncMessage(connection, messageID, arguments, reply);
+        m_context->didReceiveSyncMessage(this, messageID, arguments, reply);
         return;
     }