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

Unified Diff: Source/modules/serviceworkers/ServiceWorkerClients.cpp

Issue 985043002: Relax same-origin policy for ServiceWorker openWindow() in Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 9 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/http/tests/serviceworker/chromium/resources/clients-openwindow.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/ServiceWorkerClients.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorkerClients.cpp b/Source/modules/serviceworkers/ServiceWorkerClients.cpp
index cb15214cdb0457344b218ce07a643314c783f57a..5f4118b3f5da0b89bdad9050f0405bfd33f66f4f 100644
--- a/Source/modules/serviceworkers/ServiceWorkerClients.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerClients.cpp
@@ -128,8 +128,8 @@ ScriptPromise ServiceWorkerClients::openWindow(ScriptState* scriptState, const S
return promise;
}
- if (!context->securityOrigin()->canRequest(parsedUrl)) {
- resolver->reject(DOMException::create(SecurityError, "'" + parsedUrl.elidedString() + "' is not same-origin with the Worker."));
+ if (!context->securityOrigin()->canDisplay(parsedUrl)) {
+ resolver->reject(DOMException::create(SecurityError, "'" + parsedUrl.elidedString() + "' cannot be opened."));
return promise;
}
« no previous file with comments | « LayoutTests/http/tests/serviceworker/chromium/resources/clients-openwindow.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698