Make checkURLReceivedFromWebProcess not rely on details of platform URL implementation.
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Apr 2015 19:53:32 +0000 (19:53 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Apr 2015 19:53:32 +0000 (19:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=143222
rdar://problem/19978997

Reviewed by Sam Weinig.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::checkURLReceivedFromWebProcess):

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebProcessProxy.cpp

index 535beb4..88b2193 100644 (file)
@@ -1,3 +1,14 @@
+2015-04-02  Alexey Proskuryakov  <ap@apple.com>
+
+        Make checkURLReceivedFromWebProcess not rely on details of platform URL implementation.
+        https://bugs.webkit.org/show_bug.cgi?id=143222
+        rdar://problem/19978997
+
+        Reviewed by Sam Weinig.
+
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::checkURLReceivedFromWebProcess):
+
 2015-04-02  Yusuke Suzuki  <utatane.tea@gmail.com>
 
         Clean up EnumerationMode to easily extend
index 3de214e..b5f0869 100644 (file)
@@ -352,9 +352,11 @@ bool WebProcessProxy::checkURLReceivedFromWebProcess(const URL& url)
     // 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.
     String path = url.fileSystemPath();
     for (WebBackForwardListItemMap::iterator iter = m_backForwardListItemMap.begin(), end = m_backForwardListItemMap.end(); iter != end; ++iter) {
-        if (URL(URL(), iter->value->url()).fileSystemPath() == path)
+        URL itemURL(URL(), iter->value->url());
+        if (itemURL.isLocalFile() && itemURL.fileSystemPath() == path)
             return true;
-        if (URL(URL(), iter->value->originalURL()).fileSystemPath() == path)
+        URL itemOriginalURL(URL(), iter->value->originalURL());
+        if (itemOriginalURL.isLocalFile() && itemOriginalURL.fileSystemPath() == path)
             return true;
     }