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) |