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 34b697d920c12d970bc75f32767b2f2f9ee71386..4052706c4241c29ad52a66f149b3e93e68dd8ab9 100644 |
--- a/third_party/WebKit/Source/modules/notifications/NotificationData.cpp |
+++ b/third_party/WebKit/Source/modules/notifications/NotificationData.cpp |
@@ -71,35 +71,32 @@ WebNotificationData createWebNotificationData(ExecutionContext* executionContext |
webData.data = serializedData; |
} |
- // Ignore experimental NotificationOptions members if the flag is not set. |
- if (RuntimeEnabledFeatures::notificationExperimentalEnabled()) { |
- Vector<WebNotificationAction> actions; |
- |
- 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; |
- |
- WebNotificationAction webAction; |
- webAction.action = action.action(); |
- webAction.title = action.title(); |
- |
- actions.append(webAction); |
+ Vector<WebNotificationAction> actions; |
+ |
+ 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(); |
} |
- webData.actions = actions; |
+ if (actions.size() >= maxActions) |
+ continue; |
+ |
+ WebNotificationAction webAction; |
+ webAction.action = action.action(); |
+ webAction.title = action.title(); |
+ |
+ actions.append(webAction); |
} |
+ webData.actions = actions; |
+ |
return webData; |
} |