<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[211710] branches/safari-603-branch/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/211710">211710</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2017-02-05 22:17:32 -0800 (Sun, 05 Feb 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/211569">r211569</a>. rdar://problem/30229990</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari603branchSourceWebCoreChangeLog">branches/safari-603-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari603branchSourceWebCorehistoryCachedPagecpp">branches/safari-603-branch/Source/WebCore/history/CachedPage.cpp</a></li>
<li><a href="#branchessafari603branchSourceWebCorehistoryCachedPageh">branches/safari-603-branch/Source/WebCore/history/CachedPage.h</a></li>
<li><a href="#branchessafari603branchSourceWebCorehistoryPageCachecpp">branches/safari-603-branch/Source/WebCore/history/PageCache.cpp</a></li>
<li><a href="#branchessafari603branchSourceWebCorehistoryPageCacheh">branches/safari-603-branch/Source/WebCore/history/PageCache.h</a></li>
<li><a href="#branchessafari603branchSourceWebCorepagePagecpp">branches/safari-603-branch/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#branchessafari603branchSourceWebKitmacChangeLog">branches/safari-603-branch/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#branchessafari603branchSourceWebKitmacHistoryBackForwardListmm">branches/safari-603-branch/Source/WebKit/mac/History/BackForwardList.mm</a></li>
<li><a href="#branchessafari603branchSourceWebKitwinBackForwardListcpp">branches/safari-603-branch/Source/WebKit/win/BackForwardList.cpp</a></li>
<li><a href="#branchessafari603branchSourceWebKitwinChangeLog">branches/safari-603-branch/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#branchessafari603branchSourceWebKit2ChangeLog">branches/safari-603-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari603branchSourceWebKit2WebProcessWebPageWebBackForwardListProxycpp">branches/safari-603-branch/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp</a></li>
<li><a href="#branchessafari603branchSourceWebKit2WebProcessWebPageWebBackForwardListProxyh">branches/safari-603-branch/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari603branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (211709 => 211710)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/ChangeLog        2017-02-06 06:17:27 UTC (rev 211709)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog        2017-02-06 06:17:32 UTC (rev 211710)
</span><span class="lines">@@ -1,5 +1,44 @@
</span><span class="cx"> 2017-02-05  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r211569. rdar://problem/30229990
+
+    2017-02-02  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+            [Crash] com.apple.WebKit.WebContent at WebKit: WebKit::WebPage::fromCorePage()
+            https://bugs.webkit.org/show_bug.cgi?id=167738
+            &lt;rdar://problem/30229990&gt;
+
+            Reviewed by Andreas Kling.
+
+            Upon destruction of a Page, we destroy the BackForwardClient, which is supposed
+            to keep track of HistoryItems associated to this particular page and remove them
+            from the PageCache. Given the crash trace, the issue seems to be that some
+            HistoryItems associated with the Page sometimes linger in the PageCache *after*
+            the Page has been destroyed, which leads to crashes later on when pruning the
+            PageCache.
+
+            In order to make the process more robust, this patch refactors the code so that
+            the Page is now in charge of removing all its associated HistoryItems from the
+            PageCache instead of relying on the BackForwardClient. Also, instead of having
+            the Page keep track of which HistoryItems are associated with it (which is
+            error prone), we now scan all PageCache entries instead to find which ones are
+            associated with the Page. While this is in theory slower, this is much safer
+            and in practice not an issue because the PageCache usually has 3-5 entries.
+
+            No new tests, could not reproduce.
+
+            * history/CachedPage.cpp:
+            (WebCore::CachedPage::CachedPage):
+            * history/CachedPage.h:
+            (WebCore::CachedPage::page):
+            * history/PageCache.cpp:
+            (WebCore::PageCache::removeAllItemsForPage):
+            * history/PageCache.h:
+            * page/Page.cpp:
+            (WebCore::Page::~Page):
+
+2017-02-05  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r211551. rdar://problem/26685576
</span><span class="cx"> 
</span><span class="cx">     2017-02-02  Yongjun Zhang  &lt;yongjun_zhang@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCorehistoryCachedPagecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/history/CachedPage.cpp (211709 => 211710)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/history/CachedPage.cpp        2017-02-06 06:17:27 UTC (rev 211709)
+++ branches/safari-603-branch/Source/WebCore/history/CachedPage.cpp        2017-02-06 06:17:32 UTC (rev 211710)
</span><span class="lines">@@ -50,7 +50,8 @@
</span><span class="cx"> DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, cachedPageCounter, (&quot;CachedPage&quot;));
</span><span class="cx"> 
</span><span class="cx"> CachedPage::CachedPage(Page&amp; page)
</span><del>-    : m_expirationTime(monotonicallyIncreasingTime() + page.settings().backForwardCacheExpirationInterval())
</del><ins>+    : m_page(page)
+    , m_expirationTime(monotonicallyIncreasingTime() + page.settings().backForwardCacheExpirationInterval())
</ins><span class="cx">     , m_cachedMainFrame(std::make_unique&lt;CachedFrame&gt;(page.mainFrame()))
</span><span class="cx"> {
</span><span class="cx"> #ifndef NDEBUG
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCorehistoryCachedPageh"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/history/CachedPage.h (211709 => 211710)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/history/CachedPage.h        2017-02-06 06:17:27 UTC (rev 211709)
+++ branches/safari-603-branch/Source/WebCore/history/CachedPage.h        2017-02-06 06:17:32 UTC (rev 211710)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx">     void restore(Page&amp;);
</span><span class="cx">     void clear();
</span><span class="cx"> 
</span><ins>+    Page&amp; page() const { return m_page; }
</ins><span class="cx">     Document* document() const { return m_cachedMainFrame-&gt;document(); }
</span><span class="cx">     DocumentLoader* documentLoader() const { return m_cachedMainFrame-&gt;documentLoader(); }
</span><span class="cx"> 
</span><span class="lines">@@ -58,6 +59,7 @@
</span><span class="cx">     void markForContentsSizeChanged() { m_needsUpdateContentsSize = true; }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><ins>+    Page&amp; m_page;
</ins><span class="cx">     double m_expirationTime;
</span><span class="cx">     std::unique_ptr&lt;CachedFrame&gt; m_cachedMainFrame;
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCorehistoryPageCachecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/history/PageCache.cpp (211709 => 211710)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/history/PageCache.cpp        2017-02-06 06:17:27 UTC (rev 211709)
+++ branches/safari-603-branch/Source/WebCore/history/PageCache.cpp        2017-02-06 06:17:32 UTC (rev 211710)
</span><span class="lines">@@ -439,6 +439,19 @@
</span><span class="cx">     return cachedPage;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void PageCache::removeAllItemsForPage(Page&amp; page)
+{
+    for (auto it = m_items.begin(); it != m_items.end();) {
+        // Increment iterator first so it stays invalid after the removal.
+        auto current = it;
+        ++it;
+        if (&amp;(*current)-&gt;m_cachedPage-&gt;page() == &amp;page) {
+            (*current)-&gt;m_cachedPage = nullptr;
+            m_items.remove(current);
+        }
+    }
+}
+
</ins><span class="cx"> CachedPage* PageCache::get(HistoryItem&amp; item, Page* page)
</span><span class="cx"> {
</span><span class="cx">     CachedPage* cachedPage = item.m_cachedPage.get();
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCorehistoryPageCacheh"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/history/PageCache.h (211709 => 211710)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/history/PageCache.h        2017-02-06 06:17:27 UTC (rev 211709)
+++ branches/safari-603-branch/Source/WebCore/history/PageCache.h        2017-02-06 06:17:32 UTC (rev 211710)
</span><span class="lines">@@ -57,6 +57,8 @@
</span><span class="cx">     CachedPage* get(HistoryItem&amp;, Page*);
</span><span class="cx">     std::unique_ptr&lt;CachedPage&gt; take(HistoryItem&amp;, Page*);
</span><span class="cx"> 
</span><ins>+    void removeAllItemsForPage(Page&amp;);
+
</ins><span class="cx">     unsigned pageCount() const { return m_items.size(); }
</span><span class="cx">     WEBCORE_EXPORT unsigned frameCount() const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/page/Page.cpp (211709 => 211710)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/page/Page.cpp        2017-02-06 06:17:27 UTC (rev 211709)
+++ branches/safari-603-branch/Source/WebCore/page/Page.cpp        2017-02-06 06:17:32 UTC (rev 211710)
</span><span class="lines">@@ -318,6 +318,7 @@
</span><span class="cx">         m_scrollingCoordinator-&gt;pageDestroyed();
</span><span class="cx"> 
</span><span class="cx">     backForward().close();
</span><ins>+    PageCache::singleton().removeAllItemsForPage(*this);
</ins><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx">     pageCounter.decrement();
</span></span></pre></div>
<a id="branchessafari603branchSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebKit/mac/ChangeLog (211709 => 211710)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebKit/mac/ChangeLog        2017-02-06 06:17:27 UTC (rev 211709)
+++ branches/safari-603-branch/Source/WebKit/mac/ChangeLog        2017-02-06 06:17:32 UTC (rev 211710)
</span><span class="lines">@@ -1,5 +1,23 @@
</span><span class="cx"> 2017-02-05  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r211569. rdar://problem/30229990
+
+    2017-02-02  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+            [Crash] com.apple.WebKit.WebContent at WebKit: WebKit::WebPage::fromCorePage()
+            https://bugs.webkit.org/show_bug.cgi?id=167738
+            &lt;rdar://problem/30229990&gt;
+
+            Reviewed by Andreas Kling.
+
+            The BackForwardClient no longer needs to worry about removing HistoryItems
+            from the PageCache now that WebCore takes care of it.
+
+            * History/BackForwardList.mm:
+            (BackForwardList::close):
+
+2017-02-05  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r211551. rdar://problem/26685576
</span><span class="cx"> 
</span><span class="cx">     2017-02-02  Yongjun Zhang  &lt;yongjun_zhang@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari603branchSourceWebKitmacHistoryBackForwardListmm"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebKit/mac/History/BackForwardList.mm (211709 => 211710)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebKit/mac/History/BackForwardList.mm        2017-02-06 06:17:27 UTC (rev 211709)
+++ branches/safari-603-branch/Source/WebKit/mac/History/BackForwardList.mm        2017-02-06 06:17:32 UTC (rev 211710)
</span><span class="lines">@@ -225,8 +225,6 @@
</span><span class="cx"> 
</span><span class="cx"> void BackForwardList::close()
</span><span class="cx"> {
</span><del>-    for (auto&amp; item : m_entries)
-        PageCache::singleton().remove(item);
</del><span class="cx">     m_entries.clear();
</span><span class="cx">     m_entryHash.clear();
</span><span class="cx">     m_webView = nullptr;
</span></span></pre></div>
<a id="branchessafari603branchSourceWebKitwinBackForwardListcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebKit/win/BackForwardList.cpp (211709 => 211710)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebKit/win/BackForwardList.cpp        2017-02-06 06:17:27 UTC (rev 211709)
+++ branches/safari-603-branch/Source/WebKit/win/BackForwardList.cpp        2017-02-06 06:17:32 UTC (rev 211710)
</span><span class="lines">@@ -226,8 +226,6 @@
</span><span class="cx"> 
</span><span class="cx"> void BackForwardList::close()
</span><span class="cx"> {
</span><del>-    for (auto&amp; item : m_entries)
-        PageCache::singleton().remove(item);
</del><span class="cx">     m_entries.clear();
</span><span class="cx">     m_entryHash.clear();
</span><span class="cx">     m_closed = true;
</span></span></pre></div>
<a id="branchessafari603branchSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebKit/win/ChangeLog (211709 => 211710)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebKit/win/ChangeLog        2017-02-06 06:17:27 UTC (rev 211709)
+++ branches/safari-603-branch/Source/WebKit/win/ChangeLog        2017-02-06 06:17:32 UTC (rev 211710)
</span><span class="lines">@@ -1,5 +1,23 @@
</span><span class="cx"> 2017-02-05  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r211569. rdar://problem/30229990
+
+    2017-02-02  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+            [Crash] com.apple.WebKit.WebContent at WebKit: WebKit::WebPage::fromCorePage()
+            https://bugs.webkit.org/show_bug.cgi?id=167738
+            &lt;rdar://problem/30229990&gt;
+
+            Reviewed by Andreas Kling.
+
+            The BackForwardClient no longer needs to worry about removing HistoryItems
+            from the PageCache now that WebCore takes care of it.
+
+            * BackForwardList.cpp:
+            (BackForwardList::close):
+
+2017-02-05  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r211584. rdar://problem/29994156
</span><span class="cx"> 
</span><span class="cx">     2017-02-02  Per Arne Vollan  &lt;pvollan@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari603branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebKit2/ChangeLog (211709 => 211710)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebKit2/ChangeLog        2017-02-06 06:17:27 UTC (rev 211709)
+++ branches/safari-603-branch/Source/WebKit2/ChangeLog        2017-02-06 06:17:32 UTC (rev 211710)
</span><span class="lines">@@ -1,5 +1,26 @@
</span><span class="cx"> 2017-02-05  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r211569. rdar://problem/30229990
+
+    2017-02-02  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+            [Crash] com.apple.WebKit.WebContent at WebKit: WebKit::WebPage::fromCorePage()
+            https://bugs.webkit.org/show_bug.cgi?id=167738
+            &lt;rdar://problem/30229990&gt;
+
+            Reviewed by Andreas Kling.
+
+            The BackForwardClient no longer needs to worry about removing HistoryItems
+            from the PageCache now that WebCore takes care of it.
+
+            * WebProcess/WebPage/WebBackForwardListProxy.cpp:
+            (WebKit::WebBackForwardListProxy::addItemFromUIProcess):
+            (WebKit::WebBackForwardListProxy::addItem):
+            (WebKit::WebBackForwardListProxy::close):
+            * WebProcess/WebPage/WebBackForwardListProxy.h:
+
+2017-02-05  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r211565. rdar://problem/28896113
</span><span class="cx"> 
</span><span class="cx">     2017-02-01  Anders Carlsson  &lt;andersca@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari603branchSourceWebKit2WebProcessWebPageWebBackForwardListProxycpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp (211709 => 211710)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp        2017-02-06 06:17:27 UTC (rev 211709)
+++ branches/safari-603-branch/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp        2017-02-06 06:17:32 UTC (rev 211710)
</span><span class="lines">@@ -100,8 +100,6 @@
</span><span class="cx">     ASSERT(!historyItemToIDMap().contains(item.ptr()));
</span><span class="cx">     ASSERT(!idToHistoryItemMap().contains(itemID));
</span><span class="cx"> 
</span><del>-    m_associatedItemIDs.add(itemID);
-
</del><span class="cx">     historyItemToIDMap().set&lt;ItemAndPageID&gt;(item.ptr(), { .itemID = itemID, .pageID = pageID });
</span><span class="cx">     idToHistoryItemMap().set(itemID, item.ptr());
</span><span class="cx"> }
</span><span class="lines">@@ -154,8 +152,6 @@
</span><span class="cx"> 
</span><span class="cx">     ASSERT(!idToHistoryItemMap().contains(itemID));
</span><span class="cx"> 
</span><del>-    m_associatedItemIDs.add(itemID);
-
</del><span class="cx">     historyItemToIDMap().set&lt;ItemAndPageID&gt;(item.ptr(), { .itemID = itemID, .pageID = m_page-&gt;pageID() });
</span><span class="cx">     idToHistoryItemMap().set(itemID, item.ptr());
</span><span class="cx"> 
</span><span class="lines">@@ -214,12 +210,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WebBackForwardListProxy::close()
</span><span class="cx"> {
</span><del>-    for (auto&amp; itemID : m_associatedItemIDs) {
-        if (HistoryItem* item = itemForID(itemID))
-            WebCore::PageCache::singleton().remove(*item);
-    }
-
-    m_associatedItemIDs.clear();
</del><span class="cx">     m_page = nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari603branchSourceWebKit2WebProcessWebPageWebBackForwardListProxyh"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h (211709 => 211710)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h        2017-02-06 06:17:27 UTC (rev 211709)
+++ branches/safari-603-branch/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h        2017-02-06 06:17:32 UTC (rev 211710)
</span><span class="lines">@@ -60,7 +60,6 @@
</span><span class="cx">     void close() override;
</span><span class="cx"> 
</span><span class="cx">     WebPage* m_page;
</span><del>-    HashSet&lt;uint64_t&gt; m_associatedItemIDs;
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre>
</div>
</div>

</body>
</html>