From ad0d549d4cc13433f77c1ac8f0ab379c83d93f28 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 24 Feb 2012 16:36:50 +0100 Subject: Imported WebKit commit bb52bf3c0119e8a128cd93afe5572413a8617de9 (http://svn.webkit.org/repository/webkit/trunk@108790) --- Source/WebKit2/UIProcess/WebProcessProxy.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'Source/WebKit2/UIProcess/WebProcessProxy.cpp') diff --git a/Source/WebKit2/UIProcess/WebProcessProxy.cpp b/Source/WebKit2/UIProcess/WebProcessProxy.cpp index 2109d9e7a..9ce54407e 100644 --- a/Source/WebKit2/UIProcess/WebProcessProxy.cpp +++ b/Source/WebKit2/UIProcess/WebProcessProxy.cpp @@ -245,7 +245,17 @@ bool WebProcessProxy::checkURLReceivedFromWebProcess(const KURL& url) return true; } + // Items in back/forward list have been already checked. + // One case where we don't have sandbox extensions for file URLs in b/f list is if the list has been reinstated after a crash or a browser restart. + for (WebBackForwardListItemMap::iterator iter = m_backForwardListItemMap.begin(), end = m_backForwardListItemMap.end(); iter != end; ++iter) { + if (KURL(KURL(), iter->second->url()).fileSystemPath() == path) + return true; + if (KURL(KURL(), iter->second->originalURL()).fileSystemPath() == path) + return true; + } + // A Web process that was never asked to load a file URL should not ever ask us to do anything with a file URL. + fprintf(stderr, "Received an unexpected URL from the web process: '%s'\n", url.string().utf8().data()); return false; } @@ -368,9 +378,7 @@ void WebProcessProxy::didClose(CoreIPC::Connection*) void WebProcessProxy::didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID) { - // This fprintf is intentionally left because this function should - // only be hit in the case of a misbehaving web process. - fprintf(stderr, "Receive an invalid message from the web process with message ID %x\n", messageID.toInt()); + fprintf(stderr, "Received an invalid message from the web process with message ID %x\n", messageID.toInt()); // Terminate the WebProcesses. terminate(); -- cgit v1.2.1