Title: [255797] releases/WebKitGTK/webkit-2.28
- Revision
- 255797
- Author
- [email protected]
- Date
- 2020-02-05 02:50:13 -0800 (Wed, 05 Feb 2020)
Log Message
Merge r255680 - Check for callback being null in Notification.requestPermission
https://bugs.webkit.org/show_bug.cgi?id=207192
<rdar://problem/59130804>
Reviewed by Chris Dumez.
Source/WebCore:
Covered by updated test.
* Modules/notifications/Notification.cpp:
(WebCore::Notification::requestPermission):
Callback can be null if no function is given to requestPermission.
Check this before calling the callback.
LayoutTests:
* http/tests/notifications/notification-in-non-secure-context.html:
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.28/LayoutTests/ChangeLog (255796 => 255797)
--- releases/WebKitGTK/webkit-2.28/LayoutTests/ChangeLog 2020-02-05 10:50:08 UTC (rev 255796)
+++ releases/WebKitGTK/webkit-2.28/LayoutTests/ChangeLog 2020-02-05 10:50:13 UTC (rev 255797)
@@ -1,3 +1,13 @@
+2020-02-04 youenn fablet <[email protected]>
+
+ Check for callback being null in Notification.requestPermission
+ https://bugs.webkit.org/show_bug.cgi?id=207192
+ <rdar://problem/59130804>
+
+ Reviewed by Chris Dumez.
+
+ * http/tests/notifications/notification-in-non-secure-context.html:
+
2020-02-04 Devin Rousso <[email protected]>
Web Inspector: REGRESSION(r248287): Console: function objects saved to a $n will be invoked instead of just referenced when evaluating in the Console
Modified: releases/WebKitGTK/webkit-2.28/LayoutTests/http/tests/notifications/notification-in-non-secure-context.html (255796 => 255797)
--- releases/WebKitGTK/webkit-2.28/LayoutTests/http/tests/notifications/notification-in-non-secure-context.html 2020-02-05 10:50:08 UTC (rev 255796)
+++ releases/WebKitGTK/webkit-2.28/LayoutTests/http/tests/notifications/notification-in-non-secure-context.html 2020-02-05 10:50:13 UTC (rev 255797)
@@ -10,6 +10,8 @@
if (window.internals)
internals.markContextAsInsecure();
+Notification.requestPermission();
+
Notification.requestPermission(test.step_func((result) => {
assert_equals(result, "denied", "result");
assert_equals(Notification.permission, "denied", "getter");
Modified: releases/WebKitGTK/webkit-2.28/Source/WebCore/ChangeLog (255796 => 255797)
--- releases/WebKitGTK/webkit-2.28/Source/WebCore/ChangeLog 2020-02-05 10:50:08 UTC (rev 255796)
+++ releases/WebKitGTK/webkit-2.28/Source/WebCore/ChangeLog 2020-02-05 10:50:13 UTC (rev 255797)
@@ -1,3 +1,18 @@
+2020-02-04 youenn fablet <[email protected]>
+
+ Check for callback being null in Notification.requestPermission
+ https://bugs.webkit.org/show_bug.cgi?id=207192
+ <rdar://problem/59130804>
+
+ Reviewed by Chris Dumez.
+
+ Covered by updated test.
+
+ * Modules/notifications/Notification.cpp:
+ (WebCore::Notification::requestPermission):
+ Callback can be null if no function is given to requestPermission.
+ Check this before calling the callback.
+
2020-02-04 Pablo Saavedra <[email protected]>
Build error with -DENABLE_VIDEO=OFF after r253923
Modified: releases/WebKitGTK/webkit-2.28/Source/WebCore/Modules/notifications/Notification.cpp (255796 => 255797)
--- releases/WebKitGTK/webkit-2.28/Source/WebCore/Modules/notifications/Notification.cpp 2020-02-05 10:50:08 UTC (rev 255796)
+++ releases/WebKitGTK/webkit-2.28/Source/WebCore/Modules/notifications/Notification.cpp 2020-02-05 10:50:13 UTC (rev 255797)
@@ -204,9 +204,11 @@
return;
if (!document.isSecureContext()) {
- document.eventLoop().queueTask(TaskSource::DOMManipulation, [callback = WTFMove(callback)]() mutable {
- callback->handleEvent(Permission::Denied);
- });
+ if (callback) {
+ document.eventLoop().queueTask(TaskSource::DOMManipulation, [callback = WTFMove(callback)]() mutable {
+ callback->handleEvent(Permission::Denied);
+ });
+ }
return;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes