[WK2] Clearing notifications does not clean up internal state
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2012 23:45:15 +0000 (23:45 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2012 23:45:15 +0000 (23:45 +0000)
commitbc56563ac29548ab4d2ac78f36bd94f0fd1a3dba
treee544475835054c868f4fa980192bad72f9348d05
parentbb80d5197d3efacb6db25d50bbe758dd5f75b55e
[WK2] Clearing notifications does not clean up internal state
https://bugs.webkit.org/show_bug.cgi?id=78861
<rdar://problem/10881167>

Reviewed by Anders Carlsson.

* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::clearNotifications): This function was missing removing the notification
entries from the other maps.
(WebKit::WebNotificationManager::didDestroyNotification): When the notification is destroyed, it should
also be removed from the context map.
(WebKit::WebNotificationManager::didCloseNotifications): Refactor to pull out the code that removes
a provided notification from the context map.
(WebKit::WebNotificationManager::removeNotificationFromContextMap): Find the notification in the map, and
remove it. If the map is empty, get rid of the entry.
* WebProcess/Notifications/WebNotificationManager.h:
(WebNotificationManager):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp
Source/WebKit2/WebProcess/Notifications/WebNotificationManager.h