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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp

Issue 2601033002: Minor clean-up on WindowProxy::disposeContext() (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698