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

Unified Diff: third_party/WebKit/Source/modules/push_messaging/PushError.cpp

Issue 2436393002: Disallow repeated PushManager.subscribes with different sender ids (Closed)
Patch Set: Make error message more informative Created 4 years, 1 month 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/push_messaging/PushError.cpp
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushError.cpp b/third_party/WebKit/Source/modules/push_messaging/PushError.cpp
index 16d6c09e0cf4f61efe85ab5e628c048ae68c2807..7d7dc8996ef5b198cd6bd76e9669f6ff1ed93279 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushError.cpp
+++ b/third_party/WebKit/Source/modules/push_messaging/PushError.cpp
@@ -15,6 +15,8 @@ DOMException* PushError::take(ScriptPromiseResolver*,
switch (webError.errorType) {
case WebPushError::ErrorTypeAbort:
return DOMException::create(AbortError, webError.message);
+ case WebPushError::ErrorTypeInvalidState:
+ return DOMException::create(InvalidStateError, webError.message);
case WebPushError::ErrorTypeNetwork:
return DOMException::create(NetworkError, webError.message);
case WebPushError::ErrorTypeNotAllowed:

Powered by Google App Engine
This is Rietveld 408576698