Title: [114278] trunk/Source
- Revision
- 114278
- Author
- beid...@apple.com
- Date
- 2012-04-16 11:01:30 -0700 (Mon, 16 Apr 2012)
Log Message
<rdar://problem/11249336> and https://bugs.webkit.org/show_bug.cgi?id=84050 WebKit2 back/forward items in the page cache are never removed when the page is closed
Reviewed by Jessie Berlin and unofficially reviewed by Jon Lee.
Source/WebCore:
* WebCore.exp.in: Export PageCache::remove()
Source/WebKit2:
Individual WebBackForwardListProxy's had no idea which items are associated with them.
This adds that association and makes sure the proxy removes all associated items from the PageCache when it closes.
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::removeItem): Remove the item from the PageCache in case it was in it.
(WebKit::WebBackForwardListProxy::addItem): Add the item ID to this back/forward list's set of associated IDs.
(WebKit::WebBackForwardListProxy::close): Remove each associated item from the PageCache.
* WebProcess/WebPage/WebBackForwardListProxy.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (114277 => 114278)
--- trunk/Source/WebCore/ChangeLog 2012-04-16 17:55:16 UTC (rev 114277)
+++ trunk/Source/WebCore/ChangeLog 2012-04-16 18:01:30 UTC (rev 114278)
@@ -1,3 +1,12 @@
+2012-04-16 Brady Eidson <beid...@apple.com>
+
+ <rdar://problem/11249336> and https://bugs.webkit.org/show_bug.cgi?id=84050
+ WebKit2 back/forward items in the page cache are never removed when the page is closed
+
+ Reviewed by Jessie Berlin and unofficially reviewed by Jon Lee.
+
+ * WebCore.exp.in: Export PageCache::remove()
+
2012-04-16 Philippe Normand <pnorm...@igalia.com>
Unreviewed, GTK build fix after r114269.
Modified: trunk/Source/WebCore/WebCore.exp.in (114277 => 114278)
--- trunk/Source/WebCore/WebCore.exp.in 2012-04-16 17:55:16 UTC (rev 114277)
+++ trunk/Source/WebCore/WebCore.exp.in 2012-04-16 18:01:30 UTC (rev 114278)
@@ -1139,6 +1139,7 @@
__ZN7WebCore9PageCache11setCapacityEi
__ZN7WebCore9PageCache27releaseAutoreleasedPagesNowEv
__ZN7WebCore9PageCache33markPagesForVistedLinkStyleRecalcEv
+__ZN7WebCore9PageCache6removeEPNS_11HistoryItemE
__ZN7WebCore9PageGroup13isLinkVisitedEy
__ZN7WebCore9PageGroup14addVisitedLinkEPKtm
__ZN7WebCore9PageGroup17closeLocalStorageEv
Modified: trunk/Source/WebKit2/ChangeLog (114277 => 114278)
--- trunk/Source/WebKit2/ChangeLog 2012-04-16 17:55:16 UTC (rev 114277)
+++ trunk/Source/WebKit2/ChangeLog 2012-04-16 18:01:30 UTC (rev 114278)
@@ -1,3 +1,19 @@
+2012-04-16 Brady Eidson <beid...@apple.com>
+
+ <rdar://problem/11249336> and https://bugs.webkit.org/show_bug.cgi?id=84050
+ WebKit2 back/forward items in the page cache are never removed when the page is closed
+
+ Reviewed by Jessie Berlin and unofficially reviewed by Jon Lee.
+
+ Individual WebBackForwardListProxy's had no idea which items are associated with them.
+ This adds that association and makes sure the proxy removes all associated items from the PageCache when it closes.
+
+ * WebProcess/WebPage/WebBackForwardListProxy.cpp:
+ (WebKit::WebBackForwardListProxy::removeItem): Remove the item from the PageCache in case it was in it.
+ (WebKit::WebBackForwardListProxy::addItem): Add the item ID to this back/forward list's set of associated IDs.
+ (WebKit::WebBackForwardListProxy::close): Remove each associated item from the PageCache.
+ * WebProcess/WebPage/WebBackForwardListProxy.h:
+
2012-04-16 Michał Pakuła vel Rutka <m.pak...@samsung.com>
[EFL][WK2] Fix build break in PageClientImpl.cpp.
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp (114277 => 114278)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp 2012-04-16 17:55:16 UTC (rev 114277)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp 2012-04-16 18:01:30 UTC (rev 114278)
@@ -34,6 +34,7 @@
#include "WebProcess.h"
#include "WebProcessProxyMessages.h"
#include <WebCore/HistoryItem.h>
+#include <WebCore/PageCache.h>
#include <wtf/HashMap.h>
using namespace WebCore;
@@ -128,6 +129,9 @@
IDToHistoryItemMap::iterator it = idToHistoryItemMap().find(itemID);
if (it == idToHistoryItemMap().end())
return;
+
+ WebCore::pageCache()->remove(it->second.get());
+
historyItemToIDMap().remove(it->second);
idToHistoryItemMap().remove(it);
}
@@ -151,6 +155,8 @@
ASSERT(!idToHistoryItemMap().contains(itemID));
+ m_associatedItemIDs.add(itemID);
+
historyItemToIDMap().set(item, itemID);
idToHistoryItemMap().set(itemID, item);
@@ -209,6 +215,12 @@
void WebBackForwardListProxy::close()
{
+ HashSet<uint64_t>::iterator end = m_associatedItemIDs.end();
+ for (HashSet<uint64_t>::iterator i = m_associatedItemIDs.begin(); i != end; ++i)
+ WebCore::pageCache()->remove(itemForID(*i));
+
+ m_associatedItemIDs.clear();
+
m_page = 0;
}
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h (114277 => 114278)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h 2012-04-16 17:55:16 UTC (rev 114277)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h 2012-04-16 18:01:30 UTC (rev 114278)
@@ -27,6 +27,7 @@
#define WebBackForwardListProxy_h
#include <WebCore/BackForwardList.h>
+#include <wtf/HashSet.h>
#include <wtf/PassRefPtr.h>
namespace WebKit {
@@ -62,6 +63,7 @@
virtual void close();
WebPage* m_page;
+ HashSet<uint64_t> m_associatedItemIDs;
};
} // namespace WebKit
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes