Index: Source/core/dom/ExecutionContext.cpp |
diff --git a/Source/core/dom/ExecutionContext.cpp b/Source/core/dom/ExecutionContext.cpp |
index 66f959be67681166437f2a512776afc29bd1c10b..0bdeec8c67fe553924d3b5be62b11b43dd8bf453 100644 |
--- a/Source/core/dom/ExecutionContext.cpp |
+++ b/Source/core/dom/ExecutionContext.cpp |
@@ -66,6 +66,7 @@ public: |
ExecutionContext::ExecutionContext() |
: m_client(0) |
, m_sandboxFlags(SandboxNone) |
+ , m_suboriginName("") |
abarth-chromium
2014/07/31 04:56:47
We should just let this automatically initialize t
jww
2014/10/21 23:51:06
No longer relevant (m_suboriginName is gone).
|
, m_circularSequentialID(0) |
, m_inDispatchErrorEvent(false) |
, m_activeDOMObjectsAreSuspended(false) |
@@ -336,6 +337,17 @@ void ExecutionContext::enforceSandboxFlags(SandboxFlags mask) |
} |
} |
+void ExecutionContext::enforceSuborigin(const String& name) |
+{ |
+ RELEASE_ASSERT(m_client); |
+ SecurityOrigin* origin = m_client->securityContext().securityOrigin(); |
+ ASSERT(origin); |
+ if (!origin->hasSuborigin()) { |
+ origin->addSuborigin(name); |
+ m_client->didUpdateSecurityOrigin(); |
+ } |
+} |
+ |
void ExecutionContext::trace(Visitor* visitor) |
{ |
#if ENABLE(OILPAN) |