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

Unified Diff: Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp

Issue 22791007: Improve SecurityError message on verifyProtocolHandlerScheme() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 months 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
« no previous file with comments | « LayoutTests/fast/dom/register-protocol-handler-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
diff --git a/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp b/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
index df33faf653a043e35e7e35c781a7440d448ab64e..cf6917a9cd4842bcc2e127dc975a831094d2c61a 100644
--- a/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
+++ b/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
@@ -109,13 +109,13 @@ static bool verifyProtocolHandlerScheme(const String& scheme, ExceptionState& es
// The specification requires that the length of scheme is at least five characteres (including 'web+' prefix).
if (scheme.length() >= 5 && isValidProtocol(scheme))
return true;
- es.throwDOMException(SecurityError);
+ es.throwSecurityError("Failed to verify '" + scheme + "' scheme. '" + scheme + "' is not valid protocol or length isn't at least five characters.");
return false;
}
if (isProtocolWhitelisted(scheme))
return true;
- es.throwDOMException(SecurityError);
+ es.throwSecurityError("Failed to verify '" + scheme + "' scheme. '" + scheme + "' doesn't belong to the protocol whitelist.");
return false;
}
« no previous file with comments | « LayoutTests/fast/dom/register-protocol-handler-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698