Index: Source/modules/serviceworkers/NavigatorServiceWorker.cpp |
diff --git a/Source/modules/serviceworkers/NavigatorServiceWorker.cpp b/Source/modules/serviceworkers/NavigatorServiceWorker.cpp |
index d2552311f9a3ba290dd69584d2e2b505c29e230f..7fadf3e956b0482fcf19201e60b46f71a6f4efe4 100644 |
--- a/Source/modules/serviceworkers/NavigatorServiceWorker.cpp |
+++ b/Source/modules/serviceworkers/NavigatorServiceWorker.cpp |
@@ -54,8 +54,12 @@ const char* NavigatorServiceWorker::supplementName() |
return "NavigatorServiceWorker"; |
} |
-ServiceWorkerContainer* NavigatorServiceWorker::serviceWorker(Navigator& navigator, ExceptionState& exceptionState) |
+ServiceWorkerContainer* NavigatorServiceWorker::serviceWorker(ExecutionContext* executionContext, Navigator& navigator, ExceptionState& exceptionState) |
{ |
+ if (navigator.frame() && !executionContext->securityOrigin()->canAccessCheckSuborigins(navigator.frame()->securityContext()->securityOrigin())) { |
+ exceptionState.throwSecurityError("Access to cross-origin service workers is denied."); |
jww
2015/08/21 18:43:26
Even given https://codereview.chromium.org/1308723
horo
2015/09/04 08:24:16
Yes, we should so.
Created a CL.
https://coderevie
|
+ return nullptr; |
+ } |
return NavigatorServiceWorker::from(navigator).serviceWorker(exceptionState); |
} |