Title: [164877] trunk
- Revision
- 164877
- Author
- ander...@apple.com
- Date
- 2014-02-28 11:32:11 -0800 (Fri, 28 Feb 2014)
Log Message
Source/WebKit2: VisitedLinkProvider should keep track of processes, not pages
https://bugs.webkit.org/show_bug.cgi?id=129497
Reviewed by Dan Bernstein.
Use a counted set of WebProcessProxy pointers instead of a set of pages.
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::~VisitedLinkProvider):
Assert that m_processes is null.
(WebKit::VisitedLinkProvider::addProcess):
Add the process to the set.
(WebKit::VisitedLinkProvider::removeProcess):
Remove the process from the set.
* UIProcess/VisitedLinkProvider.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
If our process is currently running, add it to the visited link provider.
Otherwise it will be added in connectionWillOpen.
(WebKit::WebPageProxy::close):
If our process is running, remove it from the visited link provider.
Otherwise it's either crashed or not yet launched and will not have been added.
(WebKit::WebPageProxy::connectionWillOpen):
Add the process to the visited link provider.
(WebKit::WebPageProxy::resetStateAfterProcessExited):
Remove the process from the visited link provider.
Tools: Remove logging.
Reviewed by Dan Bernstein.
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController browsingContextController:decidePolicyForNavigationAction:decisionHandler:]):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (164876 => 164877)
--- trunk/Source/WebKit2/ChangeLog 2014-02-28 19:19:03 UTC (rev 164876)
+++ trunk/Source/WebKit2/ChangeLog 2014-02-28 19:32:11 UTC (rev 164877)
@@ -1,3 +1,39 @@
+2014-02-28 Anders Carlsson <ander...@apple.com>
+
+ VisitedLinkProvider should keep track of processes, not pages
+ https://bugs.webkit.org/show_bug.cgi?id=129497
+
+ Reviewed by Dan Bernstein.
+
+ Use a counted set of WebProcessProxy pointers instead of a set of pages.
+
+ * UIProcess/VisitedLinkProvider.cpp:
+ (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
+ Assert that m_processes is null.
+
+ (WebKit::VisitedLinkProvider::addProcess):
+ Add the process to the set.
+
+ (WebKit::VisitedLinkProvider::removeProcess):
+ Remove the process from the set.
+
+ * UIProcess/VisitedLinkProvider.h:
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::WebPageProxy):
+ If our process is currently running, add it to the visited link provider.
+ Otherwise it will be added in connectionWillOpen.
+
+ (WebKit::WebPageProxy::close):
+ If our process is running, remove it from the visited link provider.
+ Otherwise it's either crashed or not yet launched and will not have been added.
+
+ (WebKit::WebPageProxy::connectionWillOpen):
+ Add the process to the visited link provider.
+
+ (WebKit::WebPageProxy::resetStateAfterProcessExited):
+ Remove the process from the visited link provider.
+
2014-02-27 Alexey Proskuryakov <a...@apple.com>
[Mac] Stop using some deprecated functions in WKView.mm
Modified: trunk/Source/WebKit2/UIProcess/VisitedLinkProvider.cpp (164876 => 164877)
--- trunk/Source/WebKit2/UIProcess/VisitedLinkProvider.cpp 2014-02-28 19:19:03 UTC (rev 164876)
+++ trunk/Source/WebKit2/UIProcess/VisitedLinkProvider.cpp 2014-02-28 19:32:11 UTC (rev 164877)
@@ -51,7 +51,7 @@
VisitedLinkProvider::~VisitedLinkProvider()
{
- ASSERT(m_pages.isEmpty());
+ ASSERT(m_processes.isEmpty());
}
VisitedLinkProvider::VisitedLinkProvider()
@@ -62,16 +62,18 @@
{
}
-void VisitedLinkProvider::addPage(WebPageProxy& webPageProxy)
+void VisitedLinkProvider::addProcess(WebProcessProxy& process)
{
- ASSERT(!m_pages.contains(&webPageProxy));
- m_pages.add(&webPageProxy);
+ ASSERT(process.state() == WebProcessProxy::State::Running);
+
+ m_processes.add(&process);
}
-void VisitedLinkProvider::removePage(WebPageProxy& webPageProxy)
+void VisitedLinkProvider::removeProcess(WebProcessProxy& process)
{
- ASSERT(m_pages.contains(&webPageProxy));
- m_pages.remove(&webPageProxy);
+ ASSERT(m_processes.contains(&process));
+
+ m_processes.remove(&process);
}
void VisitedLinkProvider::processDidFinishLaunching(WebProcessProxy* process)
Modified: trunk/Source/WebKit2/UIProcess/VisitedLinkProvider.h (164876 => 164877)
--- trunk/Source/WebKit2/UIProcess/VisitedLinkProvider.h 2014-02-28 19:19:03 UTC (rev 164876)
+++ trunk/Source/WebKit2/UIProcess/VisitedLinkProvider.h 2014-02-28 19:32:11 UTC (rev 164877)
@@ -29,6 +29,7 @@
#include "VisitedLinkTable.h"
#include <WebCore/LinkHash.h>
#include <wtf/Forward.h>
+#include <wtf/HashCountedSet.h>
#include <wtf/HashSet.h>
#include <wtf/RefCounted.h>
#include <wtf/RunLoop.h>
@@ -46,8 +47,8 @@
uint64_t identifier() const { return m_identifier; }
- void addPage(WebPageProxy&);
- void removePage(WebPageProxy&);
+ void addProcess(WebProcessProxy&);
+ void removeProcess(WebProcessProxy&);
void addVisitedLink(WebCore::LinkHash);
@@ -59,11 +60,12 @@
void pendingVisitedLinksTimerFired();
+ HashCountedSet<WebProcessProxy*> m_processes;
+
HashSet<WebProcessProxy*> m_processesWithVisitedLinkState;
HashSet<WebProcessProxy*> m_processesWithoutVisitedLinkState;
uint64_t m_identifier;
- HashSet<WebPageProxy*> m_pages;
unsigned m_keyCount;
unsigned m_tableSize;
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (164876 => 164877)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2014-02-28 19:19:03 UTC (rev 164876)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2014-02-28 19:32:11 UTC (rev 164877)
@@ -336,7 +336,8 @@
, m_scrollPinningBehavior(DoNotPin)
, m_navigationID(0)
{
- m_visitedLinkProvider->addPage(*this);
+ if (m_process->state() == WebProcessProxy::State::Running)
+ m_visitedLinkProvider->addProcess(m_process.get());
updateViewState();
@@ -575,7 +576,8 @@
m_isClosed = true;
- m_visitedLinkProvider->removePage(*this);
+ if (m_process->state() == WebProcessProxy::State::Running)
+ m_visitedLinkProvider->removeProcess(m_process.get());
m_backForwardList->pageClosed();
m_pageClient.pageClosed();
@@ -2696,6 +2698,8 @@
{
ASSERT(connection == m_process->connection());
+ m_visitedLinkProvider->addProcess(m_process.get());
+
m_process->context().storageManager().setAllowedSessionStorageNamespaceConnection(m_pageID, connection);
}
@@ -3908,6 +3912,8 @@
if (!isValid())
return;
+ m_visitedLinkProvider->removeProcess(m_process.get());
+
m_process->removeMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_pageID);
m_isValid = false;
Modified: trunk/Tools/ChangeLog (164876 => 164877)
--- trunk/Tools/ChangeLog 2014-02-28 19:19:03 UTC (rev 164876)
+++ trunk/Tools/ChangeLog 2014-02-28 19:32:11 UTC (rev 164877)
@@ -1,3 +1,12 @@
+2014-02-28 Anders Carlsson <ander...@apple.com>
+
+ Remove logging.
+
+ Reviewed by Dan Bernstein.
+
+ * MiniBrowser/mac/WK2BrowserWindowController.m:
+ (-[WK2BrowserWindowController browsingContextController:decidePolicyForNavigationAction:decisionHandler:]):
+
2014-02-28 Daniel Bates <daba...@apple.com>
[iOS] DumpRenderTree Perl Support may build against wrong SDK and toolchain
Modified: trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m (164876 => 164877)
--- trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m 2014-02-28 19:19:03 UTC (rev 164876)
+++ trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m 2014-02-28 19:32:11 UTC (rev 164877)
@@ -673,7 +673,6 @@
- (void)browsingContextController:(WKBrowsingContextController *)browsingContext decidePolicyForNavigationAction:(NSDictionary *)actionInformation decisionHandler:(WKPolicyDecisionHandler)decisionHandler
{
LOG(@"decidePolicyForNavigationAction");
- NSLog(@"action information %@", actionInformation);
decisionHandler(WKPolicyDecisionAllow);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes