Index: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp |
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp |
index 4533f1f8995a1b0a63d470d3997f0532af84e761..0b581f05bc2628bdc4f6e428c1281d2c405d21c3 100644 |
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp |
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp |
@@ -112,7 +112,7 @@ ScriptPromise ServiceWorkerClients::openWindow(ScriptState* scriptState, const S |
ExecutionContext* context = scriptState->executionContext(); |
KURL parsedUrl = KURL(toWorkerGlobalScope(context)->location()->url(), url); |
- if (!parsedUrl.isValid()) { |
+ if (!parsedUrl.isValid() || !parsedUrl.protocolIsInHTTPFamily()) { |
resolver->reject(V8ThrowException::createTypeError(scriptState->isolate(), "'" + url + "' is not a valid URL.")); |
return promise; |
} |