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

Unified Diff: third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp

Issue 2685543002: Support data URLs in worker constructors (Closed)
Patch Set: Added external tests for data: SharedWorkers Created 3 years, 10 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 | « third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
index 04764e4f21eabb11fce26ed234387d0050fec89a..c2e47aa944d6e60a598b39051083e8ae4eb4aa18 100644
--- a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
@@ -178,8 +178,13 @@ void WebSharedWorkerImpl::didFinishDocumentLoad(WebLocalFrame* frame) {
m_mainScriptLoader->setRequestContext(
WebURLRequest::RequestContextSharedWorker);
m_loadingDocument = toWebLocalFrameImpl(frame)->frame()->document();
+
+ CrossOriginRequestPolicy crossOriginRequestPolicy =
+ ((KURL)m_url).protocolIsData() ? AllowCrossOriginRequests
jochen (gone - plz use gerrit) 2017/02/10 09:57:37 please use c++ style cases (static_cast<KURL>) - s
andypaicu2 2017/02/13 11:38:45 Done
+ : DenyCrossOriginRequests;
+
m_mainScriptLoader->loadAsynchronously(
- *m_loadingDocument.get(), m_url, DenyCrossOriginRequests,
+ *m_loadingDocument.get(), m_url, crossOriginRequestPolicy,
m_creationAddressSpace,
bind(&WebSharedWorkerImpl::didReceiveScriptLoaderResponse,
WTF::unretained(this)),
« no previous file with comments | « third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698