REGRESSION(r95679): It broke everything.
authorossy@webkit.org <ossy@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Sep 2011 11:50:07 +0000 (11:50 +0000)
committerossy@webkit.org <ossy@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Sep 2011 11:50:07 +0000 (11:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=68611

Unreviewed rolling out r95679 and r95690, because it broke everything.

* UIProcess/API/mac/WKView.mm:
(maybeCreateSandboxExtensionFromPasteboard):
(-[WKView performDragOperation:]):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::didPerformClientRedirect):
(WebKit::WebContext::didPerformServerRedirect):
(WebKit::WebContext::didUpdateHistoryTitle):
(WebKit::WebContext::getPluginPath):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcessWithItem):
(WebKit::WebPageProxy::initializeSandboxExtensionHandle):
(WebKit::WebPageProxy::loadURL):
(WebKit::WebPageProxy::loadURLRequest):
(WebKit::WebPageProxy::loadHTMLString):
(WebKit::WebPageProxy::loadAlternateHTMLString):
(WebKit::WebPageProxy::goForward):
(WebKit::WebPageProxy::goBack):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::didInitiateLoadForResource):
(WebKit::WebPageProxy::didSendRequestForResource):
(WebKit::WebPageProxy::didReceiveResponseForResource):
(WebKit::WebPageProxy::missingPluginButtonClicked):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::WebProcessProxy::addBackForwardItem):
* UIProcess/WebProcessProxy.h:
* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::restoreFromSessionStateData):

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/WebContext.cpp
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebProcessProxy.cpp
Source/WebKit2/UIProcess/WebProcessProxy.h
Source/WebKit2/UIProcess/cf/WebPageProxyCF.cpp

