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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h

Issue 2626183003: Switch RemoteWindowProxy to use v8::Context::NewRemoteContext. (Closed)
Patch Set: rebase Created 3 years, 10 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: third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h b/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h
index e92aea290acfb9fc385fc9507c4a02df132f54e5..a171b73c5df057e97a1ae29a53adcc6038f74ff7 100644
--- a/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h
+++ b/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h
@@ -62,6 +62,11 @@ class LocalWindowProxy final : public WindowProxy {
// (e.g., after setting docoument.domain).
void updateSecurityOrigin(SecurityOrigin*);
+ ScriptState* getScriptState() const { return m_scriptState.get(); }
+ v8::Local<v8::Context> contextIfInitialized() const {
+ return m_scriptState ? m_scriptState->context() : v8::Local<v8::Context>();
+ }
+
private:
LocalWindowProxy(v8::Isolate*, LocalFrame&, RefPtr<DOMWrapperWorld>);
@@ -74,6 +79,10 @@ class LocalWindowProxy final : public WindowProxy {
// wrapper is not yet associated with the native DOMWindow object.
void createContext();
+ // Associates the window wrapper and its prototype chain with the native
+ // DOMWindow object. Also does some more Window-specific initialization.
+ void setupWindowPrototypeChain();
+
void setSecurityToken(SecurityOrigin*);
// The JavaScript wrapper for the document object is cached on the global
@@ -85,6 +94,8 @@ class LocalWindowProxy final : public WindowProxy {
void updateActivityLogger();
LocalFrame* frame() const { return toLocalFrame(WindowProxy::frame()); }
+
+ RefPtr<ScriptState> m_scriptState;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698