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

Unified Diff: Source/bindings/v8/V8DOMWindowShell.h

Issue 17035004: [ABANDONED] Introduce Promise example implementation written in JavaScript. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 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
« no previous file with comments | « Source/bindings/bindings.gypi ('k') | Source/bindings/v8/V8DOMWindowShell.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/bindings/bindings.gypi ('k') | Source/bindings/v8/V8DOMWindowShell.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698