Index: Source/bindings/v8/V8DOMWindowShell.h |
diff --git a/Source/bindings/v8/V8DOMWindowShell.h b/Source/bindings/v8/V8DOMWindowShell.h |
index 9e529189f87f4b090da1e742375cd7e6b4cc8d3d..44d1de5410432c138a3c906dbdfe9e6d64d41aa0 100644 |
--- a/Source/bindings/v8/V8DOMWindowShell.h |
+++ b/Source/bindings/v8/V8DOMWindowShell.h |
@@ -54,6 +54,22 @@ class HTMLDocument; |
// persist between navigations. |
class V8DOMWindowShell { |
public: |
+ enum ContextDescriptor { |
+ DomContext, |
+ BlinkJSContext, |
+ }; |
+ |
+ class ContextScope { |
+ public: |
+ ContextScope(V8DOMWindowShell*, ContextDescriptor); |
+ ~ContextScope() { } |
+ |
+ static V8DOMWindowShell* currentWindowShell(); |
+ private: |
+ ContextDescriptor m_descriptor; |
+ v8::Context::Scope m_scope; |
+ }; |
+ |
static PassOwnPtr<V8DOMWindowShell> create(Frame*, PassRefPtr<DOMWrapperWorld>, v8::Isolate*); |
v8::Local<v8::Context> context() const { return v8::Local<v8::Context>::New(m_context.get()); } |
@@ -103,10 +119,12 @@ private: |
v8::Isolate* m_isolate; |
OwnPtr<V8PerContextData> m_perContextData; |
+ OwnPtr<V8PerContextData> m_perContextDataForBlinkJS; |
ScopedPersistent<v8::Context> m_context; |
ScopedPersistent<v8::Object> m_global; |
ScopedPersistent<v8::Object> m_document; |
+ ScopedPersistent<v8::Context> m_contextForBlinkJS; |
}; |
} // namespace WebCore |