| Index: Source/modules/notifications/Notification.cpp
|
| diff --git a/Source/modules/notifications/Notification.cpp b/Source/modules/notifications/Notification.cpp
|
| index 6b73d6cfee3a64f03201bfc8e1020f79390b4960..8f8d0730f65877bca9914caf87688a03e1b61055 100644
|
| --- a/Source/modules/notifications/Notification.cpp
|
| +++ b/Source/modules/notifications/Notification.cpp
|
| @@ -93,8 +93,12 @@ Notification* Notification::create(ExecutionContext* context, const String& titl
|
| }
|
|
|
| for (NotificationAction action : options.actions()) {
|
| + if (action.action().isEmpty()) {
|
| + exceptionState.throwTypeError("NotificationAction action must not be empty.");
|
| + return nullptr;
|
| + }
|
| if (action.title().isEmpty()) {
|
| - exceptionState.throwTypeError("Notification action titles must not be empty.");
|
| + exceptionState.throwTypeError("NotificationAction title must not be empty.");
|
| return nullptr;
|
| }
|
| }
|
| @@ -309,6 +313,7 @@ void Notification::webActionsToActions(const WebVector<WebNotificationAction>& w
|
| actions.clear();
|
| actions.grow(webActions.size());
|
| for (size_t i = 0; i < webActions.size(); ++i) {
|
| + actions[i].setAction(webActions[i].action);
|
| actions[i].setTitle(webActions[i].title);
|
| }
|
| }
|
|
|