index 8ef0ed0..e582a5c 100644 (file)
@@ -1,3 +1,46 @@
+2011-09-22  Csaba Osztrogonác  <ossy@webkit.org>
+
+        REGRESSION(r95679): It broke everything.
+        https://bugs.webkit.org/show_bug.cgi?id=68611
+
+        Unreviewed rolling out r95679 and r95690, because it broke everything.
+
+        * UIProcess/API/mac/WKView.mm:
+        (maybeCreateSandboxExtensionFromPasteboard):
+        (-[WKView performDragOperation:]):
+        * UIProcess/WebContext.cpp:
+        (WebKit::WebContext::didPerformClientRedirect):
+        (WebKit::WebContext::didPerformServerRedirect):
+        (WebKit::WebContext::didUpdateHistoryTitle):
+        (WebKit::WebContext::getPluginPath):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::reattachToWebProcessWithItem):
+        (WebKit::WebPageProxy::initializeSandboxExtensionHandle):
+        (WebKit::WebPageProxy::loadURL):
+        (WebKit::WebPageProxy::loadURLRequest):
+        (WebKit::WebPageProxy::loadHTMLString):
+        (WebKit::WebPageProxy::loadAlternateHTMLString):
+        (WebKit::WebPageProxy::goForward):
+        (WebKit::WebPageProxy::goBack):
+        (WebKit::WebPageProxy::goToBackForwardItem):
+        (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
+        (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
+        (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
+        (WebKit::WebPageProxy::decidePolicyForNavigationAction):
+        (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
+        (WebKit::WebPageProxy::decidePolicyForResponse):
+        (WebKit::WebPageProxy::didInitiateLoadForResource):
+        (WebKit::WebPageProxy::didSendRequestForResource):
+        (WebKit::WebPageProxy::didReceiveResponseForResource):
+        (WebKit::WebPageProxy::missingPluginButtonClicked):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::WebProcessProxy):
+        (WebKit::WebProcessProxy::addBackForwardItem):
+        * UIProcess/WebProcessProxy.h:
+        * UIProcess/cf/WebPageProxyCF.cpp:
+        (WebKit::WebPageProxy::restoreFromSessionStateData):
+
 2011-09-21  Alexey Proskuryakov  <ap@apple.com>
 
         [WK2] UIProcess should check that WebProcess isn't sending unexpected file: URLs to it
index 0b88d32..77aa7d0 100644 (file)
@@ -1660,26 +1660,25 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
 
 // FIXME: This code is more or less copied from Pasteboard::getBestURL.
 // It would be nice to be able to share the code somehow.
-static bool maybeCreateSandboxExtensionFromPasteboard(NSPasteboard *pasteboard, SandboxExtension::Handle& sandboxExtensionHandle)
+static void maybeCreateSandboxExtensionFromPasteboard(NSPasteboard *pasteboard, SandboxExtension::Handle& sandboxExtensionHandle)
 {
     NSArray *types = [pasteboard types];
     if (![types containsObject:NSFilenamesPboardType])
-        return false;
+        return;
 
     NSArray *files = [pasteboard propertyListForType:NSFilenamesPboardType];
     if ([files count] != 1)
-        return false;
+        return;
 
     NSString *file = [files objectAtIndex:0];
     BOOL isDirectory;
     if (![[NSFileManager defaultManager] fileExistsAtPath:file isDirectory:&isDirectory])
-        return false;
+        return;
 
     if (isDirectory)
-        return false;
+        return;
 
     SandboxExtension::createHandle("/", SandboxExtension::ReadOnly, sandboxExtensionHandle);
-    return true;
 }
 
 - (BOOL)performDragOperation:(id <NSDraggingInfo>)draggingInfo
@@ -1689,9 +1688,7 @@ static bool maybeCreateSandboxExtensionFromPasteboard(NSPasteboard *pasteboard,
     DragData dragData(draggingInfo, client, global, static_cast<DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]);
 
     SandboxExtension::Handle sandboxExtensionHandle;
-    bool createdExtension = maybeCreateSandboxExtensionFromPasteboard([draggingInfo draggingPasteboard], sandboxExtensionHandle);
-    if (createdExtension)
-        _data->_page->process()->willAcquireUniversalFileReadSandboxExtension();
+    maybeCreateSandboxExtensionFromPasteboard([draggingInfo draggingPasteboard], sandboxExtensionHandle);
 
     _data->_page->performDrag(&dragData, [[draggingInfo draggingPasteboard] name], sandboxExtensionHandle);
 
index 1289c32..16fc9d7 100644 (file)
@@ -65,8 +65,7 @@
 #include <wtf/RefCountedLeakCounter.h>
 #endif
 
-#define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, m_process->connection())
-#define MESSAGE_CHECK_URL(url) MESSAGE_CHECK_BASE(m_process->checkURLReceivedFromWebProcess(url), m_process->connection())
+#define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, process()->connection())
 
 using namespace WebCore;
 
@@ -440,9 +439,7 @@ void WebContext::didPerformClientRedirect(uint64_t pageID, const String& sourceU
     WebFrameProxy* frame = m_process->webFrame(frameID);
     MESSAGE_CHECK(frame);
     MESSAGE_CHECK(frame->page() == page);
-    MESSAGE_CHECK_URL(sourceURLString);
-    MESSAGE_CHECK_URL(destinationURLString);
-
+    
     m_historyClient.didPerformClientRedirect(this, page, sourceURLString, destinationURLString, frame);
 }
 
@@ -458,9 +455,7 @@ void WebContext::didPerformServerRedirect(uint64_t pageID, const String& sourceU
     WebFrameProxy* frame = m_process->webFrame(frameID);
     MESSAGE_CHECK(frame);
     MESSAGE_CHECK(frame->page() == page);
-    MESSAGE_CHECK_URL(sourceURLString);
-    MESSAGE_CHECK_URL(destinationURLString);
-
+    
     m_historyClient.didPerformServerRedirect(this, page, sourceURLString, destinationURLString, frame);
 }
 
@@ -473,7 +468,6 @@ void WebContext::didUpdateHistoryTitle(uint64_t pageID, const String& title, con
     WebFrameProxy* frame = m_process->webFrame(frameID);
     MESSAGE_CHECK(frame);
     MESSAGE_CHECK(frame->page() == page);
-    MESSAGE_CHECK_URL(url);
 
     m_historyClient.didUpdateHistoryTitle(this, page, title, url, frame);
 }
@@ -559,11 +553,9 @@ void WebContext::getPlugins(bool refresh, Vector<PluginInfo>& pluginInfos)
 
 void WebContext::getPluginPath(const String& mimeType, const String& urlString, String& pluginPath)
 {
-    MESSAGE_CHECK_URL(urlString);
-
     String newMimeType = mimeType.lower();
 
-    PluginModuleInfo plugin = pluginInfoStore().findPlugin(newMimeType, KURL(KURL(), urlString));
+    PluginModuleInfo plugin = pluginInfoStore().findPlugin(newMimeType, KURL(ParsedURLString, urlString));
     if (!plugin.path)
         return;
 
index 7d8d4c2..0acb684 100644 (file)
@@ -90,8 +90,7 @@
 // This controls what strategy we use for mouse wheel coalescing.
 #define MERGE_WHEEL_EVENTS 1
 
-#define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, m_process->connection())
-#define MESSAGE_CHECK_URL(url) MESSAGE_CHECK_BASE(m_process->checkURLReceivedFromWebProcess(url), m_process->connection())
+#define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, process()->connection())
 
 using namespace WebCore;
 
@@ -297,9 +296,7 @@ void WebPageProxy::reattachToWebProcessWithItem(WebBackForwardListItem* item)
         return;
 
     SandboxExtension::Handle sandboxExtensionHandle;
-    bool createdExtension = maybeInitializeSandboxExtensionHandle(KURL(KURL(), item->url()), sandboxExtensionHandle);
-    if (createdExtension)
-        process()->willAcquireUniversalFileReadSandboxExtension();
+    initializeSandboxExtensionHandle(KURL(KURL(), item->url()), sandboxExtensionHandle);
     process()->send(Messages::WebPage::GoToBackForwardItem(item->itemID(), sandboxExtensionHandle), m_pageID);
     process()->responsivenessTimer()->start();
 }
@@ -399,17 +396,16 @@ bool WebPageProxy::tryClose()
     return false;
 }
 
-bool WebPageProxy::maybeInitializeSandboxExtensionHandle(const KURL& url, SandboxExtension::Handle& sandboxExtensionHandle)
+void WebPageProxy::initializeSandboxExtensionHandle(const KURL& url, SandboxExtension::Handle& sandboxExtensionHandle)
 {
     if (!url.isLocalFile())
-        return false;
+        return;
 
     // Don't give the inspector full access to the file system.
     if (WebInspectorProxy::isInspectorPage(this))
-        return false;
+        return;
 
     SandboxExtension::createHandle("/", SandboxExtension::ReadOnly, sandboxExtensionHandle);
-    return true;
 }
 
 void WebPageProxy::loadURL(const String& url)
@@ -420,9 +416,7 @@ void WebPageProxy::loadURL(const String& url)
         reattachToWebProcess();
 
     SandboxExtension::Handle sandboxExtensionHandle;
-    bool createdExtension = maybeInitializeSandboxExtensionHandle(KURL(KURL(), url), sandboxExtensionHandle);
-    if (createdExtension)
-        process()->willAcquireUniversalFileReadSandboxExtension();
+    initializeSandboxExtensionHandle(KURL(KURL(), url), sandboxExtensionHandle);
     process()->send(Messages::WebPage::LoadURL(url, sandboxExtensionHandle), m_pageID);
     process()->responsivenessTimer()->start();
 }
@@ -435,9 +429,7 @@ void WebPageProxy::loadURLRequest(WebURLRequest* urlRequest)
         reattachToWebProcess();
 
     SandboxExtension::Handle sandboxExtensionHandle;
-    bool createdExtension = maybeInitializeSandboxExtensionHandle(urlRequest->resourceRequest().url(), sandboxExtensionHandle);
-    if (createdExtension)
-        process()->willAcquireUniversalFileReadSandboxExtension();
+    initializeSandboxExtensionHandle(urlRequest->resourceRequest().url(), sandboxExtensionHandle);
     process()->send(Messages::WebPage::LoadURLRequest(urlRequest->resourceRequest(), sandboxExtensionHandle), m_pageID);
     process()->responsivenessTimer()->start();
 }
@@ -447,7 +439,6 @@ void WebPageProxy::loadHTMLString(const String& htmlString, const String& baseUR
     if (!isValid())
         reattachToWebProcess();
 
-    process()->willLoadHTMLStringWithBaseURL(baseURL);
     process()->send(Messages::WebPage::LoadHTMLString(htmlString, baseURL), m_pageID);
     process()->responsivenessTimer()->start();
 }
@@ -460,7 +451,6 @@ void WebPageProxy::loadAlternateHTMLString(const String& htmlString, const Strin
     if (m_mainFrame)
         m_mainFrame->setUnreachableURL(unreachableURL);
 
-    process()->willLoadHTMLStringWithBaseURL(baseURL);
     process()->send(Messages::WebPage::LoadAlternateHTMLString(htmlString, baseURL, unreachableURL), m_pageID);
     process()->responsivenessTimer()->start();
 }
@@ -512,9 +502,7 @@ void WebPageProxy::goForward()
     }
 
     SandboxExtension::Handle sandboxExtensionHandle;
-    bool createdExtension = maybeInitializeSandboxExtensionHandle(KURL(KURL(), forwardItem->url()), sandboxExtensionHandle);
-    if (createdExtension)
-        process()->willAcquireUniversalFileReadSandboxExtension();
+    initializeSandboxExtensionHandle(KURL(KURL(), forwardItem->url()), sandboxExtensionHandle);
     process()->send(Messages::WebPage::GoForward(forwardItem->itemID(), sandboxExtensionHandle), m_pageID);
     process()->responsivenessTimer()->start();
 }
@@ -539,9 +527,7 @@ void WebPageProxy::goBack()
     }
 
     SandboxExtension::Handle sandboxExtensionHandle;
-    bool createdExtension = maybeInitializeSandboxExtensionHandle(KURL(KURL(), backItem->url()), sandboxExtensionHandle);
-    if (createdExtension)
-        process()->willAcquireUniversalFileReadSandboxExtension();
+    initializeSandboxExtensionHandle(KURL(KURL(), backItem->url()), sandboxExtensionHandle);
     process()->send(Messages::WebPage::GoBack(backItem->itemID(), sandboxExtensionHandle), m_pageID);
     process()->responsivenessTimer()->start();
 }
@@ -561,9 +547,7 @@ void WebPageProxy::goToBackForwardItem(WebBackForwardListItem* item)
     setPendingAPIRequestURL(item->url());
 
     SandboxExtension::Handle sandboxExtensionHandle;
-    bool createdExtension = maybeInitializeSandboxExtensionHandle(KURL(KURL(), item->url()), sandboxExtensionHandle);
-    if (createdExtension)
-        process()->willAcquireUniversalFileReadSandboxExtension();
+    initializeSandboxExtensionHandle(KURL(KURL(), item->url()), sandboxExtensionHandle);
     process()->send(Messages::WebPage::GoToBackForwardItem(item->itemID(), sandboxExtensionHandle), m_pageID);
     process()->responsivenessTimer()->start();
 }
@@ -1540,7 +1524,6 @@ void WebPageProxy::didStartProvisionalLoadForFrame(uint64_t frameID, const Strin
 
     WebFrameProxy* frame = process()->webFrame(frameID);
     MESSAGE_CHECK(frame);
-    MESSAGE_CHECK_URL(url);
 
     frame->setUnreachableURL(unreachableURL);
 
@@ -1557,7 +1540,6 @@ void WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t f
 
     WebFrameProxy* frame = process()->webFrame(frameID);
     MESSAGE_CHECK(frame);
-    MESSAGE_CHECK_URL(url);
 
     frame->didReceiveServerRedirectForProvisionalLoad(url);
 
@@ -1679,7 +1661,6 @@ void WebPageProxy::didSameDocumentNavigationForFrame(uint64_t frameID, uint32_t
 
     WebFrameProxy* frame = process()->webFrame(frameID);
     MESSAGE_CHECK(frame);
-    MESSAGE_CHECK_URL(url);
 
     clearPendingAPIRequestURL();
     frame->didSameDocumentNavigation(url);
@@ -1792,7 +1773,6 @@ void WebPageProxy::decidePolicyForNavigationAction(uint64_t frameID, uint32_t op
 
     WebFrameProxy* frame = process()->webFrame(frameID);
     MESSAGE_CHECK(frame);
-    MESSAGE_CHECK_URL(request.url());
 
     NavigationType navigationType = static_cast<NavigationType>(opaqueNavigationType);
     WebEvent::Modifiers modifiers = static_cast<WebEvent::Modifiers>(opaqueModifiers);
@@ -1827,7 +1807,6 @@ void WebPageProxy::decidePolicyForNewWindowAction(uint64_t frameID, uint32_t opa
 
     WebFrameProxy* frame = process()->webFrame(frameID);
     MESSAGE_CHECK(frame);
-    MESSAGE_CHECK_URL(request.url());
 
     NavigationType navigationType = static_cast<NavigationType>(opaqueNavigationType);
     WebEvent::Modifiers modifiers = static_cast<WebEvent::Modifiers>(opaqueModifiers);
@@ -1847,9 +1826,7 @@ void WebPageProxy::decidePolicyForResponse(uint64_t frameID, const ResourceRespo
 
     WebFrameProxy* frame = process()->webFrame(frameID);
     MESSAGE_CHECK(frame);
-    MESSAGE_CHECK_URL(request.url());
-    MESSAGE_CHECK_URL(response.url());
-    
+
     RefPtr<WebFramePolicyListenerProxy> listener = frame->setUpPolicyListenerProxy(listenerID);
 
     ASSERT(!m_inDecidePolicyForMIMEType);
@@ -1909,7 +1886,6 @@ void WebPageProxy::didInitiateLoadForResource(uint64_t frameID, uint64_t resourc
 {
     WebFrameProxy* frame = process()->webFrame(frameID);
     MESSAGE_CHECK(frame);
-    MESSAGE_CHECK_URL(request.url());
 
     m_resourceLoadClient.didInitiateLoadForResource(this, frame, resourceIdentifier, request, pageIsProvisionallyLoading);
 }
@@ -1918,7 +1894,6 @@ void WebPageProxy::didSendRequestForResource(uint64_t frameID, uint64_t resource
 {
     WebFrameProxy* frame = process()->webFrame(frameID);
     MESSAGE_CHECK(frame);
-    MESSAGE_CHECK_URL(request.url());
 
     m_resourceLoadClient.didSendRequestForResource(this, frame, resourceIdentifier, request, redirectResponse);
 }
@@ -1927,7 +1902,6 @@ void WebPageProxy::didReceiveResponseForResource(uint64_t frameID, uint64_t reso
 {
     WebFrameProxy* frame = process()->webFrame(frameID);
     MESSAGE_CHECK(frame);
-    MESSAGE_CHECK_URL(response.url());
 
     m_resourceLoadClient.didReceiveResponseForResource(this, frame, resourceIdentifier, response);
 }
@@ -2042,9 +2016,6 @@ void WebPageProxy::mouseDidMoveOverElement(const WebHitTestResult::Data& hitTest
 
 void WebPageProxy::missingPluginButtonClicked(const String& mimeType, const String& url, const String& pluginsPageURL)
 {
-    MESSAGE_CHECK_URL(url);
-    MESSAGE_CHECK_URL(pluginsPageURL);
-
     m_uiClient.missingPluginButtonClicked(this, mimeType, url, pluginsPageURL);
 }
 
index 2a9ccb7..b0ab796 100644 (file)
@@ -774,7 +774,7 @@ private:
     void clearPendingAPIRequestURL() { m_pendingAPIRequestURL = String(); }
     void setPendingAPIRequestURL(const String& pendingAPIRequestURL) { m_pendingAPIRequestURL = pendingAPIRequestURL; }
 
-    bool maybeInitializeSandboxExtensionHandle(const WebCore::KURL&, SandboxExtension::Handle&);
+    void initializeSandboxExtensionHandle(const WebCore::KURL&, SandboxExtension::Handle&);
 
 #if PLATFORM(MAC)
     void substitutionsPanelIsShowing(bool&);
index 4fdfdd9..a8dfae0 100644 (file)
@@ -45,8 +45,6 @@
 using namespace WebCore;
 using namespace std;
 
-#define MESSAGE_CHECK_URL(url) MESSAGE_CHECK_BASE(checkURLReceivedFromWebProcess(url), connection())
-
 namespace WebKit {
 
 template<typename HashMap>
@@ -69,7 +67,6 @@ PassRefPtr<WebProcessProxy> WebProcessProxy::create(PassRefPtr<WebContext> conte
 WebProcessProxy::WebProcessProxy(PassRefPtr<WebContext> context)
     : m_responsivenessTimer(this)
     , m_context(context)
-    , m_mayHaveUniversalFileReadSandboxExtension(false)
 {
     connect();
 }
@@ -203,59 +200,8 @@ void WebProcessProxy::registerNewWebBackForwardListItem(WebBackForwardListItem*
     m_backForwardListItemMap.set(item->itemID(), item);
 }
 
-void WebProcessProxy::willLoadHTMLStringWithBaseURL(const String& urlString)
-{
-    KURL url(KURL(), urlString);
-    if (!url.isLocalFile())
-        return;
-
-    // Client loads an alternate string. This doesn't grant universal file read, but the web process is assumed
-    // to have read access to this directory already.
-    m_localPathsWithAssumedReadAccess.add(url.fileSystemPath());
-}
-
-bool WebProcessProxy::checkURLReceivedFromWebProcess(const String& urlString)
-{
-    if (urlString.isEmpty())
-        return true;
-
-    return checkURLReceivedFromWebProcess(KURL(KURL(), urlString));
-}
-
-bool WebProcessProxy::checkURLReceivedFromWebProcess(const KURL& url)
-{
-    if (url.isNull())
-        return true;
-
-    // Web process should not be sending us invalid URLs.
-    if (!url.isValid())
-        return false;
-
-    // Any other non-file URL is OK.
-    if (!url.isLocalFile())
-        return true;
-
-    // Any file URL is also OK if we've loaded a file URL through API before, granting universal read access.
-    if (m_mayHaveUniversalFileReadSandboxExtension)
-        return true;
-
-    // If we loaded a string with a file base URL before, loading resources from that subdirectory is fine.
-    // There are no ".." components, because all URLs received from WebProcess are parsed with KURL, which removes those.
-    String path = url.fileSystemPath();
-    for (HashSet<String>::const_iterator iter = m_localPathsWithAssumedReadAccess.begin(); iter != m_localPathsWithAssumedReadAccess.end(); ++iter) {
-        if (path.startsWith(*iter))
-            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.
-    return false;
-}
-
 void WebProcessProxy::addBackForwardItem(uint64_t itemID, const String& originalURL, const String& url, const String& title, const CoreIPC::DataReference& backForwardData)
 {
-    MESSAGE_CHECK_URL(originalURL);
-    MESSAGE_CHECK_URL(url);
-
     std::pair<WebBackForwardListItemMap::iterator, bool> result = m_backForwardListItemMap.add(itemID, 0);
     if (result.second) {
         // New item.
index 2a5b075..0e99494 100644 (file)
@@ -104,12 +104,6 @@ public:
 
     void registerNewWebBackForwardListItem(WebBackForwardListItem*);
 
-    void willAcquireUniversalFileReadSandboxExtension() { m_mayHaveUniversalFileReadSandboxExtension = true; }
-    void willLoadHTMLStringWithBaseURL(const String&);
-
-    bool checkURLReceivedFromWebProcess(const String&);
-    bool checkURLReceivedFromWebProcess(const WebCore::KURL&);
-
     // FIXME: This variant of send is deprecated. All clients should move to an overload that take a message type.
     template<typename E, typename T> bool deprecatedSend(E messageID, uint64_t destinationID, const T& arguments);
 
@@ -181,9 +175,6 @@ private:
 
     RefPtr<WebContext> m_context;
 
-    bool m_mayHaveUniversalFileReadSandboxExtension; // True if a read extension for "/" was ever granted - we don't track whether WebProcess still has it.
-    HashSet<String> m_localPathsWithAssumedReadAccess;
-
     HashMap<uint64_t, WebPageProxy*> m_pageMap;
     WebFrameProxyMap m_frameMap;
     WebBackForwardListItemMap m_backForwardListItemMap;
index 41fd01b..d3acc55 100644 (file)
@@ -166,9 +166,7 @@ void WebPageProxy::restoreFromSessionStateData(WebData* webData)
                 else {
                     SandboxExtension::Handle sandboxExtensionHandle;
                     if (WebBackForwardListItem* item = m_backForwardList->currentItem()) {
-                        bool createdExtension = maybeInitializeSandboxExtensionHandle(KURL(KURL(), item->url()), sandboxExtensionHandle);
-                        if (createdExtension)
-                            process()->willAcquireUniversalFileReadSandboxExtension();
+                        initializeSandboxExtensionHandle(KURL(KURL(), item->url()), sandboxExtensionHandle);
                         setPendingAPIRequestURL(item->url());
                     }