Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[Crash] com.apple.WebKit.WebContent at WebKit: WebKit::WebPage::fromC…
…orePage() https://bugs.webkit.org/show_bug.cgi?id=167738 <rdar://problem/30229990> Reviewed by Andreas Kling. Source/WebCore: 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): Source/WebKit/mac: 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): Source/WebKit/win: The BackForwardClient no longer needs to worry about removing HistoryItems from the PageCache now that WebCore takes care of it. * BackForwardList.cpp: (BackForwardList::close): Source/WebKit2: 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: Canonical link: https://commits.webkit.org/184783@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
13 changed files
with
100 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters