Index: third_party/WebKit/Source/modules/notifications/Notification.cpp |
diff --git a/third_party/WebKit/Source/modules/notifications/Notification.cpp b/third_party/WebKit/Source/modules/notifications/Notification.cpp |
index e9a6ef8496814f79e63538f984efc90757cbafcb..17d20e60e9d9f4887f6e1f41fe2dc45f70c341ef 100644 |
--- a/third_party/WebKit/Source/modules/notifications/Notification.cpp |
+++ b/third_party/WebKit/Source/modules/notifications/Notification.cpp |
@@ -79,6 +79,11 @@ Notification* Notification::create(ExecutionContext* context, const String& titl |
return nullptr; |
} |
+ if (!options.actions().isEmpty()) { |
+ exceptionState.throwTypeError("Actions are only supported for persistent notifications shown using ServiceWorkerRegistration.showNotification()."); |
+ return nullptr; |
+ } |
+ |
String insecureOriginMessage; |
UseCounter::Feature feature = context->isSecureContext(insecureOriginMessage) |
? UseCounter::NotificationSecureOrigin |