Changeset 249239 in webkit
- Timestamp:
- Aug 28, 2019, 10:57:12 PM (7 years ago)
- Location:
- branches/safari-608-branch
- Files:
-
- 3 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/http/tests/notifications/request-in-detached-frame-expected.txt (added)
-
LayoutTests/http/tests/notifications/request-in-detached-frame.html (added)
-
LayoutTests/http/tests/notifications/resources/request-in-detached-frame-subframe.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/notifications/Notification.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-608-branch/LayoutTests/ChangeLog
r249169 r249239 1 2019-08-28 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r249156. rdar://problem/54775048 4 5 Crash under WebCore::jsNotificationConstructorPermission 6 https://bugs.webkit.org/show_bug.cgi?id=201186 7 <rdar://problem/53962833> 8 9 Reviewed by Youenn Fablet. 10 11 Source/WebCore: 12 13 Update the Notification API implementation to null-check the page before using. The page becomes null 14 when using the API in a frame that gets detached from its parent while in the middle of running 15 script. 16 17 Test: http/tests/notifications/request-in-detached-frame.html 18 19 * Modules/notifications/Notification.cpp: 20 (WebCore::Notification::permission): 21 (WebCore::Notification::requestPermission): 22 23 LayoutTests: 24 25 Add layout test coverage. 26 27 * http/tests/notifications/request-in-detached-frame-expected.txt: Added. 28 * http/tests/notifications/request-in-detached-frame.html: Added. 29 * http/tests/notifications/resources/request-in-detached-frame-subframe.html: Added. 30 31 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249156 268f45cc-cd09-0410-ab3c-d52691b4dbfc 32 33 2019-08-27 Chris Dumez <cdumez@apple.com> 34 35 Crash under WebCore::jsNotificationConstructorPermission 36 https://bugs.webkit.org/show_bug.cgi?id=201186 37 <rdar://problem/53962833> 38 39 Reviewed by Youenn Fablet. 40 41 Add layout test coverage. 42 43 * http/tests/notifications/request-in-detached-frame-expected.txt: Added. 44 * http/tests/notifications/request-in-detached-frame.html: Added. 45 * http/tests/notifications/resources/request-in-detached-frame-subframe.html: Added. 46 1 47 2019-08-27 Ryan Haddad <ryanhaddad@apple.com> 2 48 -
branches/safari-608-branch/Source/WebCore/ChangeLog
r249238 r249239 1 2019-08-28 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r249156. rdar://problem/54775048 4 5 Crash under WebCore::jsNotificationConstructorPermission 6 https://bugs.webkit.org/show_bug.cgi?id=201186 7 <rdar://problem/53962833> 8 9 Reviewed by Youenn Fablet. 10 11 Source/WebCore: 12 13 Update the Notification API implementation to null-check the page before using. The page becomes null 14 when using the API in a frame that gets detached from its parent while in the middle of running 15 script. 16 17 Test: http/tests/notifications/request-in-detached-frame.html 18 19 * Modules/notifications/Notification.cpp: 20 (WebCore::Notification::permission): 21 (WebCore::Notification::requestPermission): 22 23 LayoutTests: 24 25 Add layout test coverage. 26 27 * http/tests/notifications/request-in-detached-frame-expected.txt: Added. 28 * http/tests/notifications/request-in-detached-frame.html: Added. 29 * http/tests/notifications/resources/request-in-detached-frame-subframe.html: Added. 30 31 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249156 268f45cc-cd09-0410-ab3c-d52691b4dbfc 32 33 2019-08-27 Chris Dumez <cdumez@apple.com> 34 35 Crash under WebCore::jsNotificationConstructorPermission 36 https://bugs.webkit.org/show_bug.cgi?id=201186 37 <rdar://problem/53962833> 38 39 Reviewed by Youenn Fablet. 40 41 Update the Notification API implementation to null-check the page before using. The page becomes null 42 when using the API in a frame that gets detached from its parent while in the middle of running 43 script. 44 45 Test: http/tests/notifications/request-in-detached-frame.html 46 47 * Modules/notifications/Notification.cpp: 48 (WebCore::Notification::permission): 49 (WebCore::Notification::requestPermission): 50 1 51 2019-08-28 Kocsen Chung <kocsen_chung@apple.com> 2 52 -
branches/safari-608-branch/Source/WebCore/Modules/notifications/Notification.cpp
r243887 r249239 167 167 auto Notification::permission(Document& document) -> Permission 168 168 { 169 auto* page = document.page(); 170 if (!page) 171 return Permission::Default; 172 169 173 return NotificationController::from(document.page())->client().checkPermission(&document); 170 174 } … … 172 176 void Notification::requestPermission(Document& document, RefPtr<NotificationPermissionCallback>&& callback) 173 177 { 174 NotificationController::from(document.page())->client().requestPermission(&document, WTFMove(callback)); 178 auto* page = document.page(); 179 if (!page) 180 return; 181 182 NotificationController::from(page)->client().requestPermission(&document, WTFMove(callback)); 175 183 } 176 184
Note:
See TracChangeset
for help on using the changeset viewer.