Chromium Code Reviews| 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 d7bc93f1ab08eb2ee0ef0ba8502bfcd7c0355ad7..231ca59ff7913fe8eb4538e766c063f8c11587d2 100644 |
| --- a/third_party/WebKit/Source/modules/notifications/NotificationData.cpp |
| +++ b/third_party/WebKit/Source/modules/notifications/NotificationData.cpp |
| @@ -38,6 +38,12 @@ WebNotificationData createWebNotificationData(ExecutionContext* executionContext |
| return WebNotificationData(); |
| } |
| + // If renotify is true, the notification must have a tag. |
| + if (options.renotify() && options.tag().isEmpty()) { |
| + exceptionState.throwTypeError("Notifications which set the renotify flag must specify a valid tag."); |
|
Peter Beverloo
2016/02/02 23:43:10
a valid tag -> a non-empty tag
The only validity
harkness
2016/02/03 11:24:28
Done.
|
| + return WebNotificationData(); |
| + } |
| + |
| WebNotificationData webData; |
| webData.title = title; |
| @@ -59,6 +65,7 @@ WebNotificationData createWebNotificationData(ExecutionContext* executionContext |
| webData.vibrate = NavigatorVibration::sanitizeVibrationPattern(options.vibrate()); |
| webData.timestamp = options.hasTimestamp() ? static_cast<double>(options.timestamp()) : WTF::currentTimeMS(); |
| webData.silent = options.silent(); |
| + webData.renotify = options.renotify(); |
| webData.requireInteraction = options.requireInteraction(); |
| if (options.hasData()) { |