Track IconDatabase retain counts for WebContent processes. Balance retain/releases...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Apr 2015 22:37:19 +0000 (22:37 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Apr 2015 22:37:19 +0000 (22:37 +0000)
commitfe14897c0bd59cff89f96f76d48eff951610a650
tree36ccb305f0ffebb304220b65d14495d7e8a0f831
parenteb0190b7fa9f03aad4947ae746740e6050ccd3ed
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
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebIconDatabase.messages.in
Source/WebKit2/UIProcess/WebProcessProxy.cpp
Source/WebKit2/UIProcess/WebProcessProxy.h
Source/WebKit2/UIProcess/WebProcessProxy.messages.in
Source/WebKit2/WebProcess/IconDatabase/WebIconDatabaseProxy.cpp