WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Proposed patch
bug-166972.diff (text/plain), 3.80 KB, created by
Andreas Kling
on 2017-01-12 08:18:20 PST
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Andreas Kling
Created:
2017-01-12 08:18:20 PST
Size:
3.80 KB
patch
obsolete
>diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog >index 2aae540..1d7f14b 100644 >--- a/Source/WebKit2/ChangeLog >+++ b/Source/WebKit2/ChangeLog >@@ -1,3 +1,25 @@ >+2017-01-12 Andreas Kling <akling@apple.com> >+ >+ WebBackForwardListProxy should remove restored session history items from PageCache on close. >+ <https://webkit.org/b/166972> >+ <rdar://problem/28904157> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Register history item ID's from the UIProcess with the associated-items map >+ so that we can remove any PageCache entries associated with them immediately >+ when closing a WebPage. >+ >+ Otherwise they might not get removed until the next PageCache pruning happens. >+ This patch is a speculative fix for what looks like it might be weirdness >+ related to a PageCache entry outliving its originating Page. >+ >+ * WebProcess/WebPage/WebBackForwardListProxy.cpp: >+ (WebKit::WebBackForwardListProxy::addItemFromUIProcess): >+ * WebProcess/WebPage/WebBackForwardListProxy.h: >+ * WebProcess/WebPage/WebPage.cpp: >+ (WebKit::WebPage::restoreSessionInternal): >+ > 2017-01-11 Anders Carlsson <andersca@apple.com> > > navigator.plugins.refresh and WKContextRefreshPlugIns doesn't pick up changes to already-present plug-ins >diff --git a/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp b/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp >index 62115c7..e7dc4c4 100644 >--- a/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp >+++ b/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp >@@ -100,6 +100,8 @@ void WebBackForwardListProxy::addItemFromUIProcess(uint64_t itemID, Ref<HistoryI > ASSERT(!historyItemToIDMap().contains(item.ptr())); > ASSERT(!idToHistoryItemMap().contains(itemID)); > >+ m_associatedItemIDs.add(itemID); >+ > historyItemToIDMap().set<ItemAndPageID>(item.ptr(), { .itemID = itemID, .pageID = pageID }); > idToHistoryItemMap().set(itemID, item.ptr()); > } >diff --git a/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h b/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h >index d9dbaa3..bb786be 100644 >--- a/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h >+++ b/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h >@@ -41,7 +41,7 @@ public: > static uint64_t idForItem(WebCore::HistoryItem*); > static void removeItem(uint64_t itemID); > >- static void addItemFromUIProcess(uint64_t itemID, Ref<WebCore::HistoryItem>&&, uint64_t pageID); >+ void addItemFromUIProcess(uint64_t itemID, Ref<WebCore::HistoryItem>&&, uint64_t pageID); > static void setHighestItemIDFromUIProcess(uint64_t itemID); > > void clear(); >diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp >index d17a7fc..b72cb35 100644 >--- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp >+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp >@@ -115,6 +115,7 @@ > #include <JavaScriptCore/APICast.h> > #include <WebCore/ApplicationCacheStorage.h> > #include <WebCore/ArchiveResource.h> >+#include <WebCore/BackForwardController.h> > #include <WebCore/Chrome.h> > #include <WebCore/CommonVM.h> > #include <WebCore/ContextMenuController.h> >@@ -2330,7 +2331,7 @@ void WebPage::restoreSessionInternal(const Vector<BackForwardListItemState>& ite > for (const auto& itemState : itemStates) { > auto historyItem = toHistoryItem(itemState.pageState); > historyItem->setWasRestoredFromSession(restoredByAPIRequest == WasRestoredByAPIRequest::Yes); >- WebBackForwardListProxy::addItemFromUIProcess(itemState.identifier, WTFMove(historyItem), m_pageID); >+ static_cast<WebBackForwardListProxy*>(corePage()->backForward().client())->addItemFromUIProcess(itemState.identifier, WTFMove(historyItem), m_pageID); > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 166972
: 298683