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

Unified Diff: third_party/WebKit/Source/core/dom/ScriptLoader.cpp

Issue 2774843002: Pass AccessControlStatus to compileModule() (Closed)
Patch Set: const Created 3 years, 8 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/dom/ScriptLoader.cpp
diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
index fa913b355e0b6a734d61aa8b23ba618d11345793..27bba37015b40bd5592ecea7b13b70afe2f3a9fc 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
@@ -736,16 +736,8 @@ bool ScriptLoader::doExecuteScript(const ScriptSourceCode& sourceCode) {
if (!m_isExternalScript) {
accessControlStatus = SharableCrossOrigin;
} else if (sourceCode.resource()) {
- if (sourceCode.resource()->response().wasFetchedViaServiceWorker()) {
- if (sourceCode.resource()->response().serviceWorkerResponseType() ==
- WebServiceWorkerResponseTypeOpaque)
- accessControlStatus = OpaqueResource;
- else
- accessControlStatus = SharableCrossOrigin;
- } else if (sourceCode.resource()->passesAccessControlCheck(
- m_element->document().getSecurityOrigin())) {
- accessControlStatus = SharableCrossOrigin;
- }
+ accessControlStatus = sourceCode.resource()->calculateAccessControlStatus(
+ m_element->document().getSecurityOrigin());
}
const bool isImportedScript = contextDocument != elementDocument;

Powered by Google App Engine
This is Rietveld 408576698