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

Unified Diff: Source/core/dom/ExecutionContext.cpp

Issue 27073003: CSP Suborigins Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address abarth's comments Created 6 years, 2 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: Source/core/dom/ExecutionContext.cpp
diff --git a/Source/core/dom/ExecutionContext.cpp b/Source/core/dom/ExecutionContext.cpp
index 4ec9a88c8031b8d3d83268850358998f581dc5d5..847f48bfa6075fe87951094410a6b7edcc051f12 100644
--- a/Source/core/dom/ExecutionContext.cpp
+++ b/Source/core/dom/ExecutionContext.cpp
@@ -264,6 +264,18 @@ void ExecutionContext::enforceSandboxFlags(SandboxFlags mask)
}
}
+void ExecutionContext::enforceSuborigin(const String& name)
+{
+ if (name.isNull())
Mike West 2014/10/23 12:59:18 isNull or isEmpty? Does enforcing an empty suborig
jww 2015/03/20 22:50:02 You're right, the proposed spec requires at least
+ return;
+ SecurityOrigin* origin = securityContext().securityOrigin();
+ ASSERT(origin);
+ if (!origin->hasSuborigin()) {
Mike West 2014/10/23 12:59:18 Should we do something other than fail silently if
jww 2015/03/20 22:50:02 This should probably be an assert that there eithe
+ origin->addSuborigin(name);
+ didUpdateSecurityOrigin();
+ }
+}
+
void ExecutionContext::trace(Visitor* visitor)
{
#if ENABLE(OILPAN)

Powered by Google App Engine
This is Rietveld 408576698