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

Unified Diff: Source/bindings/v8/ScriptDebugServer.cpp

Issue 306853002: Replace Context::Scope with ScriptState::Scope (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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: Source/bindings/v8/ScriptDebugServer.cpp
diff --git a/Source/bindings/v8/ScriptDebugServer.cpp b/Source/bindings/v8/ScriptDebugServer.cpp
index 8c0088da7d3f7025d28198374a2eea67d194d966..95e5edbccb518e8bb354e6677e31505ecfee0f9d 100644
--- a/Source/bindings/v8/ScriptDebugServer.cpp
+++ b/Source/bindings/v8/ScriptDebugServer.cpp
@@ -337,7 +337,7 @@ PassRefPtr<JavaScriptCallFrame> ScriptDebugServer::wrapCallFrames(int maximumLim
ScriptValue ScriptDebugServer::currentCallFramesInner(ScopeInfoDetails scopeDetails)
{
- v8::HandleScope scope(m_isolate);
+ v8::HandleScope handleScope(m_isolate);
v8::Handle<v8::Context> pausedContext = m_pausedContext.IsEmpty() ? m_isolate->GetCurrentContext() : m_pausedContext;
adamk 2014/05/30 19:59:22 Should m_pausedContext be a ScriptState?
haraken 2014/06/02 01:14:50 Done.
if (pausedContext.IsEmpty())
return ScriptValue();
@@ -346,8 +346,9 @@ ScriptValue ScriptDebugServer::currentCallFramesInner(ScopeInfoDetails scopeDeta
if (!currentCallFrame)
return ScriptValue();
- v8::Context::Scope contextScope(pausedContext);
- return ScriptValue(ScriptState::from(pausedContext), toV8(currentCallFrame.release(), v8::Handle<v8::Object>(), pausedContext->GetIsolate()));
+ ScriptState* scriptState = ScriptState::from(pausedContext);
+ ScriptState::Scope scope(scriptState);
+ return ScriptValue(scriptState, toV8(currentCallFrame.release(), scriptState->context()->Global(), pausedContext->GetIsolate()));
}
ScriptValue ScriptDebugServer::currentCallFrames()

Powered by Google App Engine
This is Rietveld 408576698