Track IconDatabase retain counts for WebContent processes. Balance retain/releases for processes that terminate before successfully doing it themselves.
https://bugs.webkit.org/show_bug.cgi?id=143517.
Patch by Gordon Sheridan <gordon_sheridan@apple.com> on 2015-04-09
Reviewed by Brady Eidson.
* UIProcess/WebIconDatabase.messages.in:
Move RetainIconForPageURL and ReleaseIconForPageURL messages to WebProcessProxy so they can be associated with the appropriate web process.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::connectionDidClose):
Call releaseRemainingIconsForPageURLs() to balance retains/releases for this process.
(WebKit::WebProcessProxy::retainIconForPageURL):
Track retain counts for page URLs and call through to WebIconDatabase.
(WebKit::WebProcessProxy::releaseIconForPageURL):
Ditto.
(WebKit::WebProcessProxy::releaseRemainingIconsForPageURLs):
Call releaseIconForPageURL() once for each outstanding retain count, for each page URL.
* UIProcess/WebProcessProxy.h:
Declare methods for retainIconForPageURL(), releaseIconForPageURL(), and releaseRemainingIconsForPageURLs().
Declare hash map to track number of retains per page URL.
* UIProcess/WebProcessProxy.messages.in:
Moved RetainIconForPageURL and ReleaseIconForPageURL messages here from WebIconDatabase.
* WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
(WebKit::WebIconDatabaseProxy::retainIconForPageURL):
Modify the receiver of the message to be WebProcessProxy.
(WebKit::WebIconDatabaseProxy::releaseIconForPageURL):
Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182610
268f45cc-cd09-0410-ab3c-
d52691b4dbfc