Index: Source/modules/fetch/FetchManager.cpp |
diff --git a/Source/modules/fetch/FetchManager.cpp b/Source/modules/fetch/FetchManager.cpp |
index 602a217f21f10511716d567cbb899fa510112f2a..5c72ea51574515699a59d3977508d7a382fa516f 100644 |
--- a/Source/modules/fetch/FetchManager.cpp |
+++ b/Source/modules/fetch/FetchManager.cpp |
@@ -170,6 +170,12 @@ void FetchManager::Loader::didFailRedirectCheck() |
void FetchManager::Loader::start() |
{ |
+ if (!executionContext()->isServiceWorkerGlobalScope() |
+ && m_request->mode() == WebURLRequest::FetchRequestModeNoCORS) { |
+ performNetworkError("no-cors is disabled for non-serviceworker."); |
+ return; |
+ } |
+ |
// "1. If |request|'s url contains a Known HSTS Host, modify it per the |
// requirements of the 'URI [sic] Loading and Port Mapping' chapter of HTTP |
// Strict Transport Security." |