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

Unified Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp

Issue 2343053002: Service worker bypass for resource requests from suborigins (Closed)
Patch Set: Nits from falken@ Created 4 years, 3 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
Index: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
index 30d22655ac34043a79a7b0e020b46aef1e801c76..dd64c4b7368ff65c871f23b596fbf76a0a0b5889 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -594,6 +594,10 @@ ResourceRequestBlockedReason FrameFetchContext::canRequestInternal(Resource::Typ
bool FrameFetchContext::isControlledByServiceWorker() const
{
ASSERT(m_documentLoader || frame()->loader().documentLoader());
+
+ if (getSecurityOrigin() && getSecurityOrigin()->hasSuborigin())
+ return false;
falken 2016/09/20 04:52:52 OK the rationale for allowing .controller makes se
jww 2016/09/20 17:52:26 Yes, it was needed for the mem cache bit. Otherwis
+
if (m_documentLoader)
return frame()->loader().client()->isControlledByServiceWorker(*m_documentLoader);
// m_documentLoader is null while loading resources from an HTML import.

Powered by Google App Engine
This is Rietveld 408576698