Chromium Code Reviews| Index: third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp |
| diff --git a/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp b/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp |
| index c6e64dff110ae55686643307996126b5b8dbe073..3a96c18a0a1dcde5aafb909c336c1e73d4ce4e1d 100644 |
| --- a/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp |
| +++ b/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp |
| @@ -50,9 +50,14 @@ bool InProcessWorkerBase::initialize(ExecutionContext* context, |
| if (scriptURL.isEmpty()) |
| return false; |
| + CrossOriginRequestPolicy crossOriginRequestPolicy = DenyCrossOriginRequests; |
| + if (scriptURL.protocolIsData()) { |
| + crossOriginRequestPolicy = AllowCrossOriginRequests; |
| + } |
|
Mike West
2017/02/08 13:15:44
I'd prefer to spell this with a ternary-if since i
andypaicu2
2017/02/10 10:25:37
Done
|
| + |
| m_scriptLoader = WorkerScriptLoader::create(); |
| m_scriptLoader->loadAsynchronously( |
| - *context, scriptURL, DenyCrossOriginRequests, |
| + *context, scriptURL, crossOriginRequestPolicy, |
| context->securityContext().addressSpace(), |
| WTF::bind(&InProcessWorkerBase::onResponse, wrapPersistent(this)), |
| WTF::bind(&InProcessWorkerBase::onFinished, wrapPersistent(this))); |