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

Unified Diff: third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp

Issue 2566503002: Adds HTTP check to PresentationRequest creation. (Closed)
Patch Set: Adds unittest Created 3 years, 11 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
Index: third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp b/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
index 4da9bf0140fbdf5c812882a35fdf014531c36a8d..724455e23a63664b1d375eef5eb4f698e27093e5 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
@@ -84,7 +84,7 @@ PresentationRequest* PresentationRequest::create(
for (size_t i = 0; i < urls.size(); ++i) {
const KURL& parsedUrl = KURL(executionContext->url(), urls[i]);
- if (!parsedUrl.isValid() || parsedUrl.protocolIsAbout()) {
+ if (!parsedUrl.isValid() || !parsedUrl.protocolIsInHTTPFamily()) {
exceptionState.throwDOMException(
SyntaxError, "'" + urls[i] + "' can't be resolved to a valid URL.");
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698