Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Unified Diff: third_party/WebKit/Source/modules/notifications/NotificationData.cpp

Issue 1495043002: Stop requiring NotificationAction action and title to be non-empty (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/notifications/NotificationData.cpp
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationData.cpp b/third_party/WebKit/Source/modules/notifications/NotificationData.cpp
index 4052706c4241c29ad52a66f149b3e93e68dd8ab9..d7ce4f09e3ef54ffac24049d9168495d490bbd62 100644
--- a/third_party/WebKit/Source/modules/notifications/NotificationData.cpp
+++ b/third_party/WebKit/Source/modules/notifications/NotificationData.cpp
@@ -75,18 +75,8 @@ WebNotificationData createWebNotificationData(ExecutionContext* executionContext
const size_t maxActions = Notification::maxActions();
for (const NotificationAction& action : options.actions()) {
- if (action.action().isEmpty()) {
- exceptionState.throwTypeError("NotificationAction `action` must not be empty.");
- return WebNotificationData();
- }
-
- if (action.title().isEmpty()) {
- exceptionState.throwTypeError("NotificationAction `title` must not be empty.");
- return WebNotificationData();
- }
-
if (actions.size() >= maxActions)
- continue;
+ break;
WebNotificationAction webAction;
webAction.action = action.action();

Powered by Google App Engine
This is Rietveld 408576698