Changeset 126903 in webkit


Ignore:
Timestamp:
Aug 28, 2012, 11:31:02 AM (13 years ago)
Author:
jonlee@apple.com
Message:

[WK2] Bugs in maintenance of internal state when user decides whether to grant notification permissions
https://bugs.webkit.org/show_bug.cgi?id=95220
<rdar://problem/12189895>

Reviewed by Jessie Berlin.

A couple of the maps maintained by the request manager should have been cleaned up when the user decided on
whether to grant a website permission to post notifications.

Also, the web process' copy of the permissions was not updated appropriately. This meant that in the
permission callback, Notification.permission was not the same value as the permission value included as
the first parameter of the callback.

This first surfaced as part of the work to bring Mac support for web notifications. I have a test that
will check for regressions in this area, once all of that has been checked in (bug 77969).

  • WebProcess/Notifications/NotificationPermissionRequestManager.cpp:

(WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r126899 r126903  
     12012-08-28  Jon Lee  <jonlee@apple.com>
     2
     3        [WK2] Bugs in maintenance of internal state when user decides whether to grant notification permissions
     4        https://bugs.webkit.org/show_bug.cgi?id=95220
     5        <rdar://problem/12189895>
     6
     7        Reviewed by Jessie Berlin.
     8
     9        A couple of the maps maintained by the request manager should have been cleaned up when the user decided on
     10        whether to grant a website permission to post notifications.
     11
     12        Also, the web process' copy of the permissions was not updated appropriately. This meant that in the
     13        permission callback, Notification.permission was not the same value as the permission value included as
     14        the first parameter of the callback.
     15
     16        This first surfaced as part of the work to bring Mac support for web notifications. I have a test that
     17        will check for regressions in this area, once all of that has been checked in (bug 77969).
     18
     19        * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
     20        (WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):
     21
    1222012-08-28  Jon Lee  <jonlee@apple.com>
    223
  • trunk/Source/WebKit2/WebProcess/Notifications/NotificationPermissionRequestManager.cpp

    r126899 r126903  
    152152        return;
    153153
     154    RefPtr<WebCore::SecurityOrigin> origin = m_idToOriginMap.take(requestID);
     155    m_originToIDMap.remove(origin);
     156
     157    WebProcess::shared().notificationManager().didUpdateNotificationDecision(origin->toString(), allowed);
     158
    154159#if ENABLE(LEGACY_NOTIFICATIONS)
    155160    RefPtr<VoidCallback> voidCallback = m_idToVoidCallbackMap.take(requestID);
Note: See TracChangeset for help on using the changeset viewer.