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

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

Issue 466243002: Support merged Dart-JS callstacks (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/dartium
Patch Set: Created 6 years, 4 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 0c61ce7494e9737c677e1026a26de1b3585053ff..5524743e3c3b967fbe2a85b9e74326f924c56d47 100644
--- a/Source/bindings/v8/ScriptDebugServer.cpp
+++ b/Source/bindings/v8/ScriptDebugServer.cpp
@@ -287,8 +287,8 @@ bool ScriptDebugServer::setScriptSource(const String& sourceID, const String& ne
if (jsonResult)
*result = jsonResult->asObject();
// Call stack may have changed after if the edited function was on the stack.
- if (!preview && isPaused())
- *newCallFrames = currentCallFrames();
+ if (!preview && isAnyScriptPaused())
+ newCallFrames->merge(currentCallFrames());
return true;
}
// Compile error.
@@ -345,18 +345,19 @@ PassRefPtrWillBeRawPtr<JavaScriptCallFrame> ScriptDebugServer::wrapCallFrames(in
StackTrace ScriptDebugServer::currentCallFramesInner(ScopeInfoDetails scopeDetails)
{
if (!m_isolate->InContext())
- return StackTrace(ScriptValue());
+ return StackTrace();
v8::HandleScope handleScope(m_isolate);
RefPtrWillBeRawPtr<JavaScriptCallFrame> currentCallFrame = wrapCallFrames(0, scopeDetails);
if (!currentCallFrame)
- return StackTrace(ScriptValue());
+ return StackTrace();
V8ScriptState* scriptState = m_pausedScriptState ? m_pausedScriptState->v8ScriptState() : V8ScriptState::current(m_isolate);
V8ScriptState::Scope scope(scriptState);
- return StackTrace(ScriptValue(scriptState, toV8(currentCallFrame.release(), scriptState->context()->Global(), m_isolate)));
+ return StackTrace(ScriptValue(scriptState, toV8(currentCallFrame.release(), scriptState->context()->Global(), m_isolate)), scriptState);
}
+
StackTrace ScriptDebugServer::currentCallFrames()
{
return currentCallFramesInner(AllScopes);
@@ -426,7 +427,8 @@ void ScriptDebugServer::handleProgramBreak(ScriptState* pausedScriptState, v8::H
m_pausedScriptState = pausedScriptState;
m_executionState = executionState;
- ScriptDebugListener::SkipPauseRequest result = listener->didPause(pausedScriptState, currentCallFrames(), ScriptValue(pausedScriptState->v8ScriptState(), exception), breakpointIds);
+
+ ScriptDebugListener::SkipPauseRequest result = listener->didPause(pausedScriptState, ScriptValue(pausedScriptState->v8ScriptState(), exception), breakpointIds);
if (result == ScriptDebugListener::NoSkip) {
m_runningNestedMessageLoop = true;
runMessageLoopOnPause(pausedScriptState->v8ScriptState()->context());

Powered by Google App Engine
This is Rietveld 408576698