Index: third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp |
index 1a2c2bccc9faae9d6719b449bd03ebb5173cbb3d..2b29ea11c7315513e11a540857e3e0933d4f09c5 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp |
@@ -99,7 +99,7 @@ void WindowProxy::disposeContext(GlobalDetachmentBehavior behavior) { |
if (!isContextInitialized()) |
return; |
- v8::HandleScope handleScope(m_isolate); |
+ ScriptState::Scope scope(m_scriptState.get()); |
v8::Local<v8::Context> context = m_scriptState->context(); |
if (m_frame->isLocalFrame()) { |
LocalFrame* frame = toLocalFrame(m_frame); |
@@ -136,18 +136,10 @@ void WindowProxy::disposeContext(GlobalDetachmentBehavior behavior) { |
} |
void WindowProxy::clearForClose() { |
- if (!isContextInitialized()) |
- return; |
- |
disposeContext(DoNotDetachGlobal); |
} |
void WindowProxy::clearForNavigation() { |
- if (!isContextInitialized()) |
- return; |
- |
- ScriptState::Scope scope(m_scriptState.get()); |
- |
disposeContext(DetachGlobal); |
} |