Changeset 221896 in webkit
- Timestamp:
- Sep 11, 2017, 5:40:11 PM (8 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r221894 r221896 1 2017-09-11 Alex Christensen <achristensen@webkit.org> 2 3 Fix memory leak introduced in r221894. 4 https://bugs.webkit.org/show_bug.cgi?id=176753 5 6 * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp: 7 (WebKit::NotificationPermissionRequestManagerProxy::createRequest): 8 The NotificationPermissionRequestManagerProxy keeps track of pending requests 9 so they can be denied when invalidating the page. We add them to a HashMap and in 10 r221894 I removed the code that removes them from that map once the request is complete. 11 This code adds the completed task removal back. 12 The NotificationPermissionRequestManagerProxy and WebPageProxy have the same lifetime, 13 so protecting the WebPageProxy (m_page) makes sure there is no use-after-free when the 14 completion handler is called. 15 1 16 2017-09-11 Alex Christensen <achristensen@webkit.org> 2 17 -
trunk/Source/WebKit/UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp
r221894 r221896 49 49 Ref<NotificationPermissionRequest> NotificationPermissionRequestManagerProxy::createRequest(uint64_t notificationID) 50 50 { 51 auto request = NotificationPermissionRequest::create([notificationID, page = makeRef(m_page)](bool allowed) { 51 auto request = NotificationPermissionRequest::create([this, notificationID, page = makeRef(m_page)](bool allowed) { 52 m_pendingRequests.take(notificationID); 52 53 page->process().send(Messages::WebPage::DidReceiveNotificationPermissionDecision(notificationID, allowed), page->pageID()); 53 54 });
Note:
See TracChangeset
for help on using the changeset viewer.