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

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

Issue 2566503002: Adds HTTP check to PresentationRequest creation. (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c5226b152dd05baaba5ee5986703f0d1dbfdcc0f..1fdf12d99f7a2c5b0e1e647d8dbd631241599ed4 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
@@ -70,7 +70,8 @@ PresentationRequest* PresentationRequest::create(
const String& url,
ExceptionState& exceptionState) {
KURL parsedUrl = KURL(executionContext->url(), url);
- if (!parsedUrl.isValid() || parsedUrl.protocolIsAbout()) {
+ if (!parsedUrl.isValid() || !parsedUrl.protocolIsInHTTPFamily() ||
zhaobin 2016/12/09 18:53:02 Remove parsedUrl.protocolIsAbout() check if we alr
CJ 2016/12/13 02:12:38 I'm not seeing how they overlap with each other. P
zhaobin 2016/12/13 19:06:02 !protocolIsInHTTPFamily() means not http or https.
CJ 2016/12/13 21:34:23 Done.
+ parsedUrl.protocolIsAbout()) {
exceptionState.throwTypeError("'" + url +
"' can't be resolved to a valid URL.");
return nullptr;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698