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 ee7a500cb2535666ff10a57600bc71332f9a3560..e63b41463d1022e40464dcf82314e7c71cd3a981 100644 |
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp |
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp |
@@ -160,6 +160,12 @@ ScriptPromise ServiceWorkerClients::claim(ScriptState* script_state) { |
ScriptPromise ServiceWorkerClients::openWindow(ScriptState* script_state, |
const String& url) { |
+ return openWindow(script_state, String(), url); |
+} |
+ |
+ScriptPromise ServiceWorkerClients::openWindow(ScriptState* script_state, |
+ const String& redirect_url, |
+ const String& url) { |
ScriptPromiseResolver* resolver = ScriptPromiseResolver::Create(script_state); |
ScriptPromise promise = resolver->Promise(); |
ExecutionContext* context = ExecutionContext::From(script_state); |
@@ -186,7 +192,8 @@ ScriptPromise ServiceWorkerClients::openWindow(ScriptState* script_state, |
context->ConsumeWindowInteraction(); |
ServiceWorkerGlobalScopeClient::From(context)->OpenWindow( |
- parsed_url, WTF::MakeUnique<NavigateClientCallback>(resolver)); |
+ KURL(kParsedURLString, redirect_url), parsed_url, |
+ WTF::MakeUnique<NavigateClientCallback>(resolver)); |
return promise; |
} |