Chromium Code Reviews| 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; |
|
dcheng
2017/01/18 23:43:17
The changes in LocalWindowProxy are just moving co
|
| }; |
| } // namespace blink |