| Index: third_party/WebKit/Source/bindings/core/v8/WindowProxy.h
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.h b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.h
|
| index 7373e0f62f9774c9e338cf43d83d7ae01ddb5092..54cf8b4a7be14fd66873f80820549809c99c921c 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.h
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.h
|
| @@ -52,6 +52,14 @@ class SecurityOrigin;
|
| // persist between navigations.
|
| class WindowProxy final : public GarbageCollectedFinalized<WindowProxy> {
|
| public:
|
| + // A valid transition is from ContextUninitialized to ContextInitialized,
|
| + // and then ContextDetached. Other transitions are forbidden.
|
| + enum class Lifecycle {
|
| + ContextUninitialized,
|
| + ContextInitialized,
|
| + ContextDetached,
|
| + };
|
| +
|
| static WindowProxy* create(v8::Isolate*, Frame*, DOMWrapperWorld&);
|
|
|
| ~WindowProxy();
|
| @@ -72,9 +80,6 @@ class WindowProxy final : public GarbageCollectedFinalized<WindowProxy> {
|
| // (e.g., after setting docoument.domain).
|
| void updateSecurityOrigin(SecurityOrigin*);
|
|
|
| - bool isContextInitialized() {
|
| - return m_scriptState && !!m_scriptState->perContextData();
|
| - }
|
| void initializeIfNeeded();
|
|
|
| void clearForNavigation();
|
| @@ -118,6 +123,7 @@ class WindowProxy final : public GarbageCollectedFinalized<WindowProxy> {
|
| RefPtr<ScriptState> m_scriptState;
|
| RefPtr<DOMWrapperWorld> m_world;
|
| ScopedPersistent<v8::Object> m_globalProxy;
|
| + Lifecycle m_lifecycle;
|
| };
|
|
|
| } // namespace blink
|
|
